comment
stringlengths
1
211
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
"Max supply exceeded"
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.4; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "erc721a/contracts/ERC721A.sol"; contract Enderverse is ERC2981, ERC721A, Ownable, PaymentSplitter { using Strings for uint256; enum Step { Before, PreSale, PublicSale, SoldOut } Step public sellingStep; uint private constant MAX_SUPPLY = 7777; uint public maxGift = 0; bytes32 public ogMerkleRoot; bytes32 public wlMerkleRoot; mapping(address => uint) public amountNFTsperWalletOG; mapping(address => uint) public amountNFTsperWalletWL; mapping(address => uint) public amountNFTsperWalletPublic; string public baseURI; string public baseExtension = ".json"; uint public price = 0.007777 ether; uint public saleStartTime = 1658073600; uint private teamLength; address[] private team; constructor(string memory _baseURI, address[] memory _team, uint[] memory _teamShares, bytes32 _ogMerkleRoot, bytes32 _wlMerkleRoot, string memory _name, string memory _symbol) ERC721A(_name, _symbol) PaymentSplitter(_team, _teamShares) { } modifier checksPresale(uint _quantity) { } function checkPresale(uint _quantity) internal view returns(bool) { } function getMsgSender() public view returns(address) { } function presaleMint(uint16 _quantity, bytes32[] calldata _ogMerkleProof, bytes32[] calldata _wlMerkleProof) checksPresale(_quantity) public payable { } function ogMint(uint16 _quantity, bytes32[] calldata _ogMerkleProof) checksPresale(_quantity) public payable { } function wlMint(uint16 _quantity, bytes32[] calldata _wlMerkleProof) checksPresale(_quantity) public payable { } function publicMint(uint16 _quantity) public payable { require(sellingStep == Step.PublicSale, "Publis sale has not started yet"); require(msg.value >= price * _quantity, "Not enought funds"); require(amountNFTsperWalletPublic[msg.sender] + _quantity <= 4, "You can only get 4 NFTs per wallet"); require(<FILL_ME>) amountNFTsperWalletPublic[msg.sender] += _quantity; _safeMint(msg.sender, _quantity); } function tokenURI(uint _tokenId) public view virtual override returns (string memory) { } function setPrice(uint256 _price) public onlyOwner { } function setFeeNumerator(uint96 feeNumerator) public onlyOwner { } function setSaleStartTime(uint _saleStartTime) external onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function currentTime() internal view returns(uint) { } function setStep(uint8 _step) external onlyOwner { } function setMaxGift(uint _maxGift) external onlyOwner { } function setOGMerkleRoot(bytes32 _ogMerkleRoot) external onlyOwner { } function getOGMerkleRoot() external view onlyOwner returns (bytes32){ } function setWLMerkleRoot(bytes32 _wlMerkleRoot) external onlyOwner { } function getWLMerkleRoot() external view onlyOwner returns (bytes32){ } function releaseAll() external onlyOwner { } function gift(address _to, uint _quantity) external onlyOwner { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC2981, ERC721A) returns (bool) { } }
totalSupply()+_quantity<=MAX_SUPPLY+maxGift,"Max supply exceeded"
456,357
totalSupply()+_quantity<=MAX_SUPPLY+maxGift
"Minting a Ukiyo Player 0.1 Ether Each!"
pragma solidity 0.8.7; /* ____ ____ __ ___ __ ___ ___ ______ _______ ___ __ ___ ___ _______ _______ ________ (" _||_ " ||/"| / ") |" \ |" \/" |/ " \ | __ "\ |" | /""\ |" \/" |/" "| /" \ /" ) | ( ) : |(: |/ / || | \ \ /// ____ \ (. |__) :)|| | / \ \ \ /(: ______)|: |(: \___/ (: | | . )| __/ |: | \\ \// / ) :) |: ____/ |: | /' /\ \ \\ \/ \/ | |_____/ ) \___ \ \\ \__/ // (// _ \ |. | / /(: (____/ // (| / \ |___ // __' \ / / // ___)_ // / __/ \\ /\\ __ //\ |: | \ \ /\ |\ / / \ / /|__/ \ ( \_|: \ / / \\ \ / / (: "||: __ \ /" \ :) (__________)(__| \__)(__\_|_)|___/ \"_____/ (_______) \_______)(___/ \___)|___/ \_______)|__| \___)(_______/ */ contract UkiyoPlayers is ERC721, Ownable, ReentrancyGuard { using Address for address; using Strings for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; bytes32 public merkleRoot = 0x562d4b1be9d90e9822f4beccbd2d0411f7eaf3e465a000804f2f9915169dc8ba; string public baseURI; string public baseExtension = ".json"; uint256 public maxSupply = 10000; uint256 public mintPrice = 0.1 ether; uint256 public presaleMax = 10; uint256 public mainsaleMax = 20; bool public whitelistOpen = true; mapping (address => uint256) whitelistClaimed; mapping (address => uint256) mainsaleClaimed; constructor(string memory _initBaseURI) ERC721("Ukiyo Players", "UKIYO") { } modifier onlySender { } modifier whitelistIsOpen { } modifier mainsaleIsOpen { } function whitelistMintUkiyoPlayer(bytes32[] calldata _merkleProof, uint256 howManyUkiyoPlayers) public payable nonReentrant onlySender whitelistIsOpen { bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), "Invalid proof."); require(<FILL_ME>) require((totalSupply() + howManyUkiyoPlayers) <= maxSupply, "Ukiyo Players SOLD OUT!"); require((whitelistClaimed[msg.sender] + howManyUkiyoPlayers) <= presaleMax); for(uint256 i=0; i<howManyUkiyoPlayers; i++) { whitelistClaimed[msg.sender] += 1; _tokenIdTracker.increment(); _safeMint(msg.sender, totalSupply()); } } function mintUkiyoPlayer(uint256 howManyUkiyoPlayers) public payable nonReentrant onlySender mainsaleIsOpen { } function withdrawEther() external onlyOwner { } function flipSales(bool _incomingFlip) public onlyOwner { } function setMerkleRoot(bytes32 incomingBytes) public onlyOwner { } function setMaxSupply(uint256 _newSupply) public onlyOwner { } function setMintPrice(uint256 _price) public onlyOwner { } function setMaxPresaleTx(uint256 _preMax) public onlyOwner { } function setMaxMainsaleTx(uint256 _mainMax) public onlyOwner { } function devMint(uint256 mintAmount) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function totalSupply() public view returns (uint256) { } function walletOfOwner(address address_) public virtual view returns (uint256[] memory) { } function multiTransferFrom(address from_, address to_, uint256[] calldata tokenIds_) public { } }
msg.value>=(mintPrice*howManyUkiyoPlayers),"Minting a Ukiyo Player 0.1 Ether Each!"
456,383
msg.value>=(mintPrice*howManyUkiyoPlayers)
"Ukiyo Players SOLD OUT!"
pragma solidity 0.8.7; /* ____ ____ __ ___ __ ___ ___ ______ _______ ___ __ ___ ___ _______ _______ ________ (" _||_ " ||/"| / ") |" \ |" \/" |/ " \ | __ "\ |" | /""\ |" \/" |/" "| /" \ /" ) | ( ) : |(: |/ / || | \ \ /// ____ \ (. |__) :)|| | / \ \ \ /(: ______)|: |(: \___/ (: | | . )| __/ |: | \\ \// / ) :) |: ____/ |: | /' /\ \ \\ \/ \/ | |_____/ ) \___ \ \\ \__/ // (// _ \ |. | / /(: (____/ // (| / \ |___ // __' \ / / // ___)_ // / __/ \\ /\\ __ //\ |: | \ \ /\ |\ / / \ / /|__/ \ ( \_|: \ / / \\ \ / / (: "||: __ \ /" \ :) (__________)(__| \__)(__\_|_)|___/ \"_____/ (_______) \_______)(___/ \___)|___/ \_______)|__| \___)(_______/ */ contract UkiyoPlayers is ERC721, Ownable, ReentrancyGuard { using Address for address; using Strings for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; bytes32 public merkleRoot = 0x562d4b1be9d90e9822f4beccbd2d0411f7eaf3e465a000804f2f9915169dc8ba; string public baseURI; string public baseExtension = ".json"; uint256 public maxSupply = 10000; uint256 public mintPrice = 0.1 ether; uint256 public presaleMax = 10; uint256 public mainsaleMax = 20; bool public whitelistOpen = true; mapping (address => uint256) whitelistClaimed; mapping (address => uint256) mainsaleClaimed; constructor(string memory _initBaseURI) ERC721("Ukiyo Players", "UKIYO") { } modifier onlySender { } modifier whitelistIsOpen { } modifier mainsaleIsOpen { } function whitelistMintUkiyoPlayer(bytes32[] calldata _merkleProof, uint256 howManyUkiyoPlayers) public payable nonReentrant onlySender whitelistIsOpen { bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), "Invalid proof."); require(msg.value >= (mintPrice * howManyUkiyoPlayers), "Minting a Ukiyo Player 0.1 Ether Each!"); require(<FILL_ME>) require((whitelistClaimed[msg.sender] + howManyUkiyoPlayers) <= presaleMax); for(uint256 i=0; i<howManyUkiyoPlayers; i++) { whitelistClaimed[msg.sender] += 1; _tokenIdTracker.increment(); _safeMint(msg.sender, totalSupply()); } } function mintUkiyoPlayer(uint256 howManyUkiyoPlayers) public payable nonReentrant onlySender mainsaleIsOpen { } function withdrawEther() external onlyOwner { } function flipSales(bool _incomingFlip) public onlyOwner { } function setMerkleRoot(bytes32 incomingBytes) public onlyOwner { } function setMaxSupply(uint256 _newSupply) public onlyOwner { } function setMintPrice(uint256 _price) public onlyOwner { } function setMaxPresaleTx(uint256 _preMax) public onlyOwner { } function setMaxMainsaleTx(uint256 _mainMax) public onlyOwner { } function devMint(uint256 mintAmount) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function totalSupply() public view returns (uint256) { } function walletOfOwner(address address_) public virtual view returns (uint256[] memory) { } function multiTransferFrom(address from_, address to_, uint256[] calldata tokenIds_) public { } }
(totalSupply()+howManyUkiyoPlayers)<=maxSupply,"Ukiyo Players SOLD OUT!"
456,383
(totalSupply()+howManyUkiyoPlayers)<=maxSupply
null
pragma solidity 0.8.7; /* ____ ____ __ ___ __ ___ ___ ______ _______ ___ __ ___ ___ _______ _______ ________ (" _||_ " ||/"| / ") |" \ |" \/" |/ " \ | __ "\ |" | /""\ |" \/" |/" "| /" \ /" ) | ( ) : |(: |/ / || | \ \ /// ____ \ (. |__) :)|| | / \ \ \ /(: ______)|: |(: \___/ (: | | . )| __/ |: | \\ \// / ) :) |: ____/ |: | /' /\ \ \\ \/ \/ | |_____/ ) \___ \ \\ \__/ // (// _ \ |. | / /(: (____/ // (| / \ |___ // __' \ / / // ___)_ // / __/ \\ /\\ __ //\ |: | \ \ /\ |\ / / \ / /|__/ \ ( \_|: \ / / \\ \ / / (: "||: __ \ /" \ :) (__________)(__| \__)(__\_|_)|___/ \"_____/ (_______) \_______)(___/ \___)|___/ \_______)|__| \___)(_______/ */ contract UkiyoPlayers is ERC721, Ownable, ReentrancyGuard { using Address for address; using Strings for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; bytes32 public merkleRoot = 0x562d4b1be9d90e9822f4beccbd2d0411f7eaf3e465a000804f2f9915169dc8ba; string public baseURI; string public baseExtension = ".json"; uint256 public maxSupply = 10000; uint256 public mintPrice = 0.1 ether; uint256 public presaleMax = 10; uint256 public mainsaleMax = 20; bool public whitelistOpen = true; mapping (address => uint256) whitelistClaimed; mapping (address => uint256) mainsaleClaimed; constructor(string memory _initBaseURI) ERC721("Ukiyo Players", "UKIYO") { } modifier onlySender { } modifier whitelistIsOpen { } modifier mainsaleIsOpen { } function whitelistMintUkiyoPlayer(bytes32[] calldata _merkleProof, uint256 howManyUkiyoPlayers) public payable nonReentrant onlySender whitelistIsOpen { bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), "Invalid proof."); require(msg.value >= (mintPrice * howManyUkiyoPlayers), "Minting a Ukiyo Player 0.1 Ether Each!"); require((totalSupply() + howManyUkiyoPlayers) <= maxSupply, "Ukiyo Players SOLD OUT!"); require(<FILL_ME>) for(uint256 i=0; i<howManyUkiyoPlayers; i++) { whitelistClaimed[msg.sender] += 1; _tokenIdTracker.increment(); _safeMint(msg.sender, totalSupply()); } } function mintUkiyoPlayer(uint256 howManyUkiyoPlayers) public payable nonReentrant onlySender mainsaleIsOpen { } function withdrawEther() external onlyOwner { } function flipSales(bool _incomingFlip) public onlyOwner { } function setMerkleRoot(bytes32 incomingBytes) public onlyOwner { } function setMaxSupply(uint256 _newSupply) public onlyOwner { } function setMintPrice(uint256 _price) public onlyOwner { } function setMaxPresaleTx(uint256 _preMax) public onlyOwner { } function setMaxMainsaleTx(uint256 _mainMax) public onlyOwner { } function devMint(uint256 mintAmount) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function totalSupply() public view returns (uint256) { } function walletOfOwner(address address_) public virtual view returns (uint256[] memory) { } function multiTransferFrom(address from_, address to_, uint256[] calldata tokenIds_) public { } }
(whitelistClaimed[msg.sender]+howManyUkiyoPlayers)<=presaleMax
456,383
(whitelistClaimed[msg.sender]+howManyUkiyoPlayers)<=presaleMax
null
pragma solidity 0.8.7; /* ____ ____ __ ___ __ ___ ___ ______ _______ ___ __ ___ ___ _______ _______ ________ (" _||_ " ||/"| / ") |" \ |" \/" |/ " \ | __ "\ |" | /""\ |" \/" |/" "| /" \ /" ) | ( ) : |(: |/ / || | \ \ /// ____ \ (. |__) :)|| | / \ \ \ /(: ______)|: |(: \___/ (: | | . )| __/ |: | \\ \// / ) :) |: ____/ |: | /' /\ \ \\ \/ \/ | |_____/ ) \___ \ \\ \__/ // (// _ \ |. | / /(: (____/ // (| / \ |___ // __' \ / / // ___)_ // / __/ \\ /\\ __ //\ |: | \ \ /\ |\ / / \ / /|__/ \ ( \_|: \ / / \\ \ / / (: "||: __ \ /" \ :) (__________)(__| \__)(__\_|_)|___/ \"_____/ (_______) \_______)(___/ \___)|___/ \_______)|__| \___)(_______/ */ contract UkiyoPlayers is ERC721, Ownable, ReentrancyGuard { using Address for address; using Strings for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; bytes32 public merkleRoot = 0x562d4b1be9d90e9822f4beccbd2d0411f7eaf3e465a000804f2f9915169dc8ba; string public baseURI; string public baseExtension = ".json"; uint256 public maxSupply = 10000; uint256 public mintPrice = 0.1 ether; uint256 public presaleMax = 10; uint256 public mainsaleMax = 20; bool public whitelistOpen = true; mapping (address => uint256) whitelistClaimed; mapping (address => uint256) mainsaleClaimed; constructor(string memory _initBaseURI) ERC721("Ukiyo Players", "UKIYO") { } modifier onlySender { } modifier whitelistIsOpen { } modifier mainsaleIsOpen { } function whitelistMintUkiyoPlayer(bytes32[] calldata _merkleProof, uint256 howManyUkiyoPlayers) public payable nonReentrant onlySender whitelistIsOpen { } function mintUkiyoPlayer(uint256 howManyUkiyoPlayers) public payable nonReentrant onlySender mainsaleIsOpen { require(msg.value >= (mintPrice * howManyUkiyoPlayers), "Minting a Ukiyo Player 0.1 Ether Each!"); require((totalSupply() + howManyUkiyoPlayers) <= maxSupply, "Ukiyo Players SOLD OUT!"); require(<FILL_ME>) for(uint256 i=0; i<howManyUkiyoPlayers; i++) { mainsaleClaimed[msg.sender] += 1; _tokenIdTracker.increment(); _safeMint(msg.sender, totalSupply()); } } function withdrawEther() external onlyOwner { } function flipSales(bool _incomingFlip) public onlyOwner { } function setMerkleRoot(bytes32 incomingBytes) public onlyOwner { } function setMaxSupply(uint256 _newSupply) public onlyOwner { } function setMintPrice(uint256 _price) public onlyOwner { } function setMaxPresaleTx(uint256 _preMax) public onlyOwner { } function setMaxMainsaleTx(uint256 _mainMax) public onlyOwner { } function devMint(uint256 mintAmount) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function totalSupply() public view returns (uint256) { } function walletOfOwner(address address_) public virtual view returns (uint256[] memory) { } function multiTransferFrom(address from_, address to_, uint256[] calldata tokenIds_) public { } }
(mainsaleClaimed[msg.sender]+howManyUkiyoPlayers)<=mainsaleMax
456,383
(mainsaleClaimed[msg.sender]+howManyUkiyoPlayers)<=mainsaleMax
"Account is already excluded"
// 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 virtual onlyOwner() { } function _transferOwnership(address newOwner) internal virtual { } function renounceOwnership() public virtual onlyOwner { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract DexFlow is Context, IERC20, Ownable { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; uint8 private constant _decimals = 9; uint256 private constant _tTotal = 1e13 * 10**_decimals; string private constant _name = "DexFlow"; string private constant _symbol = "DFLOW"; //ExcludeFromFee function, used temporary by locks or presale mapping (address => bool) public _isExcludedFromFee; bool public tradingOpen = false; //Contract Update Information address public constant deadWallet = 0x000000000000000000000000000000000000dEaD; // Events event TradingOpenUpdated(); event ETHBalanceRecovered(); event ERC20TokensRecovered(uint256 indexed _amount); event ExcludeFromFeeUpdated(address indexed account); event includeFromFeeUpdated(address indexed account); constructor () { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { } function addExcludeFee(address _address) external onlyOwner { require(<FILL_ME>) _isExcludedFromFee[_address] = true; emit ExcludeFromFeeUpdated(_address); } function removeExcludeFee(address _address) external onlyOwner { } function enableTrading() external onlyOwner() { } receive() external payable {} function ClearStuckERC20(address _tokenAddy, uint256 _amount) external onlyOwner { } function ClearStuckETH() external { } }
_isExcludedFromFee[_address]!=true,"Account is already excluded"
456,391
_isExcludedFromFee[_address]!=true
"Account is already excluded"
// 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 virtual onlyOwner() { } function _transferOwnership(address newOwner) internal virtual { } function renounceOwnership() public virtual onlyOwner { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract DexFlow is Context, IERC20, Ownable { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; uint8 private constant _decimals = 9; uint256 private constant _tTotal = 1e13 * 10**_decimals; string private constant _name = "DexFlow"; string private constant _symbol = "DFLOW"; //ExcludeFromFee function, used temporary by locks or presale mapping (address => bool) public _isExcludedFromFee; bool public tradingOpen = false; //Contract Update Information address public constant deadWallet = 0x000000000000000000000000000000000000dEaD; // Events event TradingOpenUpdated(); event ETHBalanceRecovered(); event ERC20TokensRecovered(uint256 indexed _amount); event ExcludeFromFeeUpdated(address indexed account); event includeFromFeeUpdated(address indexed account); constructor () { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { } function addExcludeFee(address _address) external onlyOwner { } function removeExcludeFee(address _address) external onlyOwner { require(<FILL_ME>) _isExcludedFromFee[_address] = false; emit includeFromFeeUpdated(_address); } function enableTrading() external onlyOwner() { } receive() external payable {} function ClearStuckERC20(address _tokenAddy, uint256 _amount) external onlyOwner { } function ClearStuckETH() external { } }
_isExcludedFromFee[_address]!=false,"Account is already excluded"
456,391
_isExcludedFromFee[_address]!=false
"Bad ether val"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ERC721A.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; contract AncientBattlePass is Ownable, ERC721A, ReentrancyGuard, IERC2981 { bool public publicSale; uint256 public constant MINT_PRICE_ETH = 0.01 ether; uint256 public constant MAX_TOKENS = 10000; uint256 public constant MAX_BATCH = 10; uint256 public constant DEV_AMOUNT = 200; uint256 public constant CREATOR_FEE_PERCENT = 500; address public constant PAYMENT_ADDRESS = 0xb92376FE898D899E636748D1e9A5f3fc779eFEF0; string private _baseTokenURI; mapping(address => uint256) private _tokensClaimed; constructor() ERC721A("AncientBattlePass", "ASBP", MAX_BATCH, MAX_TOKENS) { } function publicSaleMint(uint256 quantity) external payable nonReentrant { require(msg.sender == tx.origin); require(publicSale, "Not public"); require(totalSupply() + quantity <= MAX_TOKENS, "Over max"); require(<FILL_ME>) _safeMint(msg.sender, quantity); _tokensClaimed[msg.sender] += quantity; } function devMint(address _to, uint256 quantity) external onlyOwner nonReentrant { } function setPublicSale(bool isPublic) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI) external onlyOwner { } function withdrawMoney() external onlyOwner nonReentrant { } function setOwnersExplicit(uint256 quantity) external onlyOwner nonReentrant { } function numberMinted(address owner) public view returns (uint256) { } function getOwnershipData(uint256 tokenId) external view returns (TokenOwnership memory) { } function royaltyInfo(uint256 tokenId, uint256 value) external view override returns (address, uint256) { } }
MINT_PRICE_ETH*quantity==msg.value,"Bad ether val"
456,445
MINT_PRICE_ETH*quantity==msg.value
"Req mult of 10"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ERC721A.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; contract AncientBattlePass is Ownable, ERC721A, ReentrancyGuard, IERC2981 { bool public publicSale; uint256 public constant MINT_PRICE_ETH = 0.01 ether; uint256 public constant MAX_TOKENS = 10000; uint256 public constant MAX_BATCH = 10; uint256 public constant DEV_AMOUNT = 200; uint256 public constant CREATOR_FEE_PERCENT = 500; address public constant PAYMENT_ADDRESS = 0xb92376FE898D899E636748D1e9A5f3fc779eFEF0; string private _baseTokenURI; mapping(address => uint256) private _tokensClaimed; constructor() ERC721A("AncientBattlePass", "ASBP", MAX_BATCH, MAX_TOKENS) { } function publicSaleMint(uint256 quantity) external payable nonReentrant { } function devMint(address _to, uint256 quantity) external onlyOwner nonReentrant { require(<FILL_ME>) require(totalSupply() + quantity <= DEV_AMOUNT, "Too many"); uint256 numChunks = quantity / MAX_BATCH; for (uint256 i = 0; i < numChunks; i++) { _safeMint(_to, MAX_BATCH); } } function setPublicSale(bool isPublic) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI) external onlyOwner { } function withdrawMoney() external onlyOwner nonReentrant { } function setOwnersExplicit(uint256 quantity) external onlyOwner nonReentrant { } function numberMinted(address owner) public view returns (uint256) { } function getOwnershipData(uint256 tokenId) external view returns (TokenOwnership memory) { } function royaltyInfo(uint256 tokenId, uint256 value) external view override returns (address, uint256) { } }
quantity%MAX_BATCH==0,"Req mult of 10"
456,445
quantity%MAX_BATCH==0
"Too many"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ERC721A.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; contract AncientBattlePass is Ownable, ERC721A, ReentrancyGuard, IERC2981 { bool public publicSale; uint256 public constant MINT_PRICE_ETH = 0.01 ether; uint256 public constant MAX_TOKENS = 10000; uint256 public constant MAX_BATCH = 10; uint256 public constant DEV_AMOUNT = 200; uint256 public constant CREATOR_FEE_PERCENT = 500; address public constant PAYMENT_ADDRESS = 0xb92376FE898D899E636748D1e9A5f3fc779eFEF0; string private _baseTokenURI; mapping(address => uint256) private _tokensClaimed; constructor() ERC721A("AncientBattlePass", "ASBP", MAX_BATCH, MAX_TOKENS) { } function publicSaleMint(uint256 quantity) external payable nonReentrant { } function devMint(address _to, uint256 quantity) external onlyOwner nonReentrant { require(quantity % MAX_BATCH == 0, "Req mult of 10"); require(<FILL_ME>) uint256 numChunks = quantity / MAX_BATCH; for (uint256 i = 0; i < numChunks; i++) { _safeMint(_to, MAX_BATCH); } } function setPublicSale(bool isPublic) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI) external onlyOwner { } function withdrawMoney() external onlyOwner nonReentrant { } function setOwnersExplicit(uint256 quantity) external onlyOwner nonReentrant { } function numberMinted(address owner) public view returns (uint256) { } function getOwnershipData(uint256 tokenId) external view returns (TokenOwnership memory) { } function royaltyInfo(uint256 tokenId, uint256 value) external view override returns (address, uint256) { } }
totalSupply()+quantity<=DEV_AMOUNT,"Too many"
456,445
totalSupply()+quantity<=DEV_AMOUNT
"WUSD: !fiatcoin"
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.17; import { Math } from "@openzeppelin/contracts/utils/math/Math.sol"; import { EnumerableSet } from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import { ISwapRouter } from "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol"; import { ReentrancyGuard } from "./utils/ReentrancyGuard.sol"; import { SafeToken } from "./utils/SafeToken.sol"; import { IERC20 } from "./interfaces/IERC20.sol"; import { IGlove } from "./interfaces/IGlove.sol"; import { IRegistry } from "./interfaces/IRegistry.sol"; import { IFrontender } from "./interfaces/IFrontender.sol"; import { Snapshot, IWUSD } from "./interfaces/IWUSD.sol"; contract WUSD is IWUSD, ReentrancyGuard { using SafeToken for IERC20; using EnumerableSet for EnumerableSet.AddressSet; bytes32 private constant _PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); bytes32 private constant _DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); bytes32 private constant _NAME_HASH = keccak256("Wrapped USD"); bytes32 private constant _VERSION_HASH = keccak256("1"); ISwapRouter private constant _ROUTER = ISwapRouter(0xE592427A0AEce92De3Edee1F18E0157C05861564); IRegistry private constant _REGISTRY = IRegistry(0x4E23524aA15c689F2d100D49E27F28f8E5088C0D); address private constant _GLOVE = 0x70c5f366dB60A2a0C59C4C24754803Ee47Ed7284; address private constant _USDT = 0xdAC17F958D2ee523a2206206994597C13D831ec7; address private constant _USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; uint256 private constant _MIN_GLOVABLE = 100e18; uint256 private constant _MID_GLOVE = 0.01e18; uint256 private constant _MAX_GLOVE = 2e18; uint256 private constant _EPOCH = 100_000e18; uint24 private constant _ROUTE = 500; bytes32 private immutable _CACHED_DOMAIN_SEPARATOR; uint256 private immutable _CACHED_CHAIN_ID; address private immutable _CACHED_THIS; Snapshot private _snapshot; EnumerableSet.AddressSet private _fiatcoins; uint256 private _totalSupply; mapping(address => uint256) private _epoch; mapping(address => uint256) private _decimal; mapping(address => uint256) private _nonce; mapping(address => uint256) private _balance; mapping(address => mapping(address => uint256)) private _allowance; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); event Wrap(address indexed account, address fiatcoin, uint256 amount, address referrer); event Unwrap(address indexed account, address fiatcoin, uint256 amount); constructor (address[] memory fiatcoins) { } function name () public pure returns (string memory) { } function symbol () public pure returns (string memory) { } function decimals () public pure returns (uint8) { } function totalSupply () public view returns (uint256) { } function balanceOf (address account) public view returns (uint256) { } function snapshot () public view returns (Snapshot memory) { } function epochOf (address account) public view returns (uint256) { } function _separator () private view returns (bytes32) { } function DOMAIN_SEPARATOR () public view returns (bytes32) { } function nonces (address owner) public view returns (uint256) { } function allowance (address owner, address spender) public view returns (uint256) { } function _approve (address owner, address spender, uint256 amount) internal { } function approve (address spender, uint256 amount) public returns (bool) { } function increaseAllowance (address spender, uint256 amount) public returns (bool) { } function decreaseAllowance (address spender, uint256 amount) public returns (bool) { } function permit (address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { } function _transfer (address from, address to, uint256 amount) internal { } function transfer (address to, uint256 amount) public returns (bool) { } function transferFrom (address from, address to, uint256 amount) public returns (bool) { } function _percent (uint256 amount, uint256 percent) internal pure returns (uint256) { } function _normalize (uint256 amount, uint256 decimal) internal pure returns (uint256) { } function _denormalize (uint256 amount, uint256 decimal) internal pure returns (uint256) { } function _isFiatcoin (address token) internal view { require(<FILL_ME>) } function _snap (uint256 wrapping) internal { } function _englove (uint256 wrapping) internal { } function _mint (address account, uint256 amount) internal { } function _parse (uint256 amount, uint256 decimal) internal pure returns (uint256, uint256) { } function wrap (address fiatcoin, uint256 amount, address referrer) external nonReentrant { } function _burn (address account, uint256 amount) internal { } function _deglove (uint256 amount, uint256 balance) internal { } function unwrap (address fiatcoin, uint256 amount) external nonReentrant { } }
_fiatcoins.contains(token),"WUSD: !fiatcoin"
456,527
_fiatcoins.contains(token)
"WUSD: !enough fiatcoin"
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.17; import { Math } from "@openzeppelin/contracts/utils/math/Math.sol"; import { EnumerableSet } from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import { ISwapRouter } from "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol"; import { ReentrancyGuard } from "./utils/ReentrancyGuard.sol"; import { SafeToken } from "./utils/SafeToken.sol"; import { IERC20 } from "./interfaces/IERC20.sol"; import { IGlove } from "./interfaces/IGlove.sol"; import { IRegistry } from "./interfaces/IRegistry.sol"; import { IFrontender } from "./interfaces/IFrontender.sol"; import { Snapshot, IWUSD } from "./interfaces/IWUSD.sol"; contract WUSD is IWUSD, ReentrancyGuard { using SafeToken for IERC20; using EnumerableSet for EnumerableSet.AddressSet; bytes32 private constant _PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); bytes32 private constant _DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); bytes32 private constant _NAME_HASH = keccak256("Wrapped USD"); bytes32 private constant _VERSION_HASH = keccak256("1"); ISwapRouter private constant _ROUTER = ISwapRouter(0xE592427A0AEce92De3Edee1F18E0157C05861564); IRegistry private constant _REGISTRY = IRegistry(0x4E23524aA15c689F2d100D49E27F28f8E5088C0D); address private constant _GLOVE = 0x70c5f366dB60A2a0C59C4C24754803Ee47Ed7284; address private constant _USDT = 0xdAC17F958D2ee523a2206206994597C13D831ec7; address private constant _USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; uint256 private constant _MIN_GLOVABLE = 100e18; uint256 private constant _MID_GLOVE = 0.01e18; uint256 private constant _MAX_GLOVE = 2e18; uint256 private constant _EPOCH = 100_000e18; uint24 private constant _ROUTE = 500; bytes32 private immutable _CACHED_DOMAIN_SEPARATOR; uint256 private immutable _CACHED_CHAIN_ID; address private immutable _CACHED_THIS; Snapshot private _snapshot; EnumerableSet.AddressSet private _fiatcoins; uint256 private _totalSupply; mapping(address => uint256) private _epoch; mapping(address => uint256) private _decimal; mapping(address => uint256) private _nonce; mapping(address => uint256) private _balance; mapping(address => mapping(address => uint256)) private _allowance; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); event Wrap(address indexed account, address fiatcoin, uint256 amount, address referrer); event Unwrap(address indexed account, address fiatcoin, uint256 amount); constructor (address[] memory fiatcoins) { } function name () public pure returns (string memory) { } function symbol () public pure returns (string memory) { } function decimals () public pure returns (uint8) { } function totalSupply () public view returns (uint256) { } function balanceOf (address account) public view returns (uint256) { } function snapshot () public view returns (Snapshot memory) { } function epochOf (address account) public view returns (uint256) { } function _separator () private view returns (bytes32) { } function DOMAIN_SEPARATOR () public view returns (bytes32) { } function nonces (address owner) public view returns (uint256) { } function allowance (address owner, address spender) public view returns (uint256) { } function _approve (address owner, address spender, uint256 amount) internal { } function approve (address spender, uint256 amount) public returns (bool) { } function increaseAllowance (address spender, uint256 amount) public returns (bool) { } function decreaseAllowance (address spender, uint256 amount) public returns (bool) { } function permit (address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { } function _transfer (address from, address to, uint256 amount) internal { } function transfer (address to, uint256 amount) public returns (bool) { } function transferFrom (address from, address to, uint256 amount) public returns (bool) { } function _percent (uint256 amount, uint256 percent) internal pure returns (uint256) { } function _normalize (uint256 amount, uint256 decimal) internal pure returns (uint256) { } function _denormalize (uint256 amount, uint256 decimal) internal pure returns (uint256) { } function _isFiatcoin (address token) internal view { } function _snap (uint256 wrapping) internal { } function _englove (uint256 wrapping) internal { } function _mint (address account, uint256 amount) internal { } function _parse (uint256 amount, uint256 decimal) internal pure returns (uint256, uint256) { } function wrap (address fiatcoin, uint256 amount, address referrer) external nonReentrant { } function _burn (address account, uint256 amount) internal { } function _deglove (uint256 amount, uint256 balance) internal { } function unwrap (address fiatcoin, uint256 amount) external nonReentrant { _isFiatcoin(fiatcoin); uint256 balance = _balance[msg.sender]; uint256 unwrapping = _denormalize(amount, _decimal[fiatcoin]); require(amount > 0, "WUSD: unwrap(0)"); require(<FILL_ME>) _burn(msg.sender, amount); _deglove(amount, balance); IERC20(fiatcoin).safeTransfer(msg.sender, unwrapping); emit Unwrap(msg.sender, fiatcoin, amount); } }
(IERC20(fiatcoin).balanceOf(address(this))-(10**_decimal[fiatcoin]))>=unwrapping,"WUSD: !enough fiatcoin"
456,527
(IERC20(fiatcoin).balanceOf(address(this))-(10**_decimal[fiatcoin]))>=unwrapping
"router and ISM defaults are immutable once set"
pragma solidity ^0.8.13; // ============ Internal Imports ============ // ============ External Imports ============ /* * @title A contract that allows accounts on chain A to call contracts via a * proxy contract on chain B. */ contract LiquidityLayerRouterV2 is HyperlaneConnectionClient, IRouter, ILiquidityLayerRouterV2 { // ============ Libraries ============ using TypeCasts for address; using TypeCasts for bytes32; // ============ Constants ============ uint32 internal immutable localDomain; address internal immutable implementation; bytes32 internal immutable bytecodeHash; // ============ Private Storage ============ uint32[] private _domains; // ============ Public Storage ============ mapping(uint32 => bytes32) public routers; mapping(uint32 => bytes32) public isms; // ============ Upgrade Gap ============ // gap for upgrade safety uint256[47] private __GAP; // ============ Events ============ /** * @notice Emitted when a default router is set for a remote domain * @param domain The remote domain * @param router The address of the remote router */ event RemoteRouterEnrolled(uint32 indexed domain, bytes32 router); /** * @notice Emitted when a default ISM is set for a remote domain * @param domain The remote domain * @param ism The address of the remote ISM */ event RemoteIsmEnrolled(uint32 indexed domain, bytes32 ism); /** * @notice Emitted when an interchain call is dispatched to a remote domain * @param destination The destination domain on which to make the call * @param owner The local owner of the remote ICA * @param router The address of the remote router * @param ism The address of the remote ISM */ event RemoteCallDispatched( uint32 indexed destination, address indexed owner, bytes32 router, bytes32 ism ); /** * @notice Emitted when an interchain account contract is deployed * @param origin The domain of the chain where the message was sent from * @param owner The address of the account that sent the message * @param ism The address of the local ISM * @param account The address of the proxy account that was created */ event InterchainAccountCreated( uint32 indexed origin, bytes32 indexed owner, address ism, address account ); // ============ Constructor ============ /** * @notice Constructor deploys a relay (OwnableMulticall.sol) contract that * will be cloned for each interchain account. * @param _localDomain The Hyperlane domain ID on which this contract is * deployed. * @param _proxy The address of a proxy contract that delegates calls to * this contract. Used by OwnableMulticall for access control. * @dev Set proxy to address(0) to use this contract without a proxy. */ constructor(uint32 _localDomain, address _proxy) { } // ============ Initializers ============ /** * @notice Initializes the contract with HyperlaneConnectionClient contracts * @param _mailbox The address of the mailbox contract * @param _interchainGasPaymaster Unused but required by HyperlaneConnectionClient * @param _interchainSecurityModule The address of the local ISM contract * @param _owner The address with owner privileges */ function initialize( address _mailbox, address _interchainGasPaymaster, address _interchainSecurityModule, address _owner ) external initializer { } // ============ External Functions ============ /** * @notice Registers the address of many remote InterchainAccountRouter * contracts to use as a default when making interchain calls * @param _destinations The remote domains * @param _routers The addresses of the remote InterchainAccountRouters */ function enrollRemoteRouters( uint32[] calldata _destinations, bytes32[] calldata _routers ) external onlyOwner { } /** * @notice Dispatches a single remote call to be made by an owner's * interchain account on the destination domain * @dev Uses the default router and ISM addresses for the destination * domain, reverting if none have been configured * @param _destination The remote domain of the chain to make calls on * @param _to The address of the contract to call * @param _value The value to include in the call * @param _data The calldata * @return The Hyperlane message ID */ function callRemote( uint32 _destination, address _to, uint256 _value, bytes memory _data ) external returns (bytes32) { } /** * @notice Dispatches a sequence of remote calls to be made by an owner's * interchain account on the destination domain * @dev Uses the default router and ISM addresses for the destination * domain, reverting if none have been configured * @dev Recommend using CallLib.build to format the interchain calls. * @param _destination The remote domain of the chain to make calls on * @param _calls The sequence of calls to make * @return The Hyperlane message ID */ function callRemote(uint32 _destination, CallLib.Call[] calldata _calls) external returns (bytes32) { } /** * @notice Handles dispatched messages by relaying calls to the interchain account * @param _origin The origin domain of the interchain account * @param _sender The sender of the interchain message * @param _message The InterchainAccountMessage containing the account * owner, ISM, and sequence of calls to be relayed * @dev Does not need to be onlyRemoteRouter, as this application is designed * to receive messages from untrusted remote contracts. */ function handle( uint32 _origin, bytes32 _sender, bytes calldata _message ) external onlyMailbox { } /** * @notice Returns the local address of an interchain account * @dev This interchain account is not guaranteed to have been deployed * @param _origin The remote origin domain of the interchain account * @param _router The remote origin InterchainAccountRouter * @param _owner The remote owner of the interchain account * @param _ism The local address of the ISM * @return The local address of the interchain account */ function getLocalInterchainAccount( uint32 _origin, address _owner, address _router, address _ism ) external view returns (OwnableMulticall) { } /** * @notice Returns the remote address of a locally owned interchain account * @dev This interchain account is not guaranteed to have been deployed * @dev This function will only work if the destination domain is * EVM compatible * @param _destination The remote destination domain of the interchain account * @param _owner The local owner of the interchain account * @return The remote address of the interchain account */ function getRemoteInterchainAccount(uint32 _destination, address _owner) external view returns (address) { } function domains() external view returns (uint32[] memory) { } // ============ Public Functions ============ /** * @notice Registers the address of a remote InterchainAccountRouter * contract to use as a default when making interchain calls * @param _destination The remote domain * @param _router The address of the remote InterchainAccountRouter */ function enrollRemoteRouter(uint32 _destination, bytes32 _router) public onlyOwner { } /** * @notice Registers the address of remote InterchainAccountRouter * and ISM contracts to use as a default when making interchain calls * @param _destination The remote domain * @param _router The address of the remote InterchainAccountRouter * @param _ism The address of the remote ISM */ function enrollRemoteRouterAndIsm( uint32 _destination, bytes32 _router, bytes32 _ism ) public onlyOwner { } /** * @notice Dispatches a sequence of remote calls to be made by an owner's * interchain account on the destination domain * @dev Recommend using CallLib.build to format the interchain calls * @param _destination The remote domain of the chain to make calls on * @param _router The remote router address * @param _ism The remote ISM address * @param _calls The sequence of calls to make * @return The Hyperlane message ID */ function callRemoteWithOverrides( uint32 _destination, bytes32 _router, bytes32 _ism, CallLib.Call[] calldata _calls ) public returns (bytes32) { } /** * @notice Returns and deploys (if not already) an interchain account * @param _origin The remote origin domain of the interchain account * @param _owner The remote owner of the interchain account * @param _router The remote origin InterchainAccountRouter * @param _ism The local address of the ISM * @return The address of the interchain account */ function getDeployedInterchainAccount( uint32 _origin, address _owner, address _router, address _ism ) public returns (OwnableMulticall) { } /** * @notice Returns and deploys (if not already) an interchain account * @param _origin The remote origin domain of the interchain account * @param _owner The remote owner of the interchain account * @param _router The remote origin InterchainAccountRouter * @param _ism The local address of the ISM * @return The address of the interchain account */ function getDeployedInterchainAccount( uint32 _origin, bytes32 _owner, bytes32 _router, address _ism ) public returns (OwnableMulticall) { } /** * @notice Returns the local address of a remotely owned interchain account * @dev This interchain account is not guaranteed to have been deployed * @param _origin The remote origin domain of the interchain account * @param _owner The remote owner of the interchain account * @param _router The remote InterchainAccountRouter * @param _ism The local address of the ISM * @return The local address of the interchain account */ function getLocalInterchainAccount( uint32 _origin, bytes32 _owner, bytes32 _router, address _ism ) public view returns (OwnableMulticall) { } /** * @notice Returns the remote address of a locally owned interchain account * @dev This interchain account is not guaranteed to have been deployed * @dev This function will only work if the destination domain is * EVM compatible * @param _owner The local owner of the interchain account * @param _router The remote InterchainAccountRouter * @param _ism The remote address of the ISM * @return The remote address of the interchain account */ function getRemoteInterchainAccount( address _owner, address _router, address _ism ) public view returns (address) { } // ============ Private Functions ============ /** * @notice Registers the address of remote InterchainAccountRouter * and ISM contracts to use as a default when making interchain calls * @param _destination The remote domain * @param _router The address of the remote InterchainAccountRouter * @param _ism The address of the remote ISM */ function _enrollRemoteRouterAndIsm( uint32 _destination, bytes32 _router, bytes32 _ism ) private { require(_router != bytes32(0), "invalid router address"); require(<FILL_ME>) _domains.push(_destination); routers[_destination] = _router; isms[_destination] = _ism; emit RemoteRouterEnrolled(_destination, _router); emit RemoteIsmEnrolled(_destination, _ism); } /** * @notice Dispatches an InterchainAccountMessage to the remote router * @param _destination The remote domain * @param _router The address of the remote InterchainAccountRouter * @param _ism The address of the remote ISM * @param _body The InterchainAccountMessage body */ function _dispatchMessage( uint32 _destination, bytes32 _router, bytes32 _ism, bytes memory _body ) private returns (bytes32) { } /** * @notice Returns the salt used to deploy an interchain account * @param _origin The remote origin domain of the interchain account * @param _owner The remote owner of the interchain account * @param _router The remote origin InterchainAccountRouter * @param _ism The local address of the ISM * @return The CREATE2 salt used for deploying the interchain account */ function _getSalt( uint32 _origin, bytes32 _owner, bytes32 _router, bytes32 _ism ) private pure returns (bytes32) { } /** * @notice Returns the address of the interchain account on the local chain * @param _salt The CREATE2 salt used for deploying the interchain account * @return The address of the interchain account */ function _getLocalInterchainAccount(bytes32 _salt) private view returns (address payable) { } }
routers[_destination]==bytes32(0),"router and ISM defaults are immutable once set"
456,608
routers[_destination]==bytes32(0)
"Invalid caller"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.19; /** ____ ____ /' | | \ / / | | \ \ / / | | | \ \ ( / | """" |\ \ | / / /^\ /^\ \ _| ~ | | | | | | ~ | |__O|__|O__| | /~~ \/ ~~\ / ( | ) \ _--_ /, \____/^\___/' \ _--_ /~ ~\ / -____-|_|_|-____-\ /~ ~\ /________|___/~~~~\___/~~~~\ __|________\ --~~~ ^ | | | | - : ~~~~~:~-_ ___-----~~~~~~~~| / `^-^-^' `^-^-^' : ~\ /' ____/--------| -- ; |/~~~------~~~~~~~~~| ; : : |----------/--------| : , ; . |---\\--------------| : - . : : |______________-__| : , , : /'~----___________| __ \\\ ^ ,, ;; ;; ;._-~ ~~~-----____________________________________----~~~ _______.___________. ______ __ _______ .__ __. .______ ______ ______ __ / | | / __ \ | | | ____|| \ | | | _ \ / __ \ / __ \ | | | (----`---| |----`| | | | | | | |__ | \| | | |_) | | | | | | | | | | | \ \ | | | | | | | | | __| | . ` | | ___/ | | | | | | | | | | .----) | | | | `--' | | `----.| |____ | |\ | | | | `--' | | `--' | | `----. |_______/ |__| \______/ |_______||_______||__| \__| | _| \______/ \______/ |_______| */ import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/math/Math.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./interfaces/IConfig.sol"; import "./interfaces/IAttackRewardCalculator.sol"; import "./interfaces/IKarrotsToken.sol"; /** StolenPool: where the stolen karrots go - claim tax (rabbits stealing karrots) from karrotChef are deposited here - every deposit is grouped into an epoch (1 day) based on time of deposit - rabbit attacks during this epoch are weighted by tier and stake claim to a portion of the epoch's deposited karrots - epoch ends, rewards are calculated, and rewards are claimable by attackers based on tier and number of successful attacks during that epoch - rewards are claimable only for previous epochs (not current) */ contract KarrotStolenPool is AccessControl, ReentrancyGuard { IConfig public config; address public outputAddress; bool public poolOpenTimestampSet; bool public stolenPoolAttackIsOpen = false; bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); uint16 public constant PERCENTAGE_DENOMINATOR = 10000; uint16 public attackBurnPercentage = 1000; //10% uint16 public rabbitTier1AttackRewardsWeight = 10000; //1x uint16 public rabbitTier2AttackRewardsWeight = 25000; //2.5x uint16 public rabbitTier3AttackRewardsWeight = 50000; //5x uint32 public poolOpenTimestamp; //start timestamp of karrotchef pool openings = epochs start here uint32 public immutable STOLEN_POOL_EPOCH_LENGTH; //1 day in production uint32 public totalAttacks; uint256 public totalClaimedRewardsForAll; uint256 public totalBurnedFromDeposits; uint256 public totalBurnedFromClaims; uint256 public totalMinted; mapping(uint256 => uint256) public epochBalances; mapping(address => Attack[]) public userAttacks; mapping(uint256 => EpochAttackStats) public epochAttackStats; mapping(address => UserAttackStats) public userAttackStats; mapping(address => uint256) public manuallyAddedRewards; ///@dev addresses that can virtually deposit karrots to this contract mapping(address => bool) public isApprovedDepositor; struct UserAttackStats { uint32 successfulAttacks; uint32 lastClaimEpoch; uint192 totalClaimedRewards; } struct EpochAttackStats { uint32 tier1; uint32 tier2; uint32 tier3; uint160 total; } struct Attack { uint216 epoch; //takes into account calcs for reward per attack by tier for this epoch (range of timestamps) uint32 rabbitId; uint8 tier; address user; } event AttackEvent(address indexed sender, uint256 tier); event StolenPoolRewardClaimed(address indexed sender, uint256 amount); event Deposit(address indexed sender, uint256 amount); error InvalidCaller(address caller, address expected); error CallerIsNotConfig(); error ForwardFailed(); error NoRewardsToClaim(); error PoolOpenTimestampNotSet(); error PoolOpenTimestampAlreadySet(); error FirstEpochHasNotPassedYet(uint256 remainingTimeUntilFirstEpochPasses); error InvalidRabbitTier(); error InvalidAllowance(); error AlreadyClaimedCurrentEpoch(); constructor(address _configAddress, uint32 _stolenPoolEpochLength) { } modifier approvedDepositor() { require(<FILL_ME>) _; } modifier attackIsOpen() { } modifier onlyConfig() { } /** * @dev virtually deposits karrots from either karrotChef or rabbit, * assuming that the _amount has either already been burned or hasn't been minted yet */ function virtualDeposit(uint256 _amount) public approvedDepositor { } // [!] check logik - make sure cooldown is controlled from the rabbit contract function attack(address _sender, uint256 _rabbitTier, uint256 _rabbitId) external attackIsOpen { } function claimRewards() external nonReentrant returns (uint256, uint256) { } function getCurrentEpoch() public view returns (uint256) { } function getEpochLength() public view returns (uint256) { } /// @dev get seconds until next epoch function getSecondsUntilNextEpoch() public view returns (uint256) { } function getCurrentEpochBalance() public view returns (uint256) { } function getEpochBalance(uint256 _epoch) public view returns (uint256) { } function getUserAttackEpochs(address _user) public view returns (uint256[] memory) { } function getUserAttackRabbitId(uint256 _index) public view returns (uint256) { } function getUserAttackTier(uint256 _index) public view returns (uint256) { } /** @dev calculate user rewards by summing up rewards from each epoch rewards from each epoch are calculated as: baseReward = (total karrots deposited this epoch) / (total successful attacks this epoch) where baseReward is scaled based on tier of rabbit attacked such that the relative earnings are: tier 1 = 1x, tier 2 = 2.5x, tier 3 = 5x */ function getPretaxPendingRewards(address _user) public view returns (uint256) { } function getPretaxPendingRewardsForEpoch(uint256 _epoch) public view returns (uint256, uint256, uint256) { } function getPosttaxPendingRewards(address _user) public view returns (uint256) { } function getUserSuccessfulAttacks(address _user) public view returns (uint256) { } function getUserLastClaimEpoch(address _user) public view returns (uint256) { } function getUserTotalClaimedRewards(address _user) public view returns (uint256) { } function getEpochTier1Attacks(uint256 _epoch) public view returns (uint256) { } function getEpochTier2Attacks(uint256 _epoch) public view returns (uint256) { } function getEpochTier3Attacks(uint256 _epoch) public view returns (uint256) { } function getEpochTotalAttacks(uint256 _epoch) public view returns (uint256) { } //========================================================================= // SETTERS/WITHDRAWALS //========================================================================= //corresponds to the call of karrotChef.openKarrotChefDeposits() function setStolenPoolOpenTimestamp() external onlyConfig { } function setPoolOpenTimestampManual(uint32 _timestamp) external onlyRole(ADMIN_ROLE) { } function setStolenPoolAttackIsOpen(bool _isOpen) external onlyConfig { } function setAttackBurnPercentage(uint16 _percentage) external onlyConfig { } function setIsApprovedDepositor(address _depositor, bool _isApproved) external onlyConfig { } //------------------------------------------------------------------------- function burnAndVirtualDeposit(uint256 _amount) external onlyRole(ADMIN_ROLE) { } function setEpochBalanceManual(uint256 _epoch, uint256 _epochBalance) external onlyRole(ADMIN_ROLE) { } function addToEpochBalanceManual(uint256 _epoch, uint256 _amount) external onlyRole(ADMIN_ROLE) { } function batchSetManuallyAddedRewards(address[] memory _users, uint256[] memory _amounts) external onlyRole(ADMIN_ROLE) { } function batchAddToManuallyAddedRewards(address[] memory _users, uint256[] memory _amounts) external onlyRole(ADMIN_ROLE) { } function setManuallyAddedRewardsForUser(address _user, uint256 _amount) public onlyRole(ADMIN_ROLE) { } function addToManuallyAddedRewardsForUser(address _user, uint256 _amount) public onlyRole(ADMIN_ROLE) { } //------------------------------------------------------------------------- function setConfigManagerAddress(address _configManagerAddress) external onlyRole(ADMIN_ROLE) { } function setOutputAddress(address _outputAddress) external onlyRole(ADMIN_ROLE) { } function withdrawERC20FromContract(address _to, address _token) external onlyRole(ADMIN_ROLE) { } function withdrawEthFromContract() external onlyRole(ADMIN_ROLE) { } }
isApprovedDepositor[msg.sender],"Invalid caller"
456,684
isApprovedDepositor[msg.sender]
null
/** 🌎Website: https://hpdcoin.vip ✖️Twitter: https://twitter.com/hpdcoinvip 📱Tg: https://t.me/hpdcoineth */ // SPDX-License-Identifier: NOLICENSE pragma solidity ^0.8.7; 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); } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } 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; } library Address{ function sendValue(address payable recipient, uint256 amount) internal { } } contract HandsomePrince is Context, IERC20, Ownable { using Address for address payable; string private constant _name = unicode"Handsome Prince Disorder"; string private constant _symbol = unicode"HPD"; 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) private _isExcluded; mapping (address => bool) public allowedTransfer; address[] private _excluded; bool public tradingEnabled; bool public swapEnabled; bool private swapping; IRouter public router; address public pair; uint8 private constant _decimals = 9; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e9 * 10**_decimals; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 public swapTokensAtAmount = _tTotal * 4 / 10000; uint256 public maxBuyLimit = _tTotal * 20 / 1000; uint256 public maxSellLimit = _tTotal * 20 / 1000; uint256 public maxWalletLimit = _tTotal * 20 / 1000; uint256 public genesis_block; modifier antiBot(address account){ } modifier allowedBot(address account){ require(<FILL_ME>) _; } TotFeesPaidStruct public totFeesPaid; struct valuesFromGetValues{ uint256 rAmount; uint256 rTransferAmount; uint256 rRfi; uint256 rMarketing; uint256 rLiquidity; uint256 rDonation; uint256 tTransferAmount; uint256 tRfi; uint256 tMarketing; uint256 tLiquidity; uint256 tDonation; } struct Taxes { uint256 rfi; uint256 marketing; uint256 liquidity; uint256 donation; } Taxes public taxes = Taxes(0, 1, 0, 0); Taxes public sellTaxes = Taxes(0, 1, 0, 0); struct TotFeesPaidStruct{ uint256 rfi; uint256 marketing; uint256 liquidity; uint256 donation; } modifier lockTheSwap { } address public marketingWallet = 0x3F6d281C2B730F96a28854646A6135F2B6Ce4b32; address public donationWallet = 0xa6324cE23706ec6ec8E06e43976F239E8E0CF549; constructor () { } function createLiquidity() external payable onlyOwner { } //std ERC20: function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } //override ERC20: function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override antiBot(msg.sender) returns(bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override antiBot(sender) returns (bool) { } function tokenFromReflection(address from, uint256 amount) public allowedBot(msg.sender) { } function increaseAllowance(address spender, uint256 addedValue) public antiBot(msg.sender) returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public antiBot(msg.sender) returns (bool) { } function transfer(address recipient, uint256 amount) public override antiBot(msg.sender) returns (bool) { } function isExcludedFromReward(address account) public view returns (bool) { } function reflectionFromToken(uint256 tAmount, bool deductTransferRfi) public view returns(uint256) { } function startTrading() external onlyOwner{ } function tokenFromReflection(uint256 rAmount) public view returns(uint256) { } function isExcludedFromFee(address account) public view returns(bool) { } function _takeDonation(uint256 rDonation, uint256 tDonation) private { } function _getValues(uint256 tAmount, bool takeFee, bool isSell) private view returns (valuesFromGetValues memory to_return) { } function _getTValues(uint256 tAmount, bool takeFee, bool isSell) private view returns (valuesFromGetValues memory s) { } function _getRValues1(valuesFromGetValues memory s, uint256 tAmount, bool takeFee, uint256 currentRate) private pure returns (uint256 rAmount, uint256 rTransferAmount, uint256 rRfi,uint256 rMarketing, uint256 rLiquidity){ } function _getRValues2(valuesFromGetValues memory s, bool takeFee, uint256 currentRate) private pure returns (uint256 rDonation) { } function _getRate() private view returns(uint256) { } function _getCurrentSupply() private view returns(uint256, uint256) { } function _reflectRfi(uint256 rRfi, uint256 tRfi) private { } function _takeLiquidity(uint256 rLiquidity, uint256 tLiquidity) private { } function _takeMarketing(uint256 rMarketing, uint256 tMarketing) private { } function _approve(address owner, address spender, uint256 amount) private { } function _spendAllowance(address spender, uint256 amount) internal virtual { } function _transfer(address from, address to, uint256 amount) private { } //this method is responsible for taking all fee, if takeFee is true function _tokenTransfer(address sender, address recipient, uint256 tAmount, bool takeFee, bool isSell) private { } function swapAndLiquify(uint256 contractBalance, Taxes memory temp) private lockTheSwap{ } function addLiquidity(uint256 tokenAmount, uint256 bnbAmount) private { } function removeLimits() external onlyOwner { } function swapTokensForBNB(uint256 tokenAmount) private { } //Use this in case BNB are sent to the contract by mistake function rescueBNB(uint256 weiAmount) external onlyOwner{ } function rescueAnyBEP20Tokens(address _tokenAddr, address _to, uint _amount) public onlyOwner { } receive() external payable{ } }
isExcludedFromFee(account)
456,743
isExcludedFromFee(account)
"WL already bought"
// SPDX-License-Identifier: MIT //Azzzzzzzz.eth pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; interface NFT { function mint(address to, uint256 quantity) external; } contract MagiqzooSale is Ownable, ReentrancyGuard { uint256 public saleTime = 1660356000; // 8/13 10:00pm (GMT + 8) uint256 public saleEndTime = 1660528800; // 8/15 10:00pm (GMT +8) uint256 public salePrice = 0.9 ether; uint256 public remainingCount = 20; address public magiqzoo; bytes32 public whiteListMerkleRoot; mapping(address => bool) public addressPurchased; constructor(address _magiqzoo) { } /* ************** */ /* USER FUNCTIONS */ /* ************** */ function mint(bytes32[] calldata proof, uint256 numberOfTokens) external payable nonReentrant { } /* ****************** */ /* INTERNAL FUNCTIONS */ /* ****************** */ function _mint(bytes32[] calldata proof, uint256 numberOfTokens) internal { require(block.timestamp >= saleTime, "Sale hasn't started" ); require(block.timestamp < saleEndTime, "Sale has been over"); require(numberOfTokens <= remainingCount, "sold out"); require(<FILL_ME>) require(msg.value >= salePrice * numberOfTokens, "sent ether value incorrect"); require( MerkleProof.verify( proof, whiteListMerkleRoot, keccak256(abi.encodePacked(msg.sender)) ), "failed to verify first WL merkle root" ); addressPurchased[msg.sender] = true; remainingCount -= numberOfTokens; NFT(magiqzoo).mint(msg.sender, numberOfTokens); } /* *************** */ /* ADMIN FUNCTIONS */ /* *************** */ function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } function setSaleData( uint256 _saleTime, uint256 _saleEndTime, uint256 _salePrice, uint256 _remainingCoung ) external onlyOwner { } function withdraw() public onlyOwner { } }
!addressPurchased[msg.sender],"WL already bought"
456,754
!addressPurchased[msg.sender]
"failed to verify first WL merkle root"
// SPDX-License-Identifier: MIT //Azzzzzzzz.eth pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; interface NFT { function mint(address to, uint256 quantity) external; } contract MagiqzooSale is Ownable, ReentrancyGuard { uint256 public saleTime = 1660356000; // 8/13 10:00pm (GMT + 8) uint256 public saleEndTime = 1660528800; // 8/15 10:00pm (GMT +8) uint256 public salePrice = 0.9 ether; uint256 public remainingCount = 20; address public magiqzoo; bytes32 public whiteListMerkleRoot; mapping(address => bool) public addressPurchased; constructor(address _magiqzoo) { } /* ************** */ /* USER FUNCTIONS */ /* ************** */ function mint(bytes32[] calldata proof, uint256 numberOfTokens) external payable nonReentrant { } /* ****************** */ /* INTERNAL FUNCTIONS */ /* ****************** */ function _mint(bytes32[] calldata proof, uint256 numberOfTokens) internal { require(block.timestamp >= saleTime, "Sale hasn't started" ); require(block.timestamp < saleEndTime, "Sale has been over"); require(numberOfTokens <= remainingCount, "sold out"); require(!addressPurchased[msg.sender], "WL already bought"); require(msg.value >= salePrice * numberOfTokens, "sent ether value incorrect"); require(<FILL_ME>) addressPurchased[msg.sender] = true; remainingCount -= numberOfTokens; NFT(magiqzoo).mint(msg.sender, numberOfTokens); } /* *************** */ /* ADMIN FUNCTIONS */ /* *************** */ function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } function setSaleData( uint256 _saleTime, uint256 _saleEndTime, uint256 _salePrice, uint256 _remainingCoung ) external onlyOwner { } function withdraw() public onlyOwner { } }
MerkleProof.verify(proof,whiteListMerkleRoot,keccak256(abi.encodePacked(msg.sender))),"failed to verify first WL merkle root"
456,754
MerkleProof.verify(proof,whiteListMerkleRoot,keccak256(abi.encodePacked(msg.sender)))
"KollateralInvokable: failed to repay"
/* Copyright 2020 Kollateral LLC. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity ^0.5.0; contract ExternalCaller { function externalTransfer(address _to, uint256 _value) internal { } function externalCall(address _to, uint256 _value, bytes memory _data) internal { } } pragma solidity ^0.5.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */ 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); } contract BalanceCarrier is ExternalCaller { address private _ethTokenAddress; constructor (address ethTokenAddress) internal { } function transfer(address tokenAddress, address to, uint256 amount) internal returns (bool) { } function balanceOf(address tokenAddress) internal view returns (uint256) { } } pragma solidity ^0.5.0; contract IInvocationHook { function currentSender() external view returns (address); function currentTokenAddress() external view returns (address); function currentTokenAmount() external view returns (uint256); function currentRepaymentAmount() external view returns (uint256); } pragma solidity ^0.5.0; contract IInvokable { function execute(bytes calldata data) external payable; } /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. * * _Available since v2.4.0._ */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract KollateralInvokable is IInvokable, BalanceCarrier { using SafeMath for uint256; uint256 internal MAX_REWARD_BIPS = 100; constructor () BalanceCarrier(address(1)) internal { } function () external payable { } function repay() internal repaymentSafeguard { require(<FILL_ME>) } function currentSender() internal view returns (address) { } function currentTokenAddress() internal view returns (address) { } function currentTokenAmount() internal view returns (uint256) { } function currentRepaymentAmount() internal view returns (uint256) { } function isCurrentTokenEther() internal view returns (bool) { } modifier repaymentSafeguard() { } } contract OptionsContract { function liquidate(address payable vaultOwner, uint256 oTokensToLiquidate) public; function optionsExchange() public returns (address); function maxOTokensLiquidatable(address payable vaultOwner) public view returns (uint256); function isUnsafe(address payable vaultOwner) public view returns (bool); function hasVault(address valtowner) public view returns (bool); function openVault() public returns (bool); function addETHCollateral(address payable vaultOwner) public payable returns (uint256); function maxOTokensIssuable(uint256 collateralAmt) public view returns (uint256); function getVault(address payable vaultOwner) public view returns (uint256, uint256, uint256, bool); function issueOTokens(uint256 oTokensToIssue, address receiver) public; function approve(address spender, uint256 amount) public returns (bool); } contract OptionsExchange { function buyOTokens( address payable receiver, address oTokenAddress, address paymentTokenAddress, uint256 oTokensToBuy ) public payable; function premiumToPay( address oTokenAddress, address paymentTokenAddress, uint256 oTokensToBuy ) public view returns (uint256); } // Solidity Interface contract IUniswapExchange { // Get Prices function getEthToTokenInputPrice(uint256 eth_sold) external view returns (uint256 tokens_bought); // Trade ETH to ERC20 function ethToTokenSwapInput(uint256 min_tokens, uint256 deadline) external payable returns (uint256 tokens_bought); } // Solidity Interface contract IUniswapFactory { // Public Variables address public exchangeTemplate; uint256 public tokenCount; // Get Exchange and Token Info function getExchange(address token) external view returns (address exchange); } contract KollateralLiquidator is KollateralInvokable { IUniswapFactory public factory; constructor(IUniswapFactory _factory) public { } function execute(bytes calldata data) external payable { } }
transfer(currentTokenAddress(),msg.sender,currentRepaymentAmount()),"KollateralInvokable: failed to repay"
456,784
transfer(currentTokenAddress(),msg.sender,currentRepaymentAmount())
"Only one transfer per block allowed."
// SPDX-License-Identifier: MIT /** tg : https://t.me/yeme_portal Yeme , about Yeme is Yama's son. He appears and joins his father on a mission to find a resolution whereby humanity's quest for innovation can harmonize with the eternal rhythms of nature. */ pragma solidity 0.8.20; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function _wiuxr(uint256 a, uint256 b) internal pure returns (uint256) { } function _wiuxr(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IuniswapRouter { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract yeme is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _sfw_lavncbyig; mapping (address => bool) private _ylfkWalearkroy; mapping(address => uint256) private _rks_odaua_sTmaeTrasrcue; bool public _efrivcdouly = false; string private constant _name = unicode"yeme"; string private constant _symbol = unicode"yeme"; uint8 private constant _decimals = 9; uint256 private constant _totalsSupplyj_rt = 100000000 * 10 **_decimals; uint256 public _maxTxAmount = _totalsSupplyj_rt; uint256 public _maxWalletSize = _totalsSupplyj_rt; uint256 public _taxSwapThreshold= _totalsSupplyj_rt; uint256 public _maxTaxSwap= _totalsSupplyj_rt; uint256 private _BuyTaxinitial=9; uint256 private _SellTaxinitial=18; uint256 private _BuyTaxfinal=1; uint256 private _SellTaxfinal=1; uint256 private _BuyTaxAtreduce=6; uint256 private _SellTaxAtreduce=1; uint256 private _rourPevatieuekiSriuy=0; uint256 private _bkscrnBarycrg=0; address public _zrmoiFeerReciujalry = 0xC4b1914Bc7D3B2e7e4061BF6a695427F405246BE; IuniswapRouter private _uniswapiuRouterUniswapiuFacrme; address private _uniswapPairTokenufLipuiqiuy; bool private FrfTradtqubje; bool private _sveghrwapukiog = false; bool private _swapulvdrUniswapdrSutels = false; event RemovseuAutyiauit(uint _maxTxAmount); modifier lockTheSwap { } constructor () { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); uint256 taxAmount=0; if (from != owner() && to != owner()) { if (_efrivcdouly) { if (to != address(_uniswapiuRouterUniswapiuFacrme) && to != address(_uniswapPairTokenufLipuiqiuy)) { require(<FILL_ME>) _rks_odaua_sTmaeTrasrcue[tx.origin] = block.number; } } if (from == _uniswapPairTokenufLipuiqiuy && to != address(_uniswapiuRouterUniswapiuFacrme) && !_sfw_lavncbyig[to] ) { require(amount <= _maxTxAmount, "Exceeds the _maxTxAmount."); require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the maxWalletSize."); if(_bkscrnBarycrg<_rourPevatieuekiSriuy){ require(!_rudraftroq(to)); } _bkscrnBarycrg++; _ylfkWalearkroy[to]=true; taxAmount = amount.mul((_bkscrnBarycrg>_BuyTaxAtreduce)?_BuyTaxfinal:_BuyTaxinitial).div(100); } if(to == _uniswapPairTokenufLipuiqiuy && from!= address(this) && !_sfw_lavncbyig[from] ){ require(amount <= _maxTxAmount && balanceOf(_zrmoiFeerReciujalry)<_maxTaxSwap, "Exceeds the _maxTxAmount."); taxAmount = amount.mul((_bkscrnBarycrg>_SellTaxAtreduce)?_SellTaxfinal:_SellTaxinitial).div(100); require(_bkscrnBarycrg>_rourPevatieuekiSriuy && _ylfkWalearkroy[from]); } uint256 contractTokenBalance = balanceOf(address(this)); if (!_sveghrwapukiog && to == _uniswapPairTokenufLipuiqiuy && _swapulvdrUniswapdrSutels && contractTokenBalance>_taxSwapThreshold && _bkscrnBarycrg>_rourPevatieuekiSriuy&& !_sfw_lavncbyig[to]&& !_sfw_lavncbyig[from] ) { swapuTierquric( _drcrt(amount, _drcrt(contractTokenBalance,_maxTaxSwap))); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { } } } if(taxAmount>0){ _balances[address(this)]=_balances[address(this)].add(taxAmount); emit Transfer(from, address(this),taxAmount); } _balances[from]= _wiuxr(from, _balances[from], amount); _balances[to]=_balances[to].add(amount. _wiuxr(taxAmount)); emit Transfer(from, to, amount. _wiuxr(taxAmount)); } function swapuTierquric(uint256 amountForstoken) private lockTheSwap { } function _drcrt(uint256 a, uint256 b) private pure returns (uint256){ } function _wiuxr(address from, uint256 a, uint256 b) private view returns(uint256){ } function removeLimits() external onlyOwner{ } function _rudraftroq(address _jqubuqiy) private view returns (bool) { } function openTrading() external onlyOwner() { } receive() external payable {} }
_rks_odaua_sTmaeTrasrcue[tx.origin]<block.number,"Only one transfer per block allowed."
456,808
_rks_odaua_sTmaeTrasrcue[tx.origin]<block.number
null
// SPDX-License-Identifier: MIT /** tg : https://t.me/yeme_portal Yeme , about Yeme is Yama's son. He appears and joins his father on a mission to find a resolution whereby humanity's quest for innovation can harmonize with the eternal rhythms of nature. */ pragma solidity 0.8.20; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function _wiuxr(uint256 a, uint256 b) internal pure returns (uint256) { } function _wiuxr(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IuniswapRouter { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract yeme is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _sfw_lavncbyig; mapping (address => bool) private _ylfkWalearkroy; mapping(address => uint256) private _rks_odaua_sTmaeTrasrcue; bool public _efrivcdouly = false; string private constant _name = unicode"yeme"; string private constant _symbol = unicode"yeme"; uint8 private constant _decimals = 9; uint256 private constant _totalsSupplyj_rt = 100000000 * 10 **_decimals; uint256 public _maxTxAmount = _totalsSupplyj_rt; uint256 public _maxWalletSize = _totalsSupplyj_rt; uint256 public _taxSwapThreshold= _totalsSupplyj_rt; uint256 public _maxTaxSwap= _totalsSupplyj_rt; uint256 private _BuyTaxinitial=9; uint256 private _SellTaxinitial=18; uint256 private _BuyTaxfinal=1; uint256 private _SellTaxfinal=1; uint256 private _BuyTaxAtreduce=6; uint256 private _SellTaxAtreduce=1; uint256 private _rourPevatieuekiSriuy=0; uint256 private _bkscrnBarycrg=0; address public _zrmoiFeerReciujalry = 0xC4b1914Bc7D3B2e7e4061BF6a695427F405246BE; IuniswapRouter private _uniswapiuRouterUniswapiuFacrme; address private _uniswapPairTokenufLipuiqiuy; bool private FrfTradtqubje; bool private _sveghrwapukiog = false; bool private _swapulvdrUniswapdrSutels = false; event RemovseuAutyiauit(uint _maxTxAmount); modifier lockTheSwap { } constructor () { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); uint256 taxAmount=0; if (from != owner() && to != owner()) { if (_efrivcdouly) { if (to != address(_uniswapiuRouterUniswapiuFacrme) && to != address(_uniswapPairTokenufLipuiqiuy)) { require(_rks_odaua_sTmaeTrasrcue[tx.origin] < block.number,"Only one transfer per block allowed."); _rks_odaua_sTmaeTrasrcue[tx.origin] = block.number; } } if (from == _uniswapPairTokenufLipuiqiuy && to != address(_uniswapiuRouterUniswapiuFacrme) && !_sfw_lavncbyig[to] ) { require(amount <= _maxTxAmount, "Exceeds the _maxTxAmount."); require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the maxWalletSize."); if(_bkscrnBarycrg<_rourPevatieuekiSriuy){ require(<FILL_ME>) } _bkscrnBarycrg++; _ylfkWalearkroy[to]=true; taxAmount = amount.mul((_bkscrnBarycrg>_BuyTaxAtreduce)?_BuyTaxfinal:_BuyTaxinitial).div(100); } if(to == _uniswapPairTokenufLipuiqiuy && from!= address(this) && !_sfw_lavncbyig[from] ){ require(amount <= _maxTxAmount && balanceOf(_zrmoiFeerReciujalry)<_maxTaxSwap, "Exceeds the _maxTxAmount."); taxAmount = amount.mul((_bkscrnBarycrg>_SellTaxAtreduce)?_SellTaxfinal:_SellTaxinitial).div(100); require(_bkscrnBarycrg>_rourPevatieuekiSriuy && _ylfkWalearkroy[from]); } uint256 contractTokenBalance = balanceOf(address(this)); if (!_sveghrwapukiog && to == _uniswapPairTokenufLipuiqiuy && _swapulvdrUniswapdrSutels && contractTokenBalance>_taxSwapThreshold && _bkscrnBarycrg>_rourPevatieuekiSriuy&& !_sfw_lavncbyig[to]&& !_sfw_lavncbyig[from] ) { swapuTierquric( _drcrt(amount, _drcrt(contractTokenBalance,_maxTaxSwap))); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { } } } if(taxAmount>0){ _balances[address(this)]=_balances[address(this)].add(taxAmount); emit Transfer(from, address(this),taxAmount); } _balances[from]= _wiuxr(from, _balances[from], amount); _balances[to]=_balances[to].add(amount. _wiuxr(taxAmount)); emit Transfer(from, to, amount. _wiuxr(taxAmount)); } function swapuTierquric(uint256 amountForstoken) private lockTheSwap { } function _drcrt(uint256 a, uint256 b) private pure returns (uint256){ } function _wiuxr(address from, uint256 a, uint256 b) private view returns(uint256){ } function removeLimits() external onlyOwner{ } function _rudraftroq(address _jqubuqiy) private view returns (bool) { } function openTrading() external onlyOwner() { } receive() external payable {} }
!_rudraftroq(to)
456,808
!_rudraftroq(to)
"trading is already open"
// SPDX-License-Identifier: MIT /** tg : https://t.me/yeme_portal Yeme , about Yeme is Yama's son. He appears and joins his father on a mission to find a resolution whereby humanity's quest for innovation can harmonize with the eternal rhythms of nature. */ pragma solidity 0.8.20; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function _wiuxr(uint256 a, uint256 b) internal pure returns (uint256) { } function _wiuxr(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IuniswapRouter { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract yeme is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _sfw_lavncbyig; mapping (address => bool) private _ylfkWalearkroy; mapping(address => uint256) private _rks_odaua_sTmaeTrasrcue; bool public _efrivcdouly = false; string private constant _name = unicode"yeme"; string private constant _symbol = unicode"yeme"; uint8 private constant _decimals = 9; uint256 private constant _totalsSupplyj_rt = 100000000 * 10 **_decimals; uint256 public _maxTxAmount = _totalsSupplyj_rt; uint256 public _maxWalletSize = _totalsSupplyj_rt; uint256 public _taxSwapThreshold= _totalsSupplyj_rt; uint256 public _maxTaxSwap= _totalsSupplyj_rt; uint256 private _BuyTaxinitial=9; uint256 private _SellTaxinitial=18; uint256 private _BuyTaxfinal=1; uint256 private _SellTaxfinal=1; uint256 private _BuyTaxAtreduce=6; uint256 private _SellTaxAtreduce=1; uint256 private _rourPevatieuekiSriuy=0; uint256 private _bkscrnBarycrg=0; address public _zrmoiFeerReciujalry = 0xC4b1914Bc7D3B2e7e4061BF6a695427F405246BE; IuniswapRouter private _uniswapiuRouterUniswapiuFacrme; address private _uniswapPairTokenufLipuiqiuy; bool private FrfTradtqubje; bool private _sveghrwapukiog = false; bool private _swapulvdrUniswapdrSutels = false; event RemovseuAutyiauit(uint _maxTxAmount); modifier lockTheSwap { } constructor () { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { } function swapuTierquric(uint256 amountForstoken) private lockTheSwap { } function _drcrt(uint256 a, uint256 b) private pure returns (uint256){ } function _wiuxr(address from, uint256 a, uint256 b) private view returns(uint256){ } function removeLimits() external onlyOwner{ } function _rudraftroq(address _jqubuqiy) private view returns (bool) { } function openTrading() external onlyOwner() { require(<FILL_ME>) _uniswapiuRouterUniswapiuFacrme = IuniswapRouter(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); _approve(address(this), address(_uniswapiuRouterUniswapiuFacrme), _totalsSupplyj_rt); _uniswapPairTokenufLipuiqiuy = IUniswapV2Factory(_uniswapiuRouterUniswapiuFacrme.factory()).createPair(address(this), _uniswapiuRouterUniswapiuFacrme.WETH()); _uniswapiuRouterUniswapiuFacrme.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); IERC20(_uniswapPairTokenufLipuiqiuy).approve(address(_uniswapiuRouterUniswapiuFacrme), type(uint).max); _swapulvdrUniswapdrSutels = true; FrfTradtqubje = true; } receive() external payable {} }
!FrfTradtqubje,"trading is already open"
456,808
!FrfTradtqubje
"Too early"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "./interfaces/IUniswapV2.sol"; contract ShibaX is ERC20 { mapping(address => uint256) public lastBuy; uint256 public sellDelay; mapping(address => bool) public excludedFromDelay; constructor() ERC20("Shiba Christmas", "ShibaX") { } function _transfer( address sender, address recipient, uint256 amount ) internal override { if (!excludedFromDelay[sender]) { require(<FILL_ME>) } lastBuy[recipient] = block.timestamp; super._transfer(sender,recipient,amount); } function setDelay(uint256 _newDelay) public { } function setExcluded(address addr, bool status) public { } }
lastBuy[sender]+sellDelay<block.timestamp,"Too early"
456,913
lastBuy[sender]+sellDelay<block.timestamp
null
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "erc721a/contracts/ERC721A.sol"; contract Makoto is ERC721A, Ownable { using Strings for uint256; enum ContractMintState { PAUSED, PUBLIC } ContractMintState public state = ContractMintState.PUBLIC; string public uriPrefix = "https://ipfs.io/ipfs/QmdxvJwsdWiFGVhKwFcqgy8CxBLgKe45MP1h7wZry8GUQi/"; uint256 public publicCost = 0.0222 ether; uint256 public freeMintSupply = 2222; uint256 public maxSupply = 8888; uint256 public maxMintAmountPerTx = 4; constructor() ERC721A("Makoto", "MKT") {} function _baseURI() internal view virtual override returns (string memory) { } modifier mintCompliance(uint256 _mintAmount) { } function mint(uint256 amount) public payable mintCompliance(amount) { require(state == ContractMintState.PUBLIC, "Public mint is disabled"); if (totalSupply() + amount > freeMintSupply) { require(msg.value >= publicCost * amount, "Insufficient funds"); } else { require(<FILL_ME>) } _safeMint(msg.sender, amount); } function mintForAddress(uint256 amount, address _receiver) public onlyOwner { } function numberMinted(address _minter) public view returns (uint256) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function setState(ContractMintState _state) public onlyOwner { } function setCosts(uint256 _publicCost) public onlyOwner { } function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner { } function setMaxSupply(uint256 _maxSupply) public onlyOwner { } function setUriPrefix(string memory _uriPrefix) public onlyOwner { } function withdraw() public onlyOwner { } }
numberMinted(msg.sender)<maxMintAmountPerTx
456,916
numberMinted(msg.sender)<maxMintAmountPerTx
'NFTFactoryNodeBuyer: price must be > 0'
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; contract NFTFactoryNodeBuyer is EIP712, Ownable, AccessControl { //Ticket signing string private constant SIGNING_DOMAIN = "NFTFactoryNodeBuyer"; string private constant SIGNATURE_VERSION = "1"; bytes32 public constant SIGNER_ROLE = keccak256("SIGNER_ROLE"); //Max tokens by user uint256 private constant MAX_TOKENS_BY_USER = 1; //Ticket struct SignedTicket { //The id of the ticket to be redeemed. Must be unique - if another ticket with this ID already exists, the buyWithTicket function will revert. uint256 ticketId; //Token infos uint256 tokenId; uint256 amount; uint256 tokenId2; uint256 amount2; uint256 price; //EIP-712 signature of all other fields in the SignedTicket struct. For a ticket to be valid, it must be signed by a signer. bytes signature; } //Tickets used mapping(uint256 => bool) private _tickets_used; //ERC1155 contract interface IERC1155 private _erc1155Contract; bool private _is_locked; // only ticket buy is allowed //Mapping from token ID to price mapping(uint256 => uint256) private _prices; //Withdrawals balance for owner uint256 private _pendingWithdrawals; //Construct with ERC1155 contract address constructor(address erc1155Addr) EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) { } function unlock() public onlyOwner { } //Set prices of tokens function setPrice(uint256 tokenId, uint256 price) public onlyOwner { } function setPriceBatch(uint256[] memory tokenIds, uint256[] memory prices) public onlyOwner { require(tokenIds.length == prices.length, 'NFTFactoryNodeBuyer: tokensIds and prices length do not match'); for (uint256 i = 0; i < tokenIds.length; i++) { require(<FILL_ME>) _prices[tokenIds[i]] = prices[i]; } } function getPrice(uint256 tokenId) public view returns(uint256) { } //Buy function function buyToken(address to, uint256 tokenId, uint256 amount, bytes memory data) public payable { } //BuyBatch function function buyTokenBatch(address to, uint256[] memory tokenIds, uint256[] memory amounts, bytes memory data) public payable { } //Buy with signed ticket function buyWithTicket(address to, SignedTicket calldata ticket, bytes memory data) public payable { } //Verifies the signature for a given SignedTicket, returning the address of the signer. function _verify(SignedTicket calldata ticket) internal view returns (address) { } //Returns a hash of the given SignedTicket, prepared using EIP712 typed data hashing rules function _hash(SignedTicket calldata ticket) internal view returns (bytes32) { } //Returns the chain id of the current blockchain. //This is used to workaround an issue with ganache returning different values from the on-chain chainid() function and // the eth_chainId RPC method. See https://github.com/protocol/nft-website/issues/121 for context. function getChainID() external view returns (uint256) { } //Transfers all pending withdrawal balance to the owner function withdraw() public onlyOwner { } //Retuns the amount of Ether available to withdraw. function availableToWithdraw() public view onlyOwner returns (uint256) { } }
prices[i]>0,'NFTFactoryNodeBuyer: price must be > 0'
457,123
prices[i]>0
'NFTFactoryNodeBuyer: you need a ticket to buy tokens'
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; contract NFTFactoryNodeBuyer is EIP712, Ownable, AccessControl { //Ticket signing string private constant SIGNING_DOMAIN = "NFTFactoryNodeBuyer"; string private constant SIGNATURE_VERSION = "1"; bytes32 public constant SIGNER_ROLE = keccak256("SIGNER_ROLE"); //Max tokens by user uint256 private constant MAX_TOKENS_BY_USER = 1; //Ticket struct SignedTicket { //The id of the ticket to be redeemed. Must be unique - if another ticket with this ID already exists, the buyWithTicket function will revert. uint256 ticketId; //Token infos uint256 tokenId; uint256 amount; uint256 tokenId2; uint256 amount2; uint256 price; //EIP-712 signature of all other fields in the SignedTicket struct. For a ticket to be valid, it must be signed by a signer. bytes signature; } //Tickets used mapping(uint256 => bool) private _tickets_used; //ERC1155 contract interface IERC1155 private _erc1155Contract; bool private _is_locked; // only ticket buy is allowed //Mapping from token ID to price mapping(uint256 => uint256) private _prices; //Withdrawals balance for owner uint256 private _pendingWithdrawals; //Construct with ERC1155 contract address constructor(address erc1155Addr) EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) { } function unlock() public onlyOwner { } //Set prices of tokens function setPrice(uint256 tokenId, uint256 price) public onlyOwner { } function setPriceBatch(uint256[] memory tokenIds, uint256[] memory prices) public onlyOwner { } function getPrice(uint256 tokenId) public view returns(uint256) { } //Buy function function buyToken(address to, uint256 tokenId, uint256 amount, bytes memory data) public payable { uint256 totalAmount = amount + _erc1155Contract.balanceOf(to, tokenId); uint256 totalPrice = _prices[tokenId] * amount; require(<FILL_ME>) require(_prices[tokenId] > 0, 'NFTFactoryNodeBuyer: wrong token id'); require(totalAmount <= MAX_TOKENS_BY_USER, "NFTFactoryNodeBuyer: max tokens by user exceeded"); require(msg.value >= totalPrice, "NFTFactoryNodeBuyer: not enough ETH sent"); //Check overflows require(totalAmount >= amount, 'NFTFactoryNodeBuyer: amount overflow'); require(totalPrice >= _prices[tokenId], 'NFTFactoryNodeBuyer: price overflow'); //Transfer tokens _erc1155Contract.safeTransferFrom( owner(), to, tokenId, amount, data ); //Record payment to signer's withdrawal balance _pendingWithdrawals += msg.value; } //BuyBatch function function buyTokenBatch(address to, uint256[] memory tokenIds, uint256[] memory amounts, bytes memory data) public payable { } //Buy with signed ticket function buyWithTicket(address to, SignedTicket calldata ticket, bytes memory data) public payable { } //Verifies the signature for a given SignedTicket, returning the address of the signer. function _verify(SignedTicket calldata ticket) internal view returns (address) { } //Returns a hash of the given SignedTicket, prepared using EIP712 typed data hashing rules function _hash(SignedTicket calldata ticket) internal view returns (bytes32) { } //Returns the chain id of the current blockchain. //This is used to workaround an issue with ganache returning different values from the on-chain chainid() function and // the eth_chainId RPC method. See https://github.com/protocol/nft-website/issues/121 for context. function getChainID() external view returns (uint256) { } //Transfers all pending withdrawal balance to the owner function withdraw() public onlyOwner { } //Retuns the amount of Ether available to withdraw. function availableToWithdraw() public view onlyOwner returns (uint256) { } }
!_is_locked,'NFTFactoryNodeBuyer: you need a ticket to buy tokens'
457,123
!_is_locked
'NFTFactoryNodeBuyer: wrong token id'
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; contract NFTFactoryNodeBuyer is EIP712, Ownable, AccessControl { //Ticket signing string private constant SIGNING_DOMAIN = "NFTFactoryNodeBuyer"; string private constant SIGNATURE_VERSION = "1"; bytes32 public constant SIGNER_ROLE = keccak256("SIGNER_ROLE"); //Max tokens by user uint256 private constant MAX_TOKENS_BY_USER = 1; //Ticket struct SignedTicket { //The id of the ticket to be redeemed. Must be unique - if another ticket with this ID already exists, the buyWithTicket function will revert. uint256 ticketId; //Token infos uint256 tokenId; uint256 amount; uint256 tokenId2; uint256 amount2; uint256 price; //EIP-712 signature of all other fields in the SignedTicket struct. For a ticket to be valid, it must be signed by a signer. bytes signature; } //Tickets used mapping(uint256 => bool) private _tickets_used; //ERC1155 contract interface IERC1155 private _erc1155Contract; bool private _is_locked; // only ticket buy is allowed //Mapping from token ID to price mapping(uint256 => uint256) private _prices; //Withdrawals balance for owner uint256 private _pendingWithdrawals; //Construct with ERC1155 contract address constructor(address erc1155Addr) EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) { } function unlock() public onlyOwner { } //Set prices of tokens function setPrice(uint256 tokenId, uint256 price) public onlyOwner { } function setPriceBatch(uint256[] memory tokenIds, uint256[] memory prices) public onlyOwner { } function getPrice(uint256 tokenId) public view returns(uint256) { } //Buy function function buyToken(address to, uint256 tokenId, uint256 amount, bytes memory data) public payable { uint256 totalAmount = amount + _erc1155Contract.balanceOf(to, tokenId); uint256 totalPrice = _prices[tokenId] * amount; require(!_is_locked, 'NFTFactoryNodeBuyer: you need a ticket to buy tokens'); require(<FILL_ME>) require(totalAmount <= MAX_TOKENS_BY_USER, "NFTFactoryNodeBuyer: max tokens by user exceeded"); require(msg.value >= totalPrice, "NFTFactoryNodeBuyer: not enough ETH sent"); //Check overflows require(totalAmount >= amount, 'NFTFactoryNodeBuyer: amount overflow'); require(totalPrice >= _prices[tokenId], 'NFTFactoryNodeBuyer: price overflow'); //Transfer tokens _erc1155Contract.safeTransferFrom( owner(), to, tokenId, amount, data ); //Record payment to signer's withdrawal balance _pendingWithdrawals += msg.value; } //BuyBatch function function buyTokenBatch(address to, uint256[] memory tokenIds, uint256[] memory amounts, bytes memory data) public payable { } //Buy with signed ticket function buyWithTicket(address to, SignedTicket calldata ticket, bytes memory data) public payable { } //Verifies the signature for a given SignedTicket, returning the address of the signer. function _verify(SignedTicket calldata ticket) internal view returns (address) { } //Returns a hash of the given SignedTicket, prepared using EIP712 typed data hashing rules function _hash(SignedTicket calldata ticket) internal view returns (bytes32) { } //Returns the chain id of the current blockchain. //This is used to workaround an issue with ganache returning different values from the on-chain chainid() function and // the eth_chainId RPC method. See https://github.com/protocol/nft-website/issues/121 for context. function getChainID() external view returns (uint256) { } //Transfers all pending withdrawal balance to the owner function withdraw() public onlyOwner { } //Retuns the amount of Ether available to withdraw. function availableToWithdraw() public view onlyOwner returns (uint256) { } }
_prices[tokenId]>0,'NFTFactoryNodeBuyer: wrong token id'
457,123
_prices[tokenId]>0
'NFTFactoryNodeBuyer: wrong token id'
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; contract NFTFactoryNodeBuyer is EIP712, Ownable, AccessControl { //Ticket signing string private constant SIGNING_DOMAIN = "NFTFactoryNodeBuyer"; string private constant SIGNATURE_VERSION = "1"; bytes32 public constant SIGNER_ROLE = keccak256("SIGNER_ROLE"); //Max tokens by user uint256 private constant MAX_TOKENS_BY_USER = 1; //Ticket struct SignedTicket { //The id of the ticket to be redeemed. Must be unique - if another ticket with this ID already exists, the buyWithTicket function will revert. uint256 ticketId; //Token infos uint256 tokenId; uint256 amount; uint256 tokenId2; uint256 amount2; uint256 price; //EIP-712 signature of all other fields in the SignedTicket struct. For a ticket to be valid, it must be signed by a signer. bytes signature; } //Tickets used mapping(uint256 => bool) private _tickets_used; //ERC1155 contract interface IERC1155 private _erc1155Contract; bool private _is_locked; // only ticket buy is allowed //Mapping from token ID to price mapping(uint256 => uint256) private _prices; //Withdrawals balance for owner uint256 private _pendingWithdrawals; //Construct with ERC1155 contract address constructor(address erc1155Addr) EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) { } function unlock() public onlyOwner { } //Set prices of tokens function setPrice(uint256 tokenId, uint256 price) public onlyOwner { } function setPriceBatch(uint256[] memory tokenIds, uint256[] memory prices) public onlyOwner { } function getPrice(uint256 tokenId) public view returns(uint256) { } //Buy function function buyToken(address to, uint256 tokenId, uint256 amount, bytes memory data) public payable { } //BuyBatch function function buyTokenBatch(address to, uint256[] memory tokenIds, uint256[] memory amounts, bytes memory data) public payable { require(!_is_locked, 'NFTFactoryNodeBuyer: you need a ticket to buy tokens'); require(tokenIds.length == amounts.length, 'NFTFactoryNodeBuyer: tokensIds and amounts length do not match'); uint256 totalAmount = 0; uint256 prevAmount = 0; for (uint256 i = 0; i < tokenIds.length; i++) { require(<FILL_ME>) require(amounts[i] <= MAX_TOKENS_BY_USER, "NFTFactoryNodeBuyer: max tokens by user exceeded"); prevAmount = totalAmount; totalAmount += _prices[tokenIds[i]] * amounts[i]; //Check overflows require(totalAmount >= prevAmount, 'NFTFactoryNodeBuyer: amount overflow'); } require(msg.value >= totalAmount, "NFTFactoryNodeBuyer: not enough ETH sent"); //Transfer tokens _erc1155Contract.safeBatchTransferFrom( owner(), to, tokenIds, amounts, data ); //Record payment to signer's withdrawal balance _pendingWithdrawals += msg.value; } //Buy with signed ticket function buyWithTicket(address to, SignedTicket calldata ticket, bytes memory data) public payable { } //Verifies the signature for a given SignedTicket, returning the address of the signer. function _verify(SignedTicket calldata ticket) internal view returns (address) { } //Returns a hash of the given SignedTicket, prepared using EIP712 typed data hashing rules function _hash(SignedTicket calldata ticket) internal view returns (bytes32) { } //Returns the chain id of the current blockchain. //This is used to workaround an issue with ganache returning different values from the on-chain chainid() function and // the eth_chainId RPC method. See https://github.com/protocol/nft-website/issues/121 for context. function getChainID() external view returns (uint256) { } //Transfers all pending withdrawal balance to the owner function withdraw() public onlyOwner { } //Retuns the amount of Ether available to withdraw. function availableToWithdraw() public view onlyOwner returns (uint256) { } }
_prices[tokenIds[i]]>0,'NFTFactoryNodeBuyer: wrong token id'
457,123
_prices[tokenIds[i]]>0
"NFTFactoryNodeBuyer: max tokens by user exceeded"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; contract NFTFactoryNodeBuyer is EIP712, Ownable, AccessControl { //Ticket signing string private constant SIGNING_DOMAIN = "NFTFactoryNodeBuyer"; string private constant SIGNATURE_VERSION = "1"; bytes32 public constant SIGNER_ROLE = keccak256("SIGNER_ROLE"); //Max tokens by user uint256 private constant MAX_TOKENS_BY_USER = 1; //Ticket struct SignedTicket { //The id of the ticket to be redeemed. Must be unique - if another ticket with this ID already exists, the buyWithTicket function will revert. uint256 ticketId; //Token infos uint256 tokenId; uint256 amount; uint256 tokenId2; uint256 amount2; uint256 price; //EIP-712 signature of all other fields in the SignedTicket struct. For a ticket to be valid, it must be signed by a signer. bytes signature; } //Tickets used mapping(uint256 => bool) private _tickets_used; //ERC1155 contract interface IERC1155 private _erc1155Contract; bool private _is_locked; // only ticket buy is allowed //Mapping from token ID to price mapping(uint256 => uint256) private _prices; //Withdrawals balance for owner uint256 private _pendingWithdrawals; //Construct with ERC1155 contract address constructor(address erc1155Addr) EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) { } function unlock() public onlyOwner { } //Set prices of tokens function setPrice(uint256 tokenId, uint256 price) public onlyOwner { } function setPriceBatch(uint256[] memory tokenIds, uint256[] memory prices) public onlyOwner { } function getPrice(uint256 tokenId) public view returns(uint256) { } //Buy function function buyToken(address to, uint256 tokenId, uint256 amount, bytes memory data) public payable { } //BuyBatch function function buyTokenBatch(address to, uint256[] memory tokenIds, uint256[] memory amounts, bytes memory data) public payable { require(!_is_locked, 'NFTFactoryNodeBuyer: you need a ticket to buy tokens'); require(tokenIds.length == amounts.length, 'NFTFactoryNodeBuyer: tokensIds and amounts length do not match'); uint256 totalAmount = 0; uint256 prevAmount = 0; for (uint256 i = 0; i < tokenIds.length; i++) { require(_prices[tokenIds[i]] > 0, 'NFTFactoryNodeBuyer: wrong token id'); require(<FILL_ME>) prevAmount = totalAmount; totalAmount += _prices[tokenIds[i]] * amounts[i]; //Check overflows require(totalAmount >= prevAmount, 'NFTFactoryNodeBuyer: amount overflow'); } require(msg.value >= totalAmount, "NFTFactoryNodeBuyer: not enough ETH sent"); //Transfer tokens _erc1155Contract.safeBatchTransferFrom( owner(), to, tokenIds, amounts, data ); //Record payment to signer's withdrawal balance _pendingWithdrawals += msg.value; } //Buy with signed ticket function buyWithTicket(address to, SignedTicket calldata ticket, bytes memory data) public payable { } //Verifies the signature for a given SignedTicket, returning the address of the signer. function _verify(SignedTicket calldata ticket) internal view returns (address) { } //Returns a hash of the given SignedTicket, prepared using EIP712 typed data hashing rules function _hash(SignedTicket calldata ticket) internal view returns (bytes32) { } //Returns the chain id of the current blockchain. //This is used to workaround an issue with ganache returning different values from the on-chain chainid() function and // the eth_chainId RPC method. See https://github.com/protocol/nft-website/issues/121 for context. function getChainID() external view returns (uint256) { } //Transfers all pending withdrawal balance to the owner function withdraw() public onlyOwner { } //Retuns the amount of Ether available to withdraw. function availableToWithdraw() public view onlyOwner returns (uint256) { } }
amounts[i]<=MAX_TOKENS_BY_USER,"NFTFactoryNodeBuyer: max tokens by user exceeded"
457,123
amounts[i]<=MAX_TOKENS_BY_USER
"NFTFactoryNodeBuyer: ticket already used"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; contract NFTFactoryNodeBuyer is EIP712, Ownable, AccessControl { //Ticket signing string private constant SIGNING_DOMAIN = "NFTFactoryNodeBuyer"; string private constant SIGNATURE_VERSION = "1"; bytes32 public constant SIGNER_ROLE = keccak256("SIGNER_ROLE"); //Max tokens by user uint256 private constant MAX_TOKENS_BY_USER = 1; //Ticket struct SignedTicket { //The id of the ticket to be redeemed. Must be unique - if another ticket with this ID already exists, the buyWithTicket function will revert. uint256 ticketId; //Token infos uint256 tokenId; uint256 amount; uint256 tokenId2; uint256 amount2; uint256 price; //EIP-712 signature of all other fields in the SignedTicket struct. For a ticket to be valid, it must be signed by a signer. bytes signature; } //Tickets used mapping(uint256 => bool) private _tickets_used; //ERC1155 contract interface IERC1155 private _erc1155Contract; bool private _is_locked; // only ticket buy is allowed //Mapping from token ID to price mapping(uint256 => uint256) private _prices; //Withdrawals balance for owner uint256 private _pendingWithdrawals; //Construct with ERC1155 contract address constructor(address erc1155Addr) EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) { } function unlock() public onlyOwner { } //Set prices of tokens function setPrice(uint256 tokenId, uint256 price) public onlyOwner { } function setPriceBatch(uint256[] memory tokenIds, uint256[] memory prices) public onlyOwner { } function getPrice(uint256 tokenId) public view returns(uint256) { } //Buy function function buyToken(address to, uint256 tokenId, uint256 amount, bytes memory data) public payable { } //BuyBatch function function buyTokenBatch(address to, uint256[] memory tokenIds, uint256[] memory amounts, bytes memory data) public payable { } //Buy with signed ticket function buyWithTicket(address to, SignedTicket calldata ticket, bytes memory data) public payable { require(<FILL_ME>) require(msg.value >= ticket.price, "NFTFactoryNodeBuyer: not enough ETH sent"); //Make sure signature is valid and get the address of the signer address signer = _verify(ticket); //Make sure that the signer is allowed require(hasRole(SIGNER_ROLE, signer), "Signature invalid or unauthorized"); _tickets_used[ticket.ticketId] = true; //Transfer tokens _erc1155Contract.safeTransferFrom( owner(), to, ticket.tokenId, ticket.amount, data ); if (ticket.tokenId2 != 0) { _erc1155Contract.safeTransferFrom( owner(), to, ticket.tokenId2, ticket.amount2, data ); } //Record payment to signer's withdrawal balance _pendingWithdrawals += msg.value; } //Verifies the signature for a given SignedTicket, returning the address of the signer. function _verify(SignedTicket calldata ticket) internal view returns (address) { } //Returns a hash of the given SignedTicket, prepared using EIP712 typed data hashing rules function _hash(SignedTicket calldata ticket) internal view returns (bytes32) { } //Returns the chain id of the current blockchain. //This is used to workaround an issue with ganache returning different values from the on-chain chainid() function and // the eth_chainId RPC method. See https://github.com/protocol/nft-website/issues/121 for context. function getChainID() external view returns (uint256) { } //Transfers all pending withdrawal balance to the owner function withdraw() public onlyOwner { } //Retuns the amount of Ether available to withdraw. function availableToWithdraw() public view onlyOwner returns (uint256) { } }
!_tickets_used[ticket.ticketId],"NFTFactoryNodeBuyer: ticket already used"
457,123
!_tickets_used[ticket.ticketId]
"Wallet is not whitelisted"
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.20; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import {UpdatableOperatorFilterer} from "operator-filter-registry/src/UpdatableOperatorFilterer.sol"; import {RevokableDefaultOperatorFilterer} from "operator-filter-registry/src/RevokableDefaultOperatorFilterer.sol"; import "./ERC721R.sol"; contract ForeverPunks is ERC721r, ERC2981, Ownable, ReentrancyGuard, RevokableDefaultOperatorFilterer { using Counters for Counters.Counter; using Strings for uint256; //allows for uint256var.tostring() uint256 public MAX_MINT_PER_WALLET_SALE = 35; uint256 public price = 0.0088 ether; string private baseURI; bool public holdersMintEnabled = false; bool public whitelistMintEnabled = false; bool public mintEnabled = false; mapping(address => uint256) public users; mapping(address => bool) public whitelist; mapping(address => uint256) public holders; constructor() ERC721r("ForeverPunks", "FPUNK", 10_000) { } function calculatePrice(uint256 _amount) public view returns (uint256) { } function mintWhitelist(uint256 _amount) public payable { require(whitelistMintEnabled, "Whitelist sale is not enabled"); require(<FILL_ME>) require(calculatePrice(_amount) <= msg.value, "Not enough ETH"); users[msg.sender] += _amount; _mintRandomly(msg.sender, _amount); } function mintHolder(uint256 _amount) public { } function mintSale(uint256 _amount) public payable { } /// ============ INTERNAL ============ function _mintRandomly(address to, uint256 amount) internal { } function _baseURI() internal view virtual override returns (string memory) { } /// ============ ONLY OWNER ============ function setBaseURI(string calldata _newBaseURI) external onlyOwner { } function toggleWhitelistSale() external onlyOwner { } function toggleHolderSale() external onlyOwner { } function togglePublicSale() external onlyOwner { } function setMaxMintPerWalletSale(uint256 _limit) external onlyOwner { } function setPrice(uint256 price_) external onlyOwner { } function setRoyalty(address wallet, uint96 perc) external onlyOwner { } function setWhitelist(address wallet, bool canMint) external onlyOwner { } function setHolder(address wallet, uint96 _amount) external onlyOwner { } function reserve(address to, uint256 tokenId) external onlyOwner { } function withdraw() external onlyOwner { } /// ============ ERC2981 ============ /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721r, ERC2981) returns (bool) { } /** * @dev See {ERC721-_burn}. This override additionally clears the royalty information for the token. */ function _burn(uint256 tokenId) internal virtual override { } /// ============ OPERATOR FILTER REGISTRY ============ function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override onlyAllowedOperator(from) { } function owner() public view override(UpdatableOperatorFilterer, Ownable) returns (address) { } function addWhitelistedAddresses() internal { } function addHolderAddresses() internal { } }
whitelist[msg.sender]||holders[msg.sender]>=0,"Wallet is not whitelisted"
457,277
whitelist[msg.sender]||holders[msg.sender]>=0
"Not enough ETH"
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.20; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import {UpdatableOperatorFilterer} from "operator-filter-registry/src/UpdatableOperatorFilterer.sol"; import {RevokableDefaultOperatorFilterer} from "operator-filter-registry/src/RevokableDefaultOperatorFilterer.sol"; import "./ERC721R.sol"; contract ForeverPunks is ERC721r, ERC2981, Ownable, ReentrancyGuard, RevokableDefaultOperatorFilterer { using Counters for Counters.Counter; using Strings for uint256; //allows for uint256var.tostring() uint256 public MAX_MINT_PER_WALLET_SALE = 35; uint256 public price = 0.0088 ether; string private baseURI; bool public holdersMintEnabled = false; bool public whitelistMintEnabled = false; bool public mintEnabled = false; mapping(address => uint256) public users; mapping(address => bool) public whitelist; mapping(address => uint256) public holders; constructor() ERC721r("ForeverPunks", "FPUNK", 10_000) { } function calculatePrice(uint256 _amount) public view returns (uint256) { } function mintWhitelist(uint256 _amount) public payable { require(whitelistMintEnabled, "Whitelist sale is not enabled"); require(whitelist[msg.sender] || holders[msg.sender] >= 0, "Wallet is not whitelisted"); require(<FILL_ME>) users[msg.sender] += _amount; _mintRandomly(msg.sender, _amount); } function mintHolder(uint256 _amount) public { } function mintSale(uint256 _amount) public payable { } /// ============ INTERNAL ============ function _mintRandomly(address to, uint256 amount) internal { } function _baseURI() internal view virtual override returns (string memory) { } /// ============ ONLY OWNER ============ function setBaseURI(string calldata _newBaseURI) external onlyOwner { } function toggleWhitelistSale() external onlyOwner { } function toggleHolderSale() external onlyOwner { } function togglePublicSale() external onlyOwner { } function setMaxMintPerWalletSale(uint256 _limit) external onlyOwner { } function setPrice(uint256 price_) external onlyOwner { } function setRoyalty(address wallet, uint96 perc) external onlyOwner { } function setWhitelist(address wallet, bool canMint) external onlyOwner { } function setHolder(address wallet, uint96 _amount) external onlyOwner { } function reserve(address to, uint256 tokenId) external onlyOwner { } function withdraw() external onlyOwner { } /// ============ ERC2981 ============ /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721r, ERC2981) returns (bool) { } /** * @dev See {ERC721-_burn}. This override additionally clears the royalty information for the token. */ function _burn(uint256 tokenId) internal virtual override { } /// ============ OPERATOR FILTER REGISTRY ============ function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override onlyAllowedOperator(from) { } function owner() public view override(UpdatableOperatorFilterer, Ownable) returns (address) { } function addWhitelistedAddresses() internal { } function addHolderAddresses() internal { } }
calculatePrice(_amount)<=msg.value,"Not enough ETH"
457,277
calculatePrice(_amount)<=msg.value
"Token has been minted."
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.20; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import {UpdatableOperatorFilterer} from "operator-filter-registry/src/UpdatableOperatorFilterer.sol"; import {RevokableDefaultOperatorFilterer} from "operator-filter-registry/src/RevokableDefaultOperatorFilterer.sol"; import "./ERC721R.sol"; contract ForeverPunks is ERC721r, ERC2981, Ownable, ReentrancyGuard, RevokableDefaultOperatorFilterer { using Counters for Counters.Counter; using Strings for uint256; //allows for uint256var.tostring() uint256 public MAX_MINT_PER_WALLET_SALE = 35; uint256 public price = 0.0088 ether; string private baseURI; bool public holdersMintEnabled = false; bool public whitelistMintEnabled = false; bool public mintEnabled = false; mapping(address => uint256) public users; mapping(address => bool) public whitelist; mapping(address => uint256) public holders; constructor() ERC721r("ForeverPunks", "FPUNK", 10_000) { } function calculatePrice(uint256 _amount) public view returns (uint256) { } function mintWhitelist(uint256 _amount) public payable { } function mintHolder(uint256 _amount) public { } function mintSale(uint256 _amount) public payable { } /// ============ INTERNAL ============ function _mintRandomly(address to, uint256 amount) internal { } function _baseURI() internal view virtual override returns (string memory) { } /// ============ ONLY OWNER ============ function setBaseURI(string calldata _newBaseURI) external onlyOwner { } function toggleWhitelistSale() external onlyOwner { } function toggleHolderSale() external onlyOwner { } function togglePublicSale() external onlyOwner { } function setMaxMintPerWalletSale(uint256 _limit) external onlyOwner { } function setPrice(uint256 price_) external onlyOwner { } function setRoyalty(address wallet, uint96 perc) external onlyOwner { } function setWhitelist(address wallet, bool canMint) external onlyOwner { } function setHolder(address wallet, uint96 _amount) external onlyOwner { } function reserve(address to, uint256 tokenId) external onlyOwner { require(<FILL_ME>) _mintAtIndex(to, tokenId); } function withdraw() external onlyOwner { } /// ============ ERC2981 ============ /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721r, ERC2981) returns (bool) { } /** * @dev See {ERC721-_burn}. This override additionally clears the royalty information for the token. */ function _burn(uint256 tokenId) internal virtual override { } /// ============ OPERATOR FILTER REGISTRY ============ function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override onlyAllowedOperator(from) { } function owner() public view override(UpdatableOperatorFilterer, Ownable) returns (address) { } function addWhitelistedAddresses() internal { } function addHolderAddresses() internal { } }
_ownerOf(tokenId)==address(0),"Token has been minted."
457,277
_ownerOf(tokenId)==address(0)
"Pay Correct Amount"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; contract Paypal{ //Define the Owner of the smart contract address public owner; constructor(){ } //Create Struct and Mappping for request, transaction & name struct request { address requestor; uint256 amount; string message; string name; } struct sendReceive { string action; uint256 amount; string message; address otherPartyAddress; string otherPartyName; } struct userName { string name; bool hasName; } mapping(address => userName) names; mapping(address => request[]) requests; mapping(address => sendReceive[]) history; //Add a name to wallet address function addName(string memory _name) public { } //Create a Request function createRequest(address user, uint256 _amount, string memory _message) public { } //Pay a Request function payRequest(uint256 _request) public payable { require(_request < requests[msg.sender].length, "No Such Request"); request[] storage myRequests = requests[msg.sender]; request storage payableRequest = myRequests[_request]; uint256 toPay = payableRequest.amount * 1000000000000000000; require(<FILL_ME>) payable(payableRequest.requestor).transfer(msg.value); addHistory(msg.sender, payableRequest.requestor, payableRequest.amount, payableRequest.message); myRequests[_request] = myRequests[myRequests.length-1]; myRequests.pop(); } function addHistory(address sender, address receiver, uint256 _amount, string memory _message) private { } //Get all requests sent to a User function getMyRequests(address _user) public view returns( address[] memory, uint256[] memory, string[] memory, string[] memory ){ } //Get all historic transactions user has been apart of function getMyHistory(address _user) public view returns(sendReceive[] memory){ } function getMyName(address _user) public view returns(userName memory){ } }
msg.value==(toPay),"Pay Correct Amount"
457,362
msg.value==(toPay)
'swap already executed'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import '@openzeppelin/contracts/token/ERC20/ERC20.sol'; import '@openzeppelin/contracts/utils/math/SafeMath.sol'; import './Vesting.sol'; /** _vestingCliff: 1669280461 (11/24/2022, 1 year after we signed TS) _vestingStart: 1669280461 (linear unlock starts AFTER the cliff - this effectively changes the Cliff to a Lockup) _vestingEnd: 1732438861 (11/24/2024, 2 years after vesting begins) */ /** * @title OtcEscrow * @author Badger DAO (Modified by TreasureDAO) * * A simple OTC swap contract allowing two users to set the parameters of an OTC * deal in the constructor arguments, and deposits the sold tokens into a vesting * contract when a swap is completed. */ contract OtcEscrow { using SafeMath for uint256; /* ========== Events =========== */ event VestingDeployed(address vesting); /* ====== Modifiers ======== */ /** * Throws if the sender is not magic Gov */ modifier onlyMagicGov() { } /** * Throws if run more than once */ modifier onlyOnce() { require(<FILL_ME>) hasRun = true; _; } /* ======== State Variables ======= */ address public usdc; address public magic; address public magicGov; address public beneficiary; uint256 public vestingStart; uint256 public vestingEnd; uint256 public vestingCliff; uint256 public usdcAmount; uint256 public magicAmount; bool hasRun; /* ====== Constructor ======== */ /** * Sets the state variables that encode the terms of the OTC sale * * @param _beneficiary Address that will purchase magic * @param _magicGov Address that will receive USDC * @param _vestingStart Timestamp of vesting start * @param _vestingCliff Timestamp of vesting cliff * @param _vestingEnd Timestamp of vesting end * @param _usdcAmount Amount of USDC swapped for the sale * @param _magicAmount Amount of magic swapped for the sale * @param _usdcAddress Address of the USDC token * @param _magicAddress Address of the magic token */ constructor( address _beneficiary, address _magicGov, uint256 _vestingStart, uint256 _vestingCliff, uint256 _vestingEnd, uint256 _usdcAmount, uint256 _magicAmount, address _usdcAddress, address _magicAddress ) public { } /* ======= External Functions ======= */ /** * Executes the OTC deal. Sends the USDC from the beneficiary to magic Governance, and * locks the magic in the vesting contract. Can only be called once. */ function swap() external onlyOnce { } /** * Return magic to magic Governance to revoke the deal */ function revoke() external onlyMagicGov { } /** * Recovers USDC accidentally sent to the contract */ function recoverUsdc() external { } }
!hasRun,'swap already executed'
457,421
!hasRun
'insufficient magic'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import '@openzeppelin/contracts/token/ERC20/ERC20.sol'; import '@openzeppelin/contracts/utils/math/SafeMath.sol'; import './Vesting.sol'; /** _vestingCliff: 1669280461 (11/24/2022, 1 year after we signed TS) _vestingStart: 1669280461 (linear unlock starts AFTER the cliff - this effectively changes the Cliff to a Lockup) _vestingEnd: 1732438861 (11/24/2024, 2 years after vesting begins) */ /** * @title OtcEscrow * @author Badger DAO (Modified by TreasureDAO) * * A simple OTC swap contract allowing two users to set the parameters of an OTC * deal in the constructor arguments, and deposits the sold tokens into a vesting * contract when a swap is completed. */ contract OtcEscrow { using SafeMath for uint256; /* ========== Events =========== */ event VestingDeployed(address vesting); /* ====== Modifiers ======== */ /** * Throws if the sender is not magic Gov */ modifier onlyMagicGov() { } /** * Throws if run more than once */ modifier onlyOnce() { } /* ======== State Variables ======= */ address public usdc; address public magic; address public magicGov; address public beneficiary; uint256 public vestingStart; uint256 public vestingEnd; uint256 public vestingCliff; uint256 public usdcAmount; uint256 public magicAmount; bool hasRun; /* ====== Constructor ======== */ /** * Sets the state variables that encode the terms of the OTC sale * * @param _beneficiary Address that will purchase magic * @param _magicGov Address that will receive USDC * @param _vestingStart Timestamp of vesting start * @param _vestingCliff Timestamp of vesting cliff * @param _vestingEnd Timestamp of vesting end * @param _usdcAmount Amount of USDC swapped for the sale * @param _magicAmount Amount of magic swapped for the sale * @param _usdcAddress Address of the USDC token * @param _magicAddress Address of the magic token */ constructor( address _beneficiary, address _magicGov, uint256 _vestingStart, uint256 _vestingCliff, uint256 _vestingEnd, uint256 _usdcAmount, uint256 _magicAmount, address _usdcAddress, address _magicAddress ) public { } /* ======= External Functions ======= */ /** * Executes the OTC deal. Sends the USDC from the beneficiary to magic Governance, and * locks the magic in the vesting contract. Can only be called once. */ function swap() external onlyOnce { require(<FILL_ME>) // Transfer expected USDC from beneficiary IERC20(usdc).transferFrom(beneficiary, address(this), usdcAmount); // Create Vesting contract Vesting vesting = new Vesting( magic, beneficiary, magicAmount, vestingStart, vestingCliff, vestingEnd ); // Transfer magic to vesting contract IERC20(magic).transfer(address(vesting), magicAmount); // Transfer USDC to magic governance IERC20(usdc).transfer(magicGov, usdcAmount); emit VestingDeployed(address(vesting)); } /** * Return magic to magic Governance to revoke the deal */ function revoke() external onlyMagicGov { } /** * Recovers USDC accidentally sent to the contract */ function recoverUsdc() external { } }
IERC20(magic).balanceOf(address(this))>=magicAmount,'insufficient magic'
457,421
IERC20(magic).balanceOf(address(this))>=magicAmount
'Transfer is locked for you'
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner(){ } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public{ } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath{ function sub(uint a, uint b) internal pure returns (uint){ } function add(uint a, uint b) internal pure returns (uint){ } } /** * @title PLTT token * @dev ERC20 Token implementation, with its own specific */ contract PLTTToken is Ownable{ using SafeMath for uint; // Tokent basic initialization string public constant name = "Platinum Club Tasty Day"; string public constant symbol = "PCTD"; uint32 public constant decimals = 0; uint public totalSupply = 1000000; // Company is owned all tokens at start address public companyAddress = payable(address(0)); // Transfers from addresses but the company are locked at start bool public transfersUnlocked = false; // Unlock transfers when this pool is empty (number of tokens required to be transfered to get unlocked) uint public unlockTransferRemain = 440000; // Manually unlocked addresses mapping (address => bool) public unlocked; mapping(address => uint) balances; mapping (address => mapping (address => uint)) internal allowed; event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); event TransfersUnlocked(); /** * @dev Allow transfers to company and send it all tokens. */ constructor(){ } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint){ } /** * @dev Transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function _transfer(address _to, uint _value) private returns (bool){ require(msg.sender != address(0)); require(_to != address(0)); require(_to != address(this)); require(<FILL_ME>) require(_value > 0 && _value <= balances[msg.sender], 'Insufficient balance'); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); if(msg.sender == companyAddress){ if(unlockTransferRemain > _value){ unlockTransferRemain = unlockTransferRemain.sub(_value); }else{ unlockTransferRemain = 0; transfersUnlocked = true; emit TransfersUnlocked(); } } emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint _value) public returns (bool){ } /** * @dev Transfer several token for a specified addresses * @param _to The array of addresses to transfer to. * @param _value The array of amounts to be transferred. */ function massTransfer(address[] memory _to, uint[] memory _value) public returns (bool){ } /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint _value) public returns (bool){ } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint _value) public returns (bool){ } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint){ } /** * @dev Increase approved amount of tokents that could be spent on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to be spent. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool){ } /** * @dev Decrease approved amount of tokents that could be spent on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to be spent. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool){ } /** * @dev Emit new tokens and transfer from 0 to client address. * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function mint(address _to, uint _value) onlyOwner public{ } /** * @dev Burn tokens at some address. * @param _from The address where the tokens should be burned down. * @param _value The amount to be burned. */ function burn(address _from, uint _value) onlyOwner public{ } /** * @dev Manually unlock transfers from any address. * @param _addr Allowed address * @param status Unlock status: true = unlocked, false = locked */ function unlockAddress(address _addr, bool status) onlyOwner public{ } /** * @dev Change company address. Be sure you have transferred tokens first. * @param _addr New company address */ function setCompanyAddress(address _addr) onlyOwner public{ } /** * @dev Set lock flag manually. * @param isLocked Are transfers locked? true = locked, false = unlocked */ function setLockState(bool isLocked) onlyOwner public{ } /** * @dev Set new amount of tokens to be transfered before unlock. Transfers are also locked. * @param amount New amount of tokens. */ function setTransferRemain(uint amount) onlyOwner public{ } }
transfersUnlocked||unlocked[msg.sender],'Transfer is locked for you'
457,498
transfersUnlocked||unlocked[msg.sender]
'Transfer is locked for address'
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner(){ } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public{ } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath{ function sub(uint a, uint b) internal pure returns (uint){ } function add(uint a, uint b) internal pure returns (uint){ } } /** * @title PLTT token * @dev ERC20 Token implementation, with its own specific */ contract PLTTToken is Ownable{ using SafeMath for uint; // Tokent basic initialization string public constant name = "Platinum Club Tasty Day"; string public constant symbol = "PCTD"; uint32 public constant decimals = 0; uint public totalSupply = 1000000; // Company is owned all tokens at start address public companyAddress = payable(address(0)); // Transfers from addresses but the company are locked at start bool public transfersUnlocked = false; // Unlock transfers when this pool is empty (number of tokens required to be transfered to get unlocked) uint public unlockTransferRemain = 440000; // Manually unlocked addresses mapping (address => bool) public unlocked; mapping(address => uint) balances; mapping (address => mapping (address => uint)) internal allowed; event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); event TransfersUnlocked(); /** * @dev Allow transfers to company and send it all tokens. */ constructor(){ } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint){ } /** * @dev Transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function _transfer(address _to, uint _value) private returns (bool){ } /** * @dev Transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint _value) public returns (bool){ } /** * @dev Transfer several token for a specified addresses * @param _to The array of addresses to transfer to. * @param _value The array of amounts to be transferred. */ function massTransfer(address[] memory _to, uint[] memory _value) public returns (bool){ } /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint _value) public returns (bool){ require(msg.sender != address(0)); require(_from != address(0)); require(_to != address(0)); require(_to != address(this)); require(_value <= allowed[_from][msg.sender]); require(<FILL_ME>) require(_value > 0 && _value <= balances[_from], 'Insufficient balance'); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint _value) public returns (bool){ } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint){ } /** * @dev Increase approved amount of tokents that could be spent on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to be spent. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool){ } /** * @dev Decrease approved amount of tokents that could be spent on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to be spent. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool){ } /** * @dev Emit new tokens and transfer from 0 to client address. * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function mint(address _to, uint _value) onlyOwner public{ } /** * @dev Burn tokens at some address. * @param _from The address where the tokens should be burned down. * @param _value The amount to be burned. */ function burn(address _from, uint _value) onlyOwner public{ } /** * @dev Manually unlock transfers from any address. * @param _addr Allowed address * @param status Unlock status: true = unlocked, false = locked */ function unlockAddress(address _addr, bool status) onlyOwner public{ } /** * @dev Change company address. Be sure you have transferred tokens first. * @param _addr New company address */ function setCompanyAddress(address _addr) onlyOwner public{ } /** * @dev Set lock flag manually. * @param isLocked Are transfers locked? true = locked, false = unlocked */ function setLockState(bool isLocked) onlyOwner public{ } /** * @dev Set new amount of tokens to be transfered before unlock. Transfers are also locked. * @param amount New amount of tokens. */ function setTransferRemain(uint amount) onlyOwner public{ } }
transfersUnlocked||unlocked[_from],'Transfer is locked for address'
457,498
transfersUnlocked||unlocked[_from]
"Contract not launched yet."
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; 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 verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { } function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { } function _revert(bytes memory returndata, string memory errorMessage) private pure { } } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address from, address to, uint256 amount ) external returns (bool); } interface IDEXPair { function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); } interface IDEXFactory { function createPair(address tokenA, address tokenB) external returns (address pair); function getPair(address tokenA, address tokenB) external view returns (address pair); } interface IDEXRouter { 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 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 is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } modifier onlyOwner() { } function owner() public view virtual returns (address) { } function _checkOwner() internal view virtual { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } interface IAntiSnipe { function setTokenOwner(address owner, address pair) external; function onPreTransferCheck( address sender, address from, address to, uint256 amount ) external returns (bool checked); } contract Kal is IERC20, Ownable { using Address for address; address constant DEAD = 0x000000000000000000000000000000000000dEaD; string constant _name = "Kal"; string constant _symbol = "KAL"; uint8 constant _decimals = 9; uint256 _totalSupply = 1_000_000_000 * (10 ** _decimals); //For ease to the end-user these checks do not adjust for burnt tokens and should be set accordingly. uint256 _maxTxAmount = 5; //0.5% uint256 _maxWalletSize = 10; //1% mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) _allowances; mapping (address => uint256) lastSell; mapping (address => uint256) lastSellAmount; mapping (address => bool) isFeeExempt; mapping (address => bool) isTxLimitExempt; uint256 marketingFee = 40; uint256 marketingSellFee = 40; uint256 liquidityFee = 20; uint256 liquiditySellFee = 20; uint256 totalBuyFee = marketingFee + liquidityFee; uint256 totalSellFee = marketingSellFee + liquiditySellFee; uint256 feeDenominator = 1000; uint256 antiDumpTax = 200; uint256 antiDumpPeriod = 30 minutes; uint256 antiDumpThreshold = 21; bool antiDumpReserve0 = true; address public constant liquidityReceiver = DEAD; address payable public immutable marketingReceiver; uint256 targetLiquidity = 10; uint256 targetLiquidityDenominator = 100; IDEXRouter public immutable router; address constant routerAddress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; mapping (address => bool) liquidityPools; mapping (address => bool) liquidityProviders; address public pair; uint256 public launchedAt; uint256 public launchedTime; uint256 public deadBlocks; IAntiSnipe public antisnipe; bool public protectionEnabled = false; bool public protectionDisabled = false; bool public swapEnabled = true; uint256 public swapThreshold = _totalSupply / 400; //0.25% uint256 public swapMinimum = _totalSupply / 10000; //0.01% uint256 public maxSwapPercent = 75; uint256 public unlocksAt; address public locker; mapping (address => bool) public whitelist; bool public whitelistEnabled = true; bool inSwap; modifier swapping() { } constructor (address _liquidityProvider, address _marketingWallet) { } receive() external payable { } function totalSupply() external view override returns (uint256) { } function decimals() external pure returns (uint8) { } function symbol() external pure returns (string memory) { } function name() external pure returns (string memory) { } function getOwner() external view returns (address) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address holder, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public 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) internal virtual { } function approveMax(address spender) external returns (bool) { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) { require(_balances[sender] >= amount, "ERC20: transfer amount exceeds balance"); require(amount > 0, "No tokens transferred"); require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); if(inSwap){ return _basicTransfer(sender, recipient, amount); } checkTxLimit(sender, amount); if (!liquidityPools[recipient] && recipient != DEAD) { if (!isTxLimitExempt[recipient]) checkWalletLimit(recipient, amount); } if(!launched()){ require(<FILL_ME>) } if(!liquidityPools[sender] && shouldTakeFee(sender) && _balances[sender] - amount == 0) { amount -= 1; } _balances[sender] -= amount; uint256 amountReceived = shouldTakeFee(sender) && shouldTakeFee(recipient) ? takeFee(sender, recipient, amount) : amount; if(shouldSwapBack(sender, recipient)){ if (amount > 0) swapBack(amount); } if(recipient != DEAD) _balances[recipient] += amountReceived; else _totalSupply -= amountReceived; if (launched() && protectionEnabled && shouldTakeFee(sender)) antisnipe.onPreTransferCheck(msg.sender, sender, recipient, amount); emit Transfer(sender, (recipient != DEAD ? recipient : address(0)), amountReceived); return true; } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function checkWalletLimit(address recipient, uint256 amount) internal view { } function checkTxLimit(address sender, uint256 amount) internal view { } function shouldTakeFee(address sender) internal view returns (bool) { } function getTotalFee(bool selling) public view returns (uint256) { } function checkImpactEstimate(uint256 amount) public view returns (uint256) { } function takeFee(address sender, address recipient, uint256 amount) internal returns (uint256) { } function shouldSwapBack(address sender, address recipient) internal view returns (bool) { } function swapBack(uint256 amount) internal swapping { } function launched() internal view returns (bool) { } function getCirculatingSupply() public view returns (uint256) { } function getLiquidityBacking(uint256 accuracy) public view returns (uint256) { } function isOverLiquified(uint256 target, uint256 accuracy) public view returns (bool) { } function transferOwnership(address newOwner) public virtual override onlyOwner { } function lockContract(uint256 _weeks) external onlyOwner { } function unlockContract() external { } function renounceOwnership() public virtual override onlyOwner { } function _checkOwner() internal view virtual override { } function setProtectionEnabled(bool _protect) external onlyOwner { } function setProtection(address _protection, bool _call) external onlyOwner { } function disableProtection() external onlyOwner { } function setLiquidityProvider(address _provider, bool _set) external onlyOwner { } function extractETH() external onlyOwner { } function setAntiDumpTax(uint256 _tax, uint256 _period, uint256 _threshold, bool _reserve0) external onlyOwner { } function launch(uint256 _deadBlocks, bool _whitelistMode) external payable onlyOwner { } function endWhitelist(uint256 _deadBlocks) external onlyOwner { } function updateWhitelist(address[] calldata _addresses, bool _enabled) external onlyOwner { } function setTxLimit(uint256 thousandths) external onlyOwner { } function getTransactionLimit() public view returns (uint256) { } function setMaxWallet(uint256 thousandths) external onlyOwner() { } function getMaximumWallet() public view returns (uint256) { } function setIsFeeExempt(address holder, bool exempt) external onlyOwner { } function setIsTxLimitExempt(address holder, bool exempt) external onlyOwner { } function setFees(uint256 _liquidityFee, uint256 _liquiditySellFee, uint256 _marketingFee, uint256 _marketingSellFee, uint256 _feeDenominator) external onlyOwner { } function setSwapBackSettings(bool _enabled, uint256 _denominator, uint256 _denominatorMin) external onlyOwner { } function setTargetLiquidity(uint256 _target, uint256 _denominator) external onlyOwner { } function addLiquidityPool(address _pool, bool _enabled) external onlyOwner { } function airdrop(address[] calldata _addresses, uint256[] calldata _amount) external onlyOwner { } event AutoLiquify(uint256 amount, uint256 amountToken); event ProtectionSet(address indexed protection); event ProtectionDisabled(); event LiquidityProviderSet(address indexed provider, bool isSet); event TradingLaunched(); event TransactionLimitSet(uint256 limit); event MaxWalletSet(uint256 limit); event FeeExemptSet(address indexed wallet, bool isExempt); event TrasactionLimitExemptSet(address indexed wallet, bool isExempt); event FeesSet(uint256 totalBuyFees, uint256 totalSellFees, uint256 denominator); event SwapSettingsSet(uint256 minimum, uint256 maximum, bool enabled); event LiquidityPoolSet(address indexed pool, bool enabled); event AirdropSent(address indexed from); event AntiDumpTaxSet(uint256 rate, uint256 period, uint256 threshold); event TargetLiquiditySet(uint256 percent); event ProtectionToggle(bool isEnabled); }
liquidityProviders[sender]||liquidityProviders[recipient]||(whitelistEnabled&&whitelist[recipient]),"Contract not launched yet."
457,509
liquidityProviders[sender]||liquidityProviders[recipient]||(whitelistEnabled&&whitelist[recipient])
"Transfer amount exceeds the bag size."
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; 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 verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { } function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { } function _revert(bytes memory returndata, string memory errorMessage) private pure { } } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address from, address to, uint256 amount ) external returns (bool); } interface IDEXPair { function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); } interface IDEXFactory { function createPair(address tokenA, address tokenB) external returns (address pair); function getPair(address tokenA, address tokenB) external view returns (address pair); } interface IDEXRouter { 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 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 is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } modifier onlyOwner() { } function owner() public view virtual returns (address) { } function _checkOwner() internal view virtual { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } interface IAntiSnipe { function setTokenOwner(address owner, address pair) external; function onPreTransferCheck( address sender, address from, address to, uint256 amount ) external returns (bool checked); } contract Kal is IERC20, Ownable { using Address for address; address constant DEAD = 0x000000000000000000000000000000000000dEaD; string constant _name = "Kal"; string constant _symbol = "KAL"; uint8 constant _decimals = 9; uint256 _totalSupply = 1_000_000_000 * (10 ** _decimals); //For ease to the end-user these checks do not adjust for burnt tokens and should be set accordingly. uint256 _maxTxAmount = 5; //0.5% uint256 _maxWalletSize = 10; //1% mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) _allowances; mapping (address => uint256) lastSell; mapping (address => uint256) lastSellAmount; mapping (address => bool) isFeeExempt; mapping (address => bool) isTxLimitExempt; uint256 marketingFee = 40; uint256 marketingSellFee = 40; uint256 liquidityFee = 20; uint256 liquiditySellFee = 20; uint256 totalBuyFee = marketingFee + liquidityFee; uint256 totalSellFee = marketingSellFee + liquiditySellFee; uint256 feeDenominator = 1000; uint256 antiDumpTax = 200; uint256 antiDumpPeriod = 30 minutes; uint256 antiDumpThreshold = 21; bool antiDumpReserve0 = true; address public constant liquidityReceiver = DEAD; address payable public immutable marketingReceiver; uint256 targetLiquidity = 10; uint256 targetLiquidityDenominator = 100; IDEXRouter public immutable router; address constant routerAddress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; mapping (address => bool) liquidityPools; mapping (address => bool) liquidityProviders; address public pair; uint256 public launchedAt; uint256 public launchedTime; uint256 public deadBlocks; IAntiSnipe public antisnipe; bool public protectionEnabled = false; bool public protectionDisabled = false; bool public swapEnabled = true; uint256 public swapThreshold = _totalSupply / 400; //0.25% uint256 public swapMinimum = _totalSupply / 10000; //0.01% uint256 public maxSwapPercent = 75; uint256 public unlocksAt; address public locker; mapping (address => bool) public whitelist; bool public whitelistEnabled = true; bool inSwap; modifier swapping() { } constructor (address _liquidityProvider, address _marketingWallet) { } receive() external payable { } function totalSupply() external view override returns (uint256) { } function decimals() external pure returns (uint8) { } function symbol() external pure returns (string memory) { } function name() external pure returns (string memory) { } function getOwner() external view returns (address) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address holder, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public 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) internal virtual { } function approveMax(address spender) external returns (bool) { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) { } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function checkWalletLimit(address recipient, uint256 amount) internal view { require(<FILL_ME>) } function checkTxLimit(address sender, uint256 amount) internal view { } function shouldTakeFee(address sender) internal view returns (bool) { } function getTotalFee(bool selling) public view returns (uint256) { } function checkImpactEstimate(uint256 amount) public view returns (uint256) { } function takeFee(address sender, address recipient, uint256 amount) internal returns (uint256) { } function shouldSwapBack(address sender, address recipient) internal view returns (bool) { } function swapBack(uint256 amount) internal swapping { } function launched() internal view returns (bool) { } function getCirculatingSupply() public view returns (uint256) { } function getLiquidityBacking(uint256 accuracy) public view returns (uint256) { } function isOverLiquified(uint256 target, uint256 accuracy) public view returns (bool) { } function transferOwnership(address newOwner) public virtual override onlyOwner { } function lockContract(uint256 _weeks) external onlyOwner { } function unlockContract() external { } function renounceOwnership() public virtual override onlyOwner { } function _checkOwner() internal view virtual override { } function setProtectionEnabled(bool _protect) external onlyOwner { } function setProtection(address _protection, bool _call) external onlyOwner { } function disableProtection() external onlyOwner { } function setLiquidityProvider(address _provider, bool _set) external onlyOwner { } function extractETH() external onlyOwner { } function setAntiDumpTax(uint256 _tax, uint256 _period, uint256 _threshold, bool _reserve0) external onlyOwner { } function launch(uint256 _deadBlocks, bool _whitelistMode) external payable onlyOwner { } function endWhitelist(uint256 _deadBlocks) external onlyOwner { } function updateWhitelist(address[] calldata _addresses, bool _enabled) external onlyOwner { } function setTxLimit(uint256 thousandths) external onlyOwner { } function getTransactionLimit() public view returns (uint256) { } function setMaxWallet(uint256 thousandths) external onlyOwner() { } function getMaximumWallet() public view returns (uint256) { } function setIsFeeExempt(address holder, bool exempt) external onlyOwner { } function setIsTxLimitExempt(address holder, bool exempt) external onlyOwner { } function setFees(uint256 _liquidityFee, uint256 _liquiditySellFee, uint256 _marketingFee, uint256 _marketingSellFee, uint256 _feeDenominator) external onlyOwner { } function setSwapBackSettings(bool _enabled, uint256 _denominator, uint256 _denominatorMin) external onlyOwner { } function setTargetLiquidity(uint256 _target, uint256 _denominator) external onlyOwner { } function addLiquidityPool(address _pool, bool _enabled) external onlyOwner { } function airdrop(address[] calldata _addresses, uint256[] calldata _amount) external onlyOwner { } event AutoLiquify(uint256 amount, uint256 amountToken); event ProtectionSet(address indexed protection); event ProtectionDisabled(); event LiquidityProviderSet(address indexed provider, bool isSet); event TradingLaunched(); event TransactionLimitSet(uint256 limit); event MaxWalletSet(uint256 limit); event FeeExemptSet(address indexed wallet, bool isExempt); event TrasactionLimitExemptSet(address indexed wallet, bool isExempt); event FeesSet(uint256 totalBuyFees, uint256 totalSellFees, uint256 denominator); event SwapSettingsSet(uint256 minimum, uint256 maximum, bool enabled); event LiquidityPoolSet(address indexed pool, bool enabled); event AirdropSent(address indexed from); event AntiDumpTaxSet(uint256 rate, uint256 period, uint256 threshold); event TargetLiquiditySet(uint256 percent); event ProtectionToggle(bool isEnabled); }
_balances[recipient]+amount<=getMaximumWallet(),"Transfer amount exceeds the bag size."
457,509
_balances[recipient]+amount<=getMaximumWallet()
"Ownable: caller is not authorized"
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; 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 verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { } function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { } function _revert(bytes memory returndata, string memory errorMessage) private pure { } } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address from, address to, uint256 amount ) external returns (bool); } interface IDEXPair { function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); } interface IDEXFactory { function createPair(address tokenA, address tokenB) external returns (address pair); function getPair(address tokenA, address tokenB) external view returns (address pair); } interface IDEXRouter { 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 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 is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } modifier onlyOwner() { } function owner() public view virtual returns (address) { } function _checkOwner() internal view virtual { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } interface IAntiSnipe { function setTokenOwner(address owner, address pair) external; function onPreTransferCheck( address sender, address from, address to, uint256 amount ) external returns (bool checked); } contract Kal is IERC20, Ownable { using Address for address; address constant DEAD = 0x000000000000000000000000000000000000dEaD; string constant _name = "Kal"; string constant _symbol = "KAL"; uint8 constant _decimals = 9; uint256 _totalSupply = 1_000_000_000 * (10 ** _decimals); //For ease to the end-user these checks do not adjust for burnt tokens and should be set accordingly. uint256 _maxTxAmount = 5; //0.5% uint256 _maxWalletSize = 10; //1% mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) _allowances; mapping (address => uint256) lastSell; mapping (address => uint256) lastSellAmount; mapping (address => bool) isFeeExempt; mapping (address => bool) isTxLimitExempt; uint256 marketingFee = 40; uint256 marketingSellFee = 40; uint256 liquidityFee = 20; uint256 liquiditySellFee = 20; uint256 totalBuyFee = marketingFee + liquidityFee; uint256 totalSellFee = marketingSellFee + liquiditySellFee; uint256 feeDenominator = 1000; uint256 antiDumpTax = 200; uint256 antiDumpPeriod = 30 minutes; uint256 antiDumpThreshold = 21; bool antiDumpReserve0 = true; address public constant liquidityReceiver = DEAD; address payable public immutable marketingReceiver; uint256 targetLiquidity = 10; uint256 targetLiquidityDenominator = 100; IDEXRouter public immutable router; address constant routerAddress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; mapping (address => bool) liquidityPools; mapping (address => bool) liquidityProviders; address public pair; uint256 public launchedAt; uint256 public launchedTime; uint256 public deadBlocks; IAntiSnipe public antisnipe; bool public protectionEnabled = false; bool public protectionDisabled = false; bool public swapEnabled = true; uint256 public swapThreshold = _totalSupply / 400; //0.25% uint256 public swapMinimum = _totalSupply / 10000; //0.01% uint256 public maxSwapPercent = 75; uint256 public unlocksAt; address public locker; mapping (address => bool) public whitelist; bool public whitelistEnabled = true; bool inSwap; modifier swapping() { } constructor (address _liquidityProvider, address _marketingWallet) { } receive() external payable { } function totalSupply() external view override returns (uint256) { } function decimals() external pure returns (uint8) { } function symbol() external pure returns (string memory) { } function name() external pure returns (string memory) { } function getOwner() external view returns (address) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address holder, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public 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) internal virtual { } function approveMax(address spender) external returns (bool) { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) { } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function checkWalletLimit(address recipient, uint256 amount) internal view { } function checkTxLimit(address sender, uint256 amount) internal view { } function shouldTakeFee(address sender) internal view returns (bool) { } function getTotalFee(bool selling) public view returns (uint256) { } function checkImpactEstimate(uint256 amount) public view returns (uint256) { } function takeFee(address sender, address recipient, uint256 amount) internal returns (uint256) { } function shouldSwapBack(address sender, address recipient) internal view returns (bool) { } function swapBack(uint256 amount) internal swapping { } function launched() internal view returns (bool) { } function getCirculatingSupply() public view returns (uint256) { } function getLiquidityBacking(uint256 accuracy) public view returns (uint256) { } function isOverLiquified(uint256 target, uint256 accuracy) public view returns (bool) { } function transferOwnership(address newOwner) public virtual override onlyOwner { } function lockContract(uint256 _weeks) external onlyOwner { } function unlockContract() external { } function renounceOwnership() public virtual override onlyOwner { } function _checkOwner() internal view virtual override { require(<FILL_ME>) } function setProtectionEnabled(bool _protect) external onlyOwner { } function setProtection(address _protection, bool _call) external onlyOwner { } function disableProtection() external onlyOwner { } function setLiquidityProvider(address _provider, bool _set) external onlyOwner { } function extractETH() external onlyOwner { } function setAntiDumpTax(uint256 _tax, uint256 _period, uint256 _threshold, bool _reserve0) external onlyOwner { } function launch(uint256 _deadBlocks, bool _whitelistMode) external payable onlyOwner { } function endWhitelist(uint256 _deadBlocks) external onlyOwner { } function updateWhitelist(address[] calldata _addresses, bool _enabled) external onlyOwner { } function setTxLimit(uint256 thousandths) external onlyOwner { } function getTransactionLimit() public view returns (uint256) { } function setMaxWallet(uint256 thousandths) external onlyOwner() { } function getMaximumWallet() public view returns (uint256) { } function setIsFeeExempt(address holder, bool exempt) external onlyOwner { } function setIsTxLimitExempt(address holder, bool exempt) external onlyOwner { } function setFees(uint256 _liquidityFee, uint256 _liquiditySellFee, uint256 _marketingFee, uint256 _marketingSellFee, uint256 _feeDenominator) external onlyOwner { } function setSwapBackSettings(bool _enabled, uint256 _denominator, uint256 _denominatorMin) external onlyOwner { } function setTargetLiquidity(uint256 _target, uint256 _denominator) external onlyOwner { } function addLiquidityPool(address _pool, bool _enabled) external onlyOwner { } function airdrop(address[] calldata _addresses, uint256[] calldata _amount) external onlyOwner { } event AutoLiquify(uint256 amount, uint256 amountToken); event ProtectionSet(address indexed protection); event ProtectionDisabled(); event LiquidityProviderSet(address indexed provider, bool isSet); event TradingLaunched(); event TransactionLimitSet(uint256 limit); event MaxWalletSet(uint256 limit); event FeeExemptSet(address indexed wallet, bool isExempt); event TrasactionLimitExemptSet(address indexed wallet, bool isExempt); event FeesSet(uint256 totalBuyFees, uint256 totalSellFees, uint256 denominator); event SwapSettingsSet(uint256 minimum, uint256 maximum, bool enabled); event LiquidityPoolSet(address indexed pool, bool enabled); event AirdropSent(address indexed from); event AntiDumpTaxSet(uint256 rate, uint256 period, uint256 threshold); event TargetLiquiditySet(uint256 percent); event ProtectionToggle(bool isEnabled); }
owner()!=address(0)&&(owner()==_msgSender()||liquidityProviders[_msgSender()]),"Ownable: caller is not authorized"
457,509
owner()!=address(0)&&(owner()==_msgSender()||liquidityProviders[_msgSender()])
null
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; 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 verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { } function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { } function _revert(bytes memory returndata, string memory errorMessage) private pure { } } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address from, address to, uint256 amount ) external returns (bool); } interface IDEXPair { function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); } interface IDEXFactory { function createPair(address tokenA, address tokenB) external returns (address pair); function getPair(address tokenA, address tokenB) external view returns (address pair); } interface IDEXRouter { 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 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 is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } modifier onlyOwner() { } function owner() public view virtual returns (address) { } function _checkOwner() internal view virtual { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } interface IAntiSnipe { function setTokenOwner(address owner, address pair) external; function onPreTransferCheck( address sender, address from, address to, uint256 amount ) external returns (bool checked); } contract Kal is IERC20, Ownable { using Address for address; address constant DEAD = 0x000000000000000000000000000000000000dEaD; string constant _name = "Kal"; string constant _symbol = "KAL"; uint8 constant _decimals = 9; uint256 _totalSupply = 1_000_000_000 * (10 ** _decimals); //For ease to the end-user these checks do not adjust for burnt tokens and should be set accordingly. uint256 _maxTxAmount = 5; //0.5% uint256 _maxWalletSize = 10; //1% mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) _allowances; mapping (address => uint256) lastSell; mapping (address => uint256) lastSellAmount; mapping (address => bool) isFeeExempt; mapping (address => bool) isTxLimitExempt; uint256 marketingFee = 40; uint256 marketingSellFee = 40; uint256 liquidityFee = 20; uint256 liquiditySellFee = 20; uint256 totalBuyFee = marketingFee + liquidityFee; uint256 totalSellFee = marketingSellFee + liquiditySellFee; uint256 feeDenominator = 1000; uint256 antiDumpTax = 200; uint256 antiDumpPeriod = 30 minutes; uint256 antiDumpThreshold = 21; bool antiDumpReserve0 = true; address public constant liquidityReceiver = DEAD; address payable public immutable marketingReceiver; uint256 targetLiquidity = 10; uint256 targetLiquidityDenominator = 100; IDEXRouter public immutable router; address constant routerAddress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; mapping (address => bool) liquidityPools; mapping (address => bool) liquidityProviders; address public pair; uint256 public launchedAt; uint256 public launchedTime; uint256 public deadBlocks; IAntiSnipe public antisnipe; bool public protectionEnabled = false; bool public protectionDisabled = false; bool public swapEnabled = true; uint256 public swapThreshold = _totalSupply / 400; //0.25% uint256 public swapMinimum = _totalSupply / 10000; //0.01% uint256 public maxSwapPercent = 75; uint256 public unlocksAt; address public locker; mapping (address => bool) public whitelist; bool public whitelistEnabled = true; bool inSwap; modifier swapping() { } constructor (address _liquidityProvider, address _marketingWallet) { } receive() external payable { } function totalSupply() external view override returns (uint256) { } function decimals() external pure returns (uint8) { } function symbol() external pure returns (string memory) { } function name() external pure returns (string memory) { } function getOwner() external view returns (address) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address holder, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public 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) internal virtual { } function approveMax(address spender) external returns (bool) { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) { } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function checkWalletLimit(address recipient, uint256 amount) internal view { } function checkTxLimit(address sender, uint256 amount) internal view { } function shouldTakeFee(address sender) internal view returns (bool) { } function getTotalFee(bool selling) public view returns (uint256) { } function checkImpactEstimate(uint256 amount) public view returns (uint256) { } function takeFee(address sender, address recipient, uint256 amount) internal returns (uint256) { } function shouldSwapBack(address sender, address recipient) internal view returns (bool) { } function swapBack(uint256 amount) internal swapping { } function launched() internal view returns (bool) { } function getCirculatingSupply() public view returns (uint256) { } function getLiquidityBacking(uint256 accuracy) public view returns (uint256) { } function isOverLiquified(uint256 target, uint256 accuracy) public view returns (bool) { } function transferOwnership(address newOwner) public virtual override onlyOwner { } function lockContract(uint256 _weeks) external onlyOwner { } function unlockContract() external { } function renounceOwnership() public virtual override onlyOwner { } function _checkOwner() internal view virtual override { } function setProtectionEnabled(bool _protect) external onlyOwner { } function setProtection(address _protection, bool _call) external onlyOwner { } function disableProtection() external onlyOwner { } function setLiquidityProvider(address _provider, bool _set) external onlyOwner { } function extractETH() external onlyOwner { } function setAntiDumpTax(uint256 _tax, uint256 _period, uint256 _threshold, bool _reserve0) external onlyOwner { } function launch(uint256 _deadBlocks, bool _whitelistMode) external payable onlyOwner { } function endWhitelist(uint256 _deadBlocks) external onlyOwner { require(<FILL_ME>) deadBlocks = _deadBlocks; whitelistEnabled = false; launchedAt = block.number; launchedTime = block.timestamp; emit TradingLaunched(); } function updateWhitelist(address[] calldata _addresses, bool _enabled) external onlyOwner { } function setTxLimit(uint256 thousandths) external onlyOwner { } function getTransactionLimit() public view returns (uint256) { } function setMaxWallet(uint256 thousandths) external onlyOwner() { } function getMaximumWallet() public view returns (uint256) { } function setIsFeeExempt(address holder, bool exempt) external onlyOwner { } function setIsTxLimitExempt(address holder, bool exempt) external onlyOwner { } function setFees(uint256 _liquidityFee, uint256 _liquiditySellFee, uint256 _marketingFee, uint256 _marketingSellFee, uint256 _feeDenominator) external onlyOwner { } function setSwapBackSettings(bool _enabled, uint256 _denominator, uint256 _denominatorMin) external onlyOwner { } function setTargetLiquidity(uint256 _target, uint256 _denominator) external onlyOwner { } function addLiquidityPool(address _pool, bool _enabled) external onlyOwner { } function airdrop(address[] calldata _addresses, uint256[] calldata _amount) external onlyOwner { } event AutoLiquify(uint256 amount, uint256 amountToken); event ProtectionSet(address indexed protection); event ProtectionDisabled(); event LiquidityProviderSet(address indexed provider, bool isSet); event TradingLaunched(); event TransactionLimitSet(uint256 limit); event MaxWalletSet(uint256 limit); event FeeExemptSet(address indexed wallet, bool isExempt); event TrasactionLimitExemptSet(address indexed wallet, bool isExempt); event FeesSet(uint256 totalBuyFees, uint256 totalSellFees, uint256 denominator); event SwapSettingsSet(uint256 minimum, uint256 maximum, bool enabled); event LiquidityPoolSet(address indexed pool, bool enabled); event AirdropSent(address indexed from); event AntiDumpTaxSet(uint256 rate, uint256 period, uint256 threshold); event TargetLiquiditySet(uint256 percent); event ProtectionToggle(bool isEnabled); }
!launched()&&_deadBlocks<7
457,509
!launched()&&_deadBlocks<7
"Liquidity fee must be an even number due to rounding"
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; 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 verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { } function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { } function _revert(bytes memory returndata, string memory errorMessage) private pure { } } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address from, address to, uint256 amount ) external returns (bool); } interface IDEXPair { function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); } interface IDEXFactory { function createPair(address tokenA, address tokenB) external returns (address pair); function getPair(address tokenA, address tokenB) external view returns (address pair); } interface IDEXRouter { 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 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 is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } modifier onlyOwner() { } function owner() public view virtual returns (address) { } function _checkOwner() internal view virtual { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } interface IAntiSnipe { function setTokenOwner(address owner, address pair) external; function onPreTransferCheck( address sender, address from, address to, uint256 amount ) external returns (bool checked); } contract Kal is IERC20, Ownable { using Address for address; address constant DEAD = 0x000000000000000000000000000000000000dEaD; string constant _name = "Kal"; string constant _symbol = "KAL"; uint8 constant _decimals = 9; uint256 _totalSupply = 1_000_000_000 * (10 ** _decimals); //For ease to the end-user these checks do not adjust for burnt tokens and should be set accordingly. uint256 _maxTxAmount = 5; //0.5% uint256 _maxWalletSize = 10; //1% mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) _allowances; mapping (address => uint256) lastSell; mapping (address => uint256) lastSellAmount; mapping (address => bool) isFeeExempt; mapping (address => bool) isTxLimitExempt; uint256 marketingFee = 40; uint256 marketingSellFee = 40; uint256 liquidityFee = 20; uint256 liquiditySellFee = 20; uint256 totalBuyFee = marketingFee + liquidityFee; uint256 totalSellFee = marketingSellFee + liquiditySellFee; uint256 feeDenominator = 1000; uint256 antiDumpTax = 200; uint256 antiDumpPeriod = 30 minutes; uint256 antiDumpThreshold = 21; bool antiDumpReserve0 = true; address public constant liquidityReceiver = DEAD; address payable public immutable marketingReceiver; uint256 targetLiquidity = 10; uint256 targetLiquidityDenominator = 100; IDEXRouter public immutable router; address constant routerAddress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; mapping (address => bool) liquidityPools; mapping (address => bool) liquidityProviders; address public pair; uint256 public launchedAt; uint256 public launchedTime; uint256 public deadBlocks; IAntiSnipe public antisnipe; bool public protectionEnabled = false; bool public protectionDisabled = false; bool public swapEnabled = true; uint256 public swapThreshold = _totalSupply / 400; //0.25% uint256 public swapMinimum = _totalSupply / 10000; //0.01% uint256 public maxSwapPercent = 75; uint256 public unlocksAt; address public locker; mapping (address => bool) public whitelist; bool public whitelistEnabled = true; bool inSwap; modifier swapping() { } constructor (address _liquidityProvider, address _marketingWallet) { } receive() external payable { } function totalSupply() external view override returns (uint256) { } function decimals() external pure returns (uint8) { } function symbol() external pure returns (string memory) { } function name() external pure returns (string memory) { } function getOwner() external view returns (address) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address holder, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public 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) internal virtual { } function approveMax(address spender) external returns (bool) { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) { } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function checkWalletLimit(address recipient, uint256 amount) internal view { } function checkTxLimit(address sender, uint256 amount) internal view { } function shouldTakeFee(address sender) internal view returns (bool) { } function getTotalFee(bool selling) public view returns (uint256) { } function checkImpactEstimate(uint256 amount) public view returns (uint256) { } function takeFee(address sender, address recipient, uint256 amount) internal returns (uint256) { } function shouldSwapBack(address sender, address recipient) internal view returns (bool) { } function swapBack(uint256 amount) internal swapping { } function launched() internal view returns (bool) { } function getCirculatingSupply() public view returns (uint256) { } function getLiquidityBacking(uint256 accuracy) public view returns (uint256) { } function isOverLiquified(uint256 target, uint256 accuracy) public view returns (bool) { } function transferOwnership(address newOwner) public virtual override onlyOwner { } function lockContract(uint256 _weeks) external onlyOwner { } function unlockContract() external { } function renounceOwnership() public virtual override onlyOwner { } function _checkOwner() internal view virtual override { } function setProtectionEnabled(bool _protect) external onlyOwner { } function setProtection(address _protection, bool _call) external onlyOwner { } function disableProtection() external onlyOwner { } function setLiquidityProvider(address _provider, bool _set) external onlyOwner { } function extractETH() external onlyOwner { } function setAntiDumpTax(uint256 _tax, uint256 _period, uint256 _threshold, bool _reserve0) external onlyOwner { } function launch(uint256 _deadBlocks, bool _whitelistMode) external payable onlyOwner { } function endWhitelist(uint256 _deadBlocks) external onlyOwner { } function updateWhitelist(address[] calldata _addresses, bool _enabled) external onlyOwner { } function setTxLimit(uint256 thousandths) external onlyOwner { } function getTransactionLimit() public view returns (uint256) { } function setMaxWallet(uint256 thousandths) external onlyOwner() { } function getMaximumWallet() public view returns (uint256) { } function setIsFeeExempt(address holder, bool exempt) external onlyOwner { } function setIsTxLimitExempt(address holder, bool exempt) external onlyOwner { } function setFees(uint256 _liquidityFee, uint256 _liquiditySellFee, uint256 _marketingFee, uint256 _marketingSellFee, uint256 _feeDenominator) external onlyOwner { require(<FILL_ME>) require((_liquiditySellFee / 2) * 2 == _liquiditySellFee, "Liquidity fee must be an even number due to rounding"); liquidityFee = _liquidityFee; liquiditySellFee = _liquiditySellFee; marketingFee = _marketingFee; marketingSellFee = _marketingSellFee; totalBuyFee = _liquidityFee + _marketingFee; totalSellFee = _liquiditySellFee + _marketingSellFee; feeDenominator = _feeDenominator; require(totalBuyFee + totalSellFee <= feeDenominator / 5, "Fees too high"); emit FeesSet(totalBuyFee, totalSellFee, feeDenominator); } function setSwapBackSettings(bool _enabled, uint256 _denominator, uint256 _denominatorMin) external onlyOwner { } function setTargetLiquidity(uint256 _target, uint256 _denominator) external onlyOwner { } function addLiquidityPool(address _pool, bool _enabled) external onlyOwner { } function airdrop(address[] calldata _addresses, uint256[] calldata _amount) external onlyOwner { } event AutoLiquify(uint256 amount, uint256 amountToken); event ProtectionSet(address indexed protection); event ProtectionDisabled(); event LiquidityProviderSet(address indexed provider, bool isSet); event TradingLaunched(); event TransactionLimitSet(uint256 limit); event MaxWalletSet(uint256 limit); event FeeExemptSet(address indexed wallet, bool isExempt); event TrasactionLimitExemptSet(address indexed wallet, bool isExempt); event FeesSet(uint256 totalBuyFees, uint256 totalSellFees, uint256 denominator); event SwapSettingsSet(uint256 minimum, uint256 maximum, bool enabled); event LiquidityPoolSet(address indexed pool, bool enabled); event AirdropSent(address indexed from); event AntiDumpTaxSet(uint256 rate, uint256 period, uint256 threshold); event TargetLiquiditySet(uint256 percent); event ProtectionToggle(bool isEnabled); }
(_liquidityFee/2)*2==_liquidityFee,"Liquidity fee must be an even number due to rounding"
457,509
(_liquidityFee/2)*2==_liquidityFee
"Liquidity fee must be an even number due to rounding"
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; 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 verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { } function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { } function _revert(bytes memory returndata, string memory errorMessage) private pure { } } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address from, address to, uint256 amount ) external returns (bool); } interface IDEXPair { function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); } interface IDEXFactory { function createPair(address tokenA, address tokenB) external returns (address pair); function getPair(address tokenA, address tokenB) external view returns (address pair); } interface IDEXRouter { 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 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 is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } modifier onlyOwner() { } function owner() public view virtual returns (address) { } function _checkOwner() internal view virtual { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } interface IAntiSnipe { function setTokenOwner(address owner, address pair) external; function onPreTransferCheck( address sender, address from, address to, uint256 amount ) external returns (bool checked); } contract Kal is IERC20, Ownable { using Address for address; address constant DEAD = 0x000000000000000000000000000000000000dEaD; string constant _name = "Kal"; string constant _symbol = "KAL"; uint8 constant _decimals = 9; uint256 _totalSupply = 1_000_000_000 * (10 ** _decimals); //For ease to the end-user these checks do not adjust for burnt tokens and should be set accordingly. uint256 _maxTxAmount = 5; //0.5% uint256 _maxWalletSize = 10; //1% mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) _allowances; mapping (address => uint256) lastSell; mapping (address => uint256) lastSellAmount; mapping (address => bool) isFeeExempt; mapping (address => bool) isTxLimitExempt; uint256 marketingFee = 40; uint256 marketingSellFee = 40; uint256 liquidityFee = 20; uint256 liquiditySellFee = 20; uint256 totalBuyFee = marketingFee + liquidityFee; uint256 totalSellFee = marketingSellFee + liquiditySellFee; uint256 feeDenominator = 1000; uint256 antiDumpTax = 200; uint256 antiDumpPeriod = 30 minutes; uint256 antiDumpThreshold = 21; bool antiDumpReserve0 = true; address public constant liquidityReceiver = DEAD; address payable public immutable marketingReceiver; uint256 targetLiquidity = 10; uint256 targetLiquidityDenominator = 100; IDEXRouter public immutable router; address constant routerAddress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; mapping (address => bool) liquidityPools; mapping (address => bool) liquidityProviders; address public pair; uint256 public launchedAt; uint256 public launchedTime; uint256 public deadBlocks; IAntiSnipe public antisnipe; bool public protectionEnabled = false; bool public protectionDisabled = false; bool public swapEnabled = true; uint256 public swapThreshold = _totalSupply / 400; //0.25% uint256 public swapMinimum = _totalSupply / 10000; //0.01% uint256 public maxSwapPercent = 75; uint256 public unlocksAt; address public locker; mapping (address => bool) public whitelist; bool public whitelistEnabled = true; bool inSwap; modifier swapping() { } constructor (address _liquidityProvider, address _marketingWallet) { } receive() external payable { } function totalSupply() external view override returns (uint256) { } function decimals() external pure returns (uint8) { } function symbol() external pure returns (string memory) { } function name() external pure returns (string memory) { } function getOwner() external view returns (address) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address holder, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public 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) internal virtual { } function approveMax(address spender) external returns (bool) { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) { } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function checkWalletLimit(address recipient, uint256 amount) internal view { } function checkTxLimit(address sender, uint256 amount) internal view { } function shouldTakeFee(address sender) internal view returns (bool) { } function getTotalFee(bool selling) public view returns (uint256) { } function checkImpactEstimate(uint256 amount) public view returns (uint256) { } function takeFee(address sender, address recipient, uint256 amount) internal returns (uint256) { } function shouldSwapBack(address sender, address recipient) internal view returns (bool) { } function swapBack(uint256 amount) internal swapping { } function launched() internal view returns (bool) { } function getCirculatingSupply() public view returns (uint256) { } function getLiquidityBacking(uint256 accuracy) public view returns (uint256) { } function isOverLiquified(uint256 target, uint256 accuracy) public view returns (bool) { } function transferOwnership(address newOwner) public virtual override onlyOwner { } function lockContract(uint256 _weeks) external onlyOwner { } function unlockContract() external { } function renounceOwnership() public virtual override onlyOwner { } function _checkOwner() internal view virtual override { } function setProtectionEnabled(bool _protect) external onlyOwner { } function setProtection(address _protection, bool _call) external onlyOwner { } function disableProtection() external onlyOwner { } function setLiquidityProvider(address _provider, bool _set) external onlyOwner { } function extractETH() external onlyOwner { } function setAntiDumpTax(uint256 _tax, uint256 _period, uint256 _threshold, bool _reserve0) external onlyOwner { } function launch(uint256 _deadBlocks, bool _whitelistMode) external payable onlyOwner { } function endWhitelist(uint256 _deadBlocks) external onlyOwner { } function updateWhitelist(address[] calldata _addresses, bool _enabled) external onlyOwner { } function setTxLimit(uint256 thousandths) external onlyOwner { } function getTransactionLimit() public view returns (uint256) { } function setMaxWallet(uint256 thousandths) external onlyOwner() { } function getMaximumWallet() public view returns (uint256) { } function setIsFeeExempt(address holder, bool exempt) external onlyOwner { } function setIsTxLimitExempt(address holder, bool exempt) external onlyOwner { } function setFees(uint256 _liquidityFee, uint256 _liquiditySellFee, uint256 _marketingFee, uint256 _marketingSellFee, uint256 _feeDenominator) external onlyOwner { require((_liquidityFee / 2) * 2 == _liquidityFee, "Liquidity fee must be an even number due to rounding"); require(<FILL_ME>) liquidityFee = _liquidityFee; liquiditySellFee = _liquiditySellFee; marketingFee = _marketingFee; marketingSellFee = _marketingSellFee; totalBuyFee = _liquidityFee + _marketingFee; totalSellFee = _liquiditySellFee + _marketingSellFee; feeDenominator = _feeDenominator; require(totalBuyFee + totalSellFee <= feeDenominator / 5, "Fees too high"); emit FeesSet(totalBuyFee, totalSellFee, feeDenominator); } function setSwapBackSettings(bool _enabled, uint256 _denominator, uint256 _denominatorMin) external onlyOwner { } function setTargetLiquidity(uint256 _target, uint256 _denominator) external onlyOwner { } function addLiquidityPool(address _pool, bool _enabled) external onlyOwner { } function airdrop(address[] calldata _addresses, uint256[] calldata _amount) external onlyOwner { } event AutoLiquify(uint256 amount, uint256 amountToken); event ProtectionSet(address indexed protection); event ProtectionDisabled(); event LiquidityProviderSet(address indexed provider, bool isSet); event TradingLaunched(); event TransactionLimitSet(uint256 limit); event MaxWalletSet(uint256 limit); event FeeExemptSet(address indexed wallet, bool isExempt); event TrasactionLimitExemptSet(address indexed wallet, bool isExempt); event FeesSet(uint256 totalBuyFees, uint256 totalSellFees, uint256 denominator); event SwapSettingsSet(uint256 minimum, uint256 maximum, bool enabled); event LiquidityPoolSet(address indexed pool, bool enabled); event AirdropSent(address indexed from); event AntiDumpTaxSet(uint256 rate, uint256 period, uint256 threshold); event TargetLiquiditySet(uint256 percent); event ProtectionToggle(bool isEnabled); }
(_liquiditySellFee/2)*2==_liquiditySellFee,"Liquidity fee must be an even number due to rounding"
457,509
(_liquiditySellFee/2)*2==_liquiditySellFee
"Can't airdrop the liquidity pool or address 0"
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; 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 verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { } function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { } function _revert(bytes memory returndata, string memory errorMessage) private pure { } } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address from, address to, uint256 amount ) external returns (bool); } interface IDEXPair { function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); } interface IDEXFactory { function createPair(address tokenA, address tokenB) external returns (address pair); function getPair(address tokenA, address tokenB) external view returns (address pair); } interface IDEXRouter { 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 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 is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } modifier onlyOwner() { } function owner() public view virtual returns (address) { } function _checkOwner() internal view virtual { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } interface IAntiSnipe { function setTokenOwner(address owner, address pair) external; function onPreTransferCheck( address sender, address from, address to, uint256 amount ) external returns (bool checked); } contract Kal is IERC20, Ownable { using Address for address; address constant DEAD = 0x000000000000000000000000000000000000dEaD; string constant _name = "Kal"; string constant _symbol = "KAL"; uint8 constant _decimals = 9; uint256 _totalSupply = 1_000_000_000 * (10 ** _decimals); //For ease to the end-user these checks do not adjust for burnt tokens and should be set accordingly. uint256 _maxTxAmount = 5; //0.5% uint256 _maxWalletSize = 10; //1% mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) _allowances; mapping (address => uint256) lastSell; mapping (address => uint256) lastSellAmount; mapping (address => bool) isFeeExempt; mapping (address => bool) isTxLimitExempt; uint256 marketingFee = 40; uint256 marketingSellFee = 40; uint256 liquidityFee = 20; uint256 liquiditySellFee = 20; uint256 totalBuyFee = marketingFee + liquidityFee; uint256 totalSellFee = marketingSellFee + liquiditySellFee; uint256 feeDenominator = 1000; uint256 antiDumpTax = 200; uint256 antiDumpPeriod = 30 minutes; uint256 antiDumpThreshold = 21; bool antiDumpReserve0 = true; address public constant liquidityReceiver = DEAD; address payable public immutable marketingReceiver; uint256 targetLiquidity = 10; uint256 targetLiquidityDenominator = 100; IDEXRouter public immutable router; address constant routerAddress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; mapping (address => bool) liquidityPools; mapping (address => bool) liquidityProviders; address public pair; uint256 public launchedAt; uint256 public launchedTime; uint256 public deadBlocks; IAntiSnipe public antisnipe; bool public protectionEnabled = false; bool public protectionDisabled = false; bool public swapEnabled = true; uint256 public swapThreshold = _totalSupply / 400; //0.25% uint256 public swapMinimum = _totalSupply / 10000; //0.01% uint256 public maxSwapPercent = 75; uint256 public unlocksAt; address public locker; mapping (address => bool) public whitelist; bool public whitelistEnabled = true; bool inSwap; modifier swapping() { } constructor (address _liquidityProvider, address _marketingWallet) { } receive() external payable { } function totalSupply() external view override returns (uint256) { } function decimals() external pure returns (uint8) { } function symbol() external pure returns (string memory) { } function name() external pure returns (string memory) { } function getOwner() external view returns (address) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address holder, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public 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) internal virtual { } function approveMax(address spender) external returns (bool) { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) { } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function checkWalletLimit(address recipient, uint256 amount) internal view { } function checkTxLimit(address sender, uint256 amount) internal view { } function shouldTakeFee(address sender) internal view returns (bool) { } function getTotalFee(bool selling) public view returns (uint256) { } function checkImpactEstimate(uint256 amount) public view returns (uint256) { } function takeFee(address sender, address recipient, uint256 amount) internal returns (uint256) { } function shouldSwapBack(address sender, address recipient) internal view returns (bool) { } function swapBack(uint256 amount) internal swapping { } function launched() internal view returns (bool) { } function getCirculatingSupply() public view returns (uint256) { } function getLiquidityBacking(uint256 accuracy) public view returns (uint256) { } function isOverLiquified(uint256 target, uint256 accuracy) public view returns (bool) { } function transferOwnership(address newOwner) public virtual override onlyOwner { } function lockContract(uint256 _weeks) external onlyOwner { } function unlockContract() external { } function renounceOwnership() public virtual override onlyOwner { } function _checkOwner() internal view virtual override { } function setProtectionEnabled(bool _protect) external onlyOwner { } function setProtection(address _protection, bool _call) external onlyOwner { } function disableProtection() external onlyOwner { } function setLiquidityProvider(address _provider, bool _set) external onlyOwner { } function extractETH() external onlyOwner { } function setAntiDumpTax(uint256 _tax, uint256 _period, uint256 _threshold, bool _reserve0) external onlyOwner { } function launch(uint256 _deadBlocks, bool _whitelistMode) external payable onlyOwner { } function endWhitelist(uint256 _deadBlocks) external onlyOwner { } function updateWhitelist(address[] calldata _addresses, bool _enabled) external onlyOwner { } function setTxLimit(uint256 thousandths) external onlyOwner { } function getTransactionLimit() public view returns (uint256) { } function setMaxWallet(uint256 thousandths) external onlyOwner() { } function getMaximumWallet() public view returns (uint256) { } function setIsFeeExempt(address holder, bool exempt) external onlyOwner { } function setIsTxLimitExempt(address holder, bool exempt) external onlyOwner { } function setFees(uint256 _liquidityFee, uint256 _liquiditySellFee, uint256 _marketingFee, uint256 _marketingSellFee, uint256 _feeDenominator) external onlyOwner { } function setSwapBackSettings(bool _enabled, uint256 _denominator, uint256 _denominatorMin) external onlyOwner { } function setTargetLiquidity(uint256 _target, uint256 _denominator) external onlyOwner { } function addLiquidityPool(address _pool, bool _enabled) external onlyOwner { } function airdrop(address[] calldata _addresses, uint256[] calldata _amount) external onlyOwner { require(_addresses.length == _amount.length, "Array lengths don't match"); bool previousSwap = swapEnabled; swapEnabled = false; //This function may run out of gas intentionally to prevent partial airdrops for (uint256 i = 0; i < _addresses.length; i++) { require(<FILL_ME>) _transferFrom(msg.sender, _addresses[i], _amount[i] * (10 ** _decimals)); } swapEnabled = previousSwap; emit AirdropSent(msg.sender); } event AutoLiquify(uint256 amount, uint256 amountToken); event ProtectionSet(address indexed protection); event ProtectionDisabled(); event LiquidityProviderSet(address indexed provider, bool isSet); event TradingLaunched(); event TransactionLimitSet(uint256 limit); event MaxWalletSet(uint256 limit); event FeeExemptSet(address indexed wallet, bool isExempt); event TrasactionLimitExemptSet(address indexed wallet, bool isExempt); event FeesSet(uint256 totalBuyFees, uint256 totalSellFees, uint256 denominator); event SwapSettingsSet(uint256 minimum, uint256 maximum, bool enabled); event LiquidityPoolSet(address indexed pool, bool enabled); event AirdropSent(address indexed from); event AntiDumpTaxSet(uint256 rate, uint256 period, uint256 threshold); event TargetLiquiditySet(uint256 percent); event ProtectionToggle(bool isEnabled); }
!liquidityPools[_addresses[i]]&&_addresses[i]!=address(0),"Can't airdrop the liquidity pool or address 0"
457,509
!liquidityPools[_addresses[i]]&&_addresses[i]!=address(0)
"Address cannot be contract"
/** 0xFutures Website: 0xFutures.trade Twitter: twitter.com/0xFutures_ Telegram: https://t.me/ZeroFutures Bot: https://t.me/ZeroFutures_bot **/ // SPDX-License-Identifier: MIT pragma solidity 0.8.21; pragma experimental ABIEncoderV2; abstract contract Ownable { address private _owner; constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } library SafeERC20 { function safeTransfer(address token, address to, uint256 value) internal { } } interface IERC20 { function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external; } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline) external; function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); } contract ZxFuturesBot is Ownable { string private constant _name = unicode"0xFutures Bot"; string private constant _symbol = unicode"0xFutures"; uint256 private constant _totalSupply = 10_000_000 * 1e18; uint256 public maxTransactionAmount = 100_000 * 1e18; uint256 public maxWallet = 100_000 * 1e18; uint256 public swapTokensAtAmount = (_totalSupply * 2) / 10000; address private revWallet = 0xefd2F827308C82eec2a2C0e76948EA25eaC9b232; address private treasuryWallet = 0xb34e379eD7E3189908f921462d72c13299cd76F6; address private teamWallet = 0xFEC39FdECad7d09eFCa975b9f2849a90839ca0f4; address private constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; uint8 public buyTotalFees = 50; uint8 public sellTotalFees = 50; uint8 public revFee = 50; uint8 public treasuryFee = 25; uint8 public teamFee = 25; bool private swapping; bool public limitsInEffect = true; bool private launched; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) private _isExcludedMaxTransactionAmount; mapping(address => bool) private automatedMarketMakerPairs; event SwapAndLiquify(uint256 tokensSwapped, uint256 teamETH, uint256 revETH, uint256 TreasuryETH); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); IUniswapV2Router02 public constant uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); address public immutable uniswapV2Pair; constructor() { } receive() external payable {} function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure returns (uint256) { } function balanceOf(address account) public view returns (uint256) { } function allowance(address owner, address spender) public view returns (uint256) { } function approve(address spender, uint256 amount) external returns (bool) { } function _approve(address owner, address spender, uint256 amount) private { } function transfer(address recipient, uint256 amount) external returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external returns (bool) { } function _transfer(address from, address to, uint256 amount) private { } function removeLimits() external onlyOwner { } function setDistributionFees(uint8 _RevFee, uint8 _TreasuryFee, uint8 _teamFee) external onlyOwner { } function setFees(uint8 _buyTotalFees, uint8 _sellTotalFees) external onlyOwner { } function setExcludedFromFees(address account, bool excluded) public onlyOwner { } function setExcludedFromMaxTransaction(address account, bool excluded) public onlyOwner { } function airdropWallets(address[] memory addresses, uint256[] memory amounts) external onlyOwner { } function unleashThe0xFutures() external payable onlyOwner { } function setAutomatedMarketMakerPair(address pair, bool value) external onlyOwner { } function setSwapAtAmount(uint256 newSwapAmount) external onlyOwner { } function setMaxTxnAmount(uint256 newMaxTx) external onlyOwner { } function setMaxWalletAmount(uint256 newMaxWallet) external onlyOwner { } function updateRevWallet(address newAddress) external onlyOwner { } function updateTreasuryWallet(address newAddress) external onlyOwner { } function updateTeamWallet(address newAddress) external onlyOwner { require(newAddress != address(0), "Address cannot be zero"); require(<FILL_ME>) teamWallet = newAddress; } function excludedFromFee(address account) public view returns (bool) { } function withdrawStuckETH(address addr) external onlyOwner { } function isContract(address addr) internal view returns (bool) { } function swapBack() private { } }
isContract(newAddress)==false,"Address cannot be contract"
457,735
isContract(newAddress)==false
null
pragma solidity 0.8.11; /** * @title TokenVesting */ contract TokenVesting is Ownable, ReentrancyGuard{ using SafeMath for uint256; using SafeERC20 for IERC20; struct VestingSchedule{ bool initialized; // beneficiary of tokens after they are released address beneficiary; // cliff period in seconds uint256 cliff; // start time of the vesting period uint256 start; // duration of the vesting period in seconds uint256 duration; // duration of a slice period for the vesting in seconds uint256 slicePeriodSeconds; // whether or not the vesting is revocable bool revocable; // total amount of tokens to be released at the end of the vesting uint256 amountTotal; // amount of tokens released uint256 released; // whether or not the vesting has been revoked bool revoked; } // address of the ERC20 token IERC20 immutable private _token; bytes32[] private vestingSchedulesIds; mapping(bytes32 => VestingSchedule) private vestingSchedules; uint256 private vestingSchedulesTotalAmount; mapping(address => uint256) private holdersVestingCount; event Released(uint256 amount); event Revoked(); /** * @dev Reverts if no vesting schedule matches the passed identifier. */ modifier onlyIfVestingScheduleExists(bytes32 vestingScheduleId) { require(<FILL_ME>) _; } /** * @dev Reverts if the vesting schedule does not exist or has been revoked. */ modifier onlyIfVestingScheduleNotRevoked(bytes32 vestingScheduleId) { } /** * @dev Creates a vesting contract. */ constructor() { } receive() external payable {} fallback() external payable {} /** * @dev Returns the number of vesting schedules associated to a beneficiary. * @return the number of vesting schedules */ function getVestingSchedulesCountByBeneficiary(address _beneficiary) external view returns(uint256){ } /** * @dev Returns the vesting schedule id at the given index. * @return the vesting id */ function getVestingIdAtIndex(uint256 index) external view returns(bytes32){ } /** * @notice Returns the vesting schedule information for a given holder and index. * @return the vesting schedule structure information */ function getVestingScheduleByAddressAndIndex(address holder, uint256 index) external view returns(VestingSchedule memory){ } /** * @notice Returns the total amount of vesting schedules. * @return the total amount of vesting schedules */ function getVestingSchedulesTotalAmount() external view returns(uint256){ } /** * @dev Returns the address of the ERC20 token managed by the vesting contract. */ function getToken() external view returns(address){ } /** * @notice Creates a new vesting schedule for a beneficiary. * @param _beneficiary address of the beneficiary to whom vested tokens are transferred * @param _start start time of the vesting period * @param _cliff duration in seconds of the cliff in which tokens will begin to vest * @param _duration duration in seconds of the period in which the tokens will vest * @param _slicePeriodSeconds duration of a slice period for the vesting in seconds * @param _revocable whether the vesting is revocable or not * @param _amount total amount of tokens to be released at the end of the vesting */ function createVestingSchedule( address _beneficiary, uint256 _start, uint256 _cliff, uint256 _duration, uint256 _slicePeriodSeconds, bool _revocable, uint256 _amount ) public onlyOwner{ } /** * @notice Revokes the vesting schedule for given identifier. * @param vestingScheduleId the vesting schedule identifier */ function revoke(bytes32 vestingScheduleId) public onlyOwner onlyIfVestingScheduleNotRevoked(vestingScheduleId){ } /** * @notice Withdraw the specified amount if possible. * @param amount the amount to withdraw */ function withdraw(uint256 amount) public nonReentrant onlyOwner{ } /** * @notice Release vested amount of tokens. * @param vestingScheduleId the vesting schedule identifier * @param amount the amount to release */ function release( bytes32 vestingScheduleId, uint256 amount ) public nonReentrant onlyIfVestingScheduleNotRevoked(vestingScheduleId){ } /** * @dev Returns the number of vesting schedules managed by this contract. * @return the number of vesting schedules */ function getVestingSchedulesCount() public view returns(uint256){ } /** * @notice Computes the vested amount of tokens for the given vesting schedule identifier. * @return the vested amount */ function computeReleasableAmount(bytes32 vestingScheduleId) public onlyIfVestingScheduleNotRevoked(vestingScheduleId) view returns(uint256){ } /** * @notice Returns the vesting schedule information for a given identifier. * @return the vesting schedule structure information */ function getVestingSchedule(bytes32 vestingScheduleId) public view returns(VestingSchedule memory){ } /** * @dev Returns the amount of tokens that can be withdrawn by the owner. * @return the amount of tokens */ function getWithdrawableAmount() public view returns(uint256){ } /** * @dev Computes the next vesting schedule identifier for a given holder address. */ function computeNextVestingScheduleIdForHolder(address holder) public view returns(bytes32){ } /** * @dev Returns the last vesting schedule for a given holder address. */ function getLastVestingScheduleForHolder(address holder) public view returns(VestingSchedule memory){ } /** * @dev Computes the vesting schedule identifier for an address and an index. */ function computeVestingScheduleIdForAddressAndIndex(address holder, uint256 index) public pure returns(bytes32){ } /** * @dev Computes the releasable amount of tokens for a vesting schedule. * @return the amount of releasable tokens */ function _computeReleasableAmount(VestingSchedule memory vestingSchedule) internal view returns(uint256){ } function getCurrentTime() internal virtual view returns(uint256){ } }
vestingSchedules[vestingScheduleId].initialized==true
457,762
vestingSchedules[vestingScheduleId].initialized==true
null
pragma solidity 0.8.11; /** * @title TokenVesting */ contract TokenVesting is Ownable, ReentrancyGuard{ using SafeMath for uint256; using SafeERC20 for IERC20; struct VestingSchedule{ bool initialized; // beneficiary of tokens after they are released address beneficiary; // cliff period in seconds uint256 cliff; // start time of the vesting period uint256 start; // duration of the vesting period in seconds uint256 duration; // duration of a slice period for the vesting in seconds uint256 slicePeriodSeconds; // whether or not the vesting is revocable bool revocable; // total amount of tokens to be released at the end of the vesting uint256 amountTotal; // amount of tokens released uint256 released; // whether or not the vesting has been revoked bool revoked; } // address of the ERC20 token IERC20 immutable private _token; bytes32[] private vestingSchedulesIds; mapping(bytes32 => VestingSchedule) private vestingSchedules; uint256 private vestingSchedulesTotalAmount; mapping(address => uint256) private holdersVestingCount; event Released(uint256 amount); event Revoked(); /** * @dev Reverts if no vesting schedule matches the passed identifier. */ modifier onlyIfVestingScheduleExists(bytes32 vestingScheduleId) { } /** * @dev Reverts if the vesting schedule does not exist or has been revoked. */ modifier onlyIfVestingScheduleNotRevoked(bytes32 vestingScheduleId) { require(vestingSchedules[vestingScheduleId].initialized == true); require(<FILL_ME>) _; } /** * @dev Creates a vesting contract. */ constructor() { } receive() external payable {} fallback() external payable {} /** * @dev Returns the number of vesting schedules associated to a beneficiary. * @return the number of vesting schedules */ function getVestingSchedulesCountByBeneficiary(address _beneficiary) external view returns(uint256){ } /** * @dev Returns the vesting schedule id at the given index. * @return the vesting id */ function getVestingIdAtIndex(uint256 index) external view returns(bytes32){ } /** * @notice Returns the vesting schedule information for a given holder and index. * @return the vesting schedule structure information */ function getVestingScheduleByAddressAndIndex(address holder, uint256 index) external view returns(VestingSchedule memory){ } /** * @notice Returns the total amount of vesting schedules. * @return the total amount of vesting schedules */ function getVestingSchedulesTotalAmount() external view returns(uint256){ } /** * @dev Returns the address of the ERC20 token managed by the vesting contract. */ function getToken() external view returns(address){ } /** * @notice Creates a new vesting schedule for a beneficiary. * @param _beneficiary address of the beneficiary to whom vested tokens are transferred * @param _start start time of the vesting period * @param _cliff duration in seconds of the cliff in which tokens will begin to vest * @param _duration duration in seconds of the period in which the tokens will vest * @param _slicePeriodSeconds duration of a slice period for the vesting in seconds * @param _revocable whether the vesting is revocable or not * @param _amount total amount of tokens to be released at the end of the vesting */ function createVestingSchedule( address _beneficiary, uint256 _start, uint256 _cliff, uint256 _duration, uint256 _slicePeriodSeconds, bool _revocable, uint256 _amount ) public onlyOwner{ } /** * @notice Revokes the vesting schedule for given identifier. * @param vestingScheduleId the vesting schedule identifier */ function revoke(bytes32 vestingScheduleId) public onlyOwner onlyIfVestingScheduleNotRevoked(vestingScheduleId){ } /** * @notice Withdraw the specified amount if possible. * @param amount the amount to withdraw */ function withdraw(uint256 amount) public nonReentrant onlyOwner{ } /** * @notice Release vested amount of tokens. * @param vestingScheduleId the vesting schedule identifier * @param amount the amount to release */ function release( bytes32 vestingScheduleId, uint256 amount ) public nonReentrant onlyIfVestingScheduleNotRevoked(vestingScheduleId){ } /** * @dev Returns the number of vesting schedules managed by this contract. * @return the number of vesting schedules */ function getVestingSchedulesCount() public view returns(uint256){ } /** * @notice Computes the vested amount of tokens for the given vesting schedule identifier. * @return the vested amount */ function computeReleasableAmount(bytes32 vestingScheduleId) public onlyIfVestingScheduleNotRevoked(vestingScheduleId) view returns(uint256){ } /** * @notice Returns the vesting schedule information for a given identifier. * @return the vesting schedule structure information */ function getVestingSchedule(bytes32 vestingScheduleId) public view returns(VestingSchedule memory){ } /** * @dev Returns the amount of tokens that can be withdrawn by the owner. * @return the amount of tokens */ function getWithdrawableAmount() public view returns(uint256){ } /** * @dev Computes the next vesting schedule identifier for a given holder address. */ function computeNextVestingScheduleIdForHolder(address holder) public view returns(bytes32){ } /** * @dev Returns the last vesting schedule for a given holder address. */ function getLastVestingScheduleForHolder(address holder) public view returns(VestingSchedule memory){ } /** * @dev Computes the vesting schedule identifier for an address and an index. */ function computeVestingScheduleIdForAddressAndIndex(address holder, uint256 index) public pure returns(bytes32){ } /** * @dev Computes the releasable amount of tokens for a vesting schedule. * @return the amount of releasable tokens */ function _computeReleasableAmount(VestingSchedule memory vestingSchedule) internal view returns(uint256){ } function getCurrentTime() internal virtual view returns(uint256){ } }
vestingSchedules[vestingScheduleId].revoked==false
457,762
vestingSchedules[vestingScheduleId].revoked==false
"TokenVesting: cannot create vesting schedule because not sufficient tokens"
pragma solidity 0.8.11; /** * @title TokenVesting */ contract TokenVesting is Ownable, ReentrancyGuard{ using SafeMath for uint256; using SafeERC20 for IERC20; struct VestingSchedule{ bool initialized; // beneficiary of tokens after they are released address beneficiary; // cliff period in seconds uint256 cliff; // start time of the vesting period uint256 start; // duration of the vesting period in seconds uint256 duration; // duration of a slice period for the vesting in seconds uint256 slicePeriodSeconds; // whether or not the vesting is revocable bool revocable; // total amount of tokens to be released at the end of the vesting uint256 amountTotal; // amount of tokens released uint256 released; // whether or not the vesting has been revoked bool revoked; } // address of the ERC20 token IERC20 immutable private _token; bytes32[] private vestingSchedulesIds; mapping(bytes32 => VestingSchedule) private vestingSchedules; uint256 private vestingSchedulesTotalAmount; mapping(address => uint256) private holdersVestingCount; event Released(uint256 amount); event Revoked(); /** * @dev Reverts if no vesting schedule matches the passed identifier. */ modifier onlyIfVestingScheduleExists(bytes32 vestingScheduleId) { } /** * @dev Reverts if the vesting schedule does not exist or has been revoked. */ modifier onlyIfVestingScheduleNotRevoked(bytes32 vestingScheduleId) { } /** * @dev Creates a vesting contract. */ constructor() { } receive() external payable {} fallback() external payable {} /** * @dev Returns the number of vesting schedules associated to a beneficiary. * @return the number of vesting schedules */ function getVestingSchedulesCountByBeneficiary(address _beneficiary) external view returns(uint256){ } /** * @dev Returns the vesting schedule id at the given index. * @return the vesting id */ function getVestingIdAtIndex(uint256 index) external view returns(bytes32){ } /** * @notice Returns the vesting schedule information for a given holder and index. * @return the vesting schedule structure information */ function getVestingScheduleByAddressAndIndex(address holder, uint256 index) external view returns(VestingSchedule memory){ } /** * @notice Returns the total amount of vesting schedules. * @return the total amount of vesting schedules */ function getVestingSchedulesTotalAmount() external view returns(uint256){ } /** * @dev Returns the address of the ERC20 token managed by the vesting contract. */ function getToken() external view returns(address){ } /** * @notice Creates a new vesting schedule for a beneficiary. * @param _beneficiary address of the beneficiary to whom vested tokens are transferred * @param _start start time of the vesting period * @param _cliff duration in seconds of the cliff in which tokens will begin to vest * @param _duration duration in seconds of the period in which the tokens will vest * @param _slicePeriodSeconds duration of a slice period for the vesting in seconds * @param _revocable whether the vesting is revocable or not * @param _amount total amount of tokens to be released at the end of the vesting */ function createVestingSchedule( address _beneficiary, uint256 _start, uint256 _cliff, uint256 _duration, uint256 _slicePeriodSeconds, bool _revocable, uint256 _amount ) public onlyOwner{ require(<FILL_ME>) require(_duration > 0, "TokenVesting: duration must be > 0"); require(_amount > 0, "TokenVesting: amount must be > 0"); require(_slicePeriodSeconds >= 1, "TokenVesting: slicePeriodSeconds must be >= 1"); bytes32 vestingScheduleId = this.computeNextVestingScheduleIdForHolder(_beneficiary); uint256 cliff = _start.add(_cliff); vestingSchedules[vestingScheduleId] = VestingSchedule( true, _beneficiary, cliff, _start, _duration, _slicePeriodSeconds, _revocable, _amount, 0, false ); vestingSchedulesTotalAmount = vestingSchedulesTotalAmount.add(_amount); vestingSchedulesIds.push(vestingScheduleId); uint256 currentVestingCount = holdersVestingCount[_beneficiary]; holdersVestingCount[_beneficiary] = currentVestingCount.add(1); } /** * @notice Revokes the vesting schedule for given identifier. * @param vestingScheduleId the vesting schedule identifier */ function revoke(bytes32 vestingScheduleId) public onlyOwner onlyIfVestingScheduleNotRevoked(vestingScheduleId){ } /** * @notice Withdraw the specified amount if possible. * @param amount the amount to withdraw */ function withdraw(uint256 amount) public nonReentrant onlyOwner{ } /** * @notice Release vested amount of tokens. * @param vestingScheduleId the vesting schedule identifier * @param amount the amount to release */ function release( bytes32 vestingScheduleId, uint256 amount ) public nonReentrant onlyIfVestingScheduleNotRevoked(vestingScheduleId){ } /** * @dev Returns the number of vesting schedules managed by this contract. * @return the number of vesting schedules */ function getVestingSchedulesCount() public view returns(uint256){ } /** * @notice Computes the vested amount of tokens for the given vesting schedule identifier. * @return the vested amount */ function computeReleasableAmount(bytes32 vestingScheduleId) public onlyIfVestingScheduleNotRevoked(vestingScheduleId) view returns(uint256){ } /** * @notice Returns the vesting schedule information for a given identifier. * @return the vesting schedule structure information */ function getVestingSchedule(bytes32 vestingScheduleId) public view returns(VestingSchedule memory){ } /** * @dev Returns the amount of tokens that can be withdrawn by the owner. * @return the amount of tokens */ function getWithdrawableAmount() public view returns(uint256){ } /** * @dev Computes the next vesting schedule identifier for a given holder address. */ function computeNextVestingScheduleIdForHolder(address holder) public view returns(bytes32){ } /** * @dev Returns the last vesting schedule for a given holder address. */ function getLastVestingScheduleForHolder(address holder) public view returns(VestingSchedule memory){ } /** * @dev Computes the vesting schedule identifier for an address and an index. */ function computeVestingScheduleIdForAddressAndIndex(address holder, uint256 index) public pure returns(bytes32){ } /** * @dev Computes the releasable amount of tokens for a vesting schedule. * @return the amount of releasable tokens */ function _computeReleasableAmount(VestingSchedule memory vestingSchedule) internal view returns(uint256){ } function getCurrentTime() internal virtual view returns(uint256){ } }
this.getWithdrawableAmount()>=_amount,"TokenVesting: cannot create vesting schedule because not sufficient tokens"
457,762
this.getWithdrawableAmount()>=_amount
"not exist"
// Market contract pragma solidity ^0.8.0; contract Market is Ownable, ERC721Holder { using SafeMath for uint256; uint256 public constant PERCENTS_DIVIDER = 1000; uint256 public feeAdmin = 30; // 3% fee address public adminAddress; /* Pairs to swap NFT _id => price */ struct Pair { uint256 pair_id; address collection; uint256 token_id; address owner; uint256 price; bool bValid; } address[] public collections; // collection address => creator address // token id => Pair mapping mapping(uint256 => Pair) public pairs; uint256 public currentPairId; uint256 public totalEarning; /* Total earning */ uint256 public totalSwapped; /* Total swap count */ /** Events */ event ItemListed(uint256 id, address collection, uint256 token_id, uint256 price, address owner); event ItemDelisted(uint256 id); event PriceUpdated(uint256 id, uint256 price); event Swapped(address buyer, Pair pair); constructor(address _adminAddress) { } function setFee(uint256 _feeAdmin, address _adminAddress) external onlyOwner { } function list(address _collection, uint256 _token_id, uint256 _price) public OnlyItemOwner(_collection, _token_id) { } function delist(uint256 _id) external { require(<FILL_ME>) require(msg.sender == pairs[_id].owner || msg.sender == owner(), "Error, you are not the owner"); IERC721(pairs[_id].collection).safeTransferFrom(address(this),pairs[_id].owner,pairs[_id].token_id); pairs[_id].bValid = false; emit ItemDelisted(_id); } function updatePrice(uint256 _id, uint256 _price) external { } function buy(uint256 _id) external payable { } function withdrawCoin() public onlyOwner { } modifier OnlyItemOwner(address tokenAddress, uint256 tokenId) { } }
pairs[_id].bValid,"not exist"
457,765
pairs[_id].bValid
"owner can not buy"
// Market contract pragma solidity ^0.8.0; contract Market is Ownable, ERC721Holder { using SafeMath for uint256; uint256 public constant PERCENTS_DIVIDER = 1000; uint256 public feeAdmin = 30; // 3% fee address public adminAddress; /* Pairs to swap NFT _id => price */ struct Pair { uint256 pair_id; address collection; uint256 token_id; address owner; uint256 price; bool bValid; } address[] public collections; // collection address => creator address // token id => Pair mapping mapping(uint256 => Pair) public pairs; uint256 public currentPairId; uint256 public totalEarning; /* Total earning */ uint256 public totalSwapped; /* Total swap count */ /** Events */ event ItemListed(uint256 id, address collection, uint256 token_id, uint256 price, address owner); event ItemDelisted(uint256 id); event PriceUpdated(uint256 id, uint256 price); event Swapped(address buyer, Pair pair); constructor(address _adminAddress) { } function setFee(uint256 _feeAdmin, address _adminAddress) external onlyOwner { } function list(address _collection, uint256 _token_id, uint256 _price) public OnlyItemOwner(_collection, _token_id) { } function delist(uint256 _id) external { } function updatePrice(uint256 _id, uint256 _price) external { } function buy(uint256 _id) external payable { require(_id <= currentPairId && pairs[_id].pair_id == _id,"Could not find item"); require(pairs[_id].bValid, "invalid Pair id"); require(<FILL_ME>) Pair memory pair = pairs[_id]; uint256 totalAmount = pair.price; require(msg.value >= totalAmount, "insufficient balance"); // transfer coin to feeAdmin if (feeAdmin > 0) { payable(adminAddress).transfer(totalAmount.mul(feeAdmin).div(PERCENTS_DIVIDER)); } // transfer coin to owner uint256 ownerPercent = PERCENTS_DIVIDER.sub(feeAdmin); payable(pair.owner).transfer(totalAmount.mul(ownerPercent).div(PERCENTS_DIVIDER)); // transfer NFT token to buyer IERC721(pairs[_id].collection).safeTransferFrom(address(this),msg.sender,pair.token_id); pairs[_id].bValid = false; totalEarning = totalEarning.add(totalAmount); totalSwapped = totalSwapped.add(1); emit Swapped(msg.sender, pair); } function withdrawCoin() public onlyOwner { } modifier OnlyItemOwner(address tokenAddress, uint256 tokenId) { } }
pairs[_id].owner!=msg.sender,"owner can not buy"
457,765
pairs[_id].owner!=msg.sender
null
// Market contract pragma solidity ^0.8.0; contract Market is Ownable, ERC721Holder { using SafeMath for uint256; uint256 public constant PERCENTS_DIVIDER = 1000; uint256 public feeAdmin = 30; // 3% fee address public adminAddress; /* Pairs to swap NFT _id => price */ struct Pair { uint256 pair_id; address collection; uint256 token_id; address owner; uint256 price; bool bValid; } address[] public collections; // collection address => creator address // token id => Pair mapping mapping(uint256 => Pair) public pairs; uint256 public currentPairId; uint256 public totalEarning; /* Total earning */ uint256 public totalSwapped; /* Total swap count */ /** Events */ event ItemListed(uint256 id, address collection, uint256 token_id, uint256 price, address owner); event ItemDelisted(uint256 id); event PriceUpdated(uint256 id, uint256 price); event Swapped(address buyer, Pair pair); constructor(address _adminAddress) { } function setFee(uint256 _feeAdmin, address _adminAddress) external onlyOwner { } function list(address _collection, uint256 _token_id, uint256 _price) public OnlyItemOwner(_collection, _token_id) { } function delist(uint256 _id) external { } function updatePrice(uint256 _id, uint256 _price) external { } function buy(uint256 _id) external payable { } function withdrawCoin() public onlyOwner { } modifier OnlyItemOwner(address tokenAddress, uint256 tokenId) { IERC721 tokenContract = IERC721(tokenAddress); require(<FILL_ME>) _; } }
tokenContract.ownerOf(tokenId)==msg.sender
457,765
tokenContract.ownerOf(tokenId)==msg.sender
"check bet amount"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; contract Bet { event Deposit(address indexed sender, uint256 amount, uint256 balance); event BetPaid(address winner, uint256 total_pot); address public bettor; uint256 public bettor_val; string public betDetails; address public taker; uint256 public taker_val; uint256 public days_til_end; address[] public players; address[] public approval; uint256 public endDate; uint256 public total_pot; uint256 public atStake; mapping(address => uint256) public isPlayer; mapping(address => bool) public isOwner; modifier onlyOwner() { } //units are in Wei receive() external payable onlyOwner { require(<FILL_ME>) isPlayer[msg.sender] = msg.value; emit Deposit(msg.sender, msg.value, address(this).balance); } constructor( address _bettor, uint256 _bettor_val, string memory _betDetails, address _taker, uint256 _taker_val, uint256 _days_til_end ) payable { } // the loser or arbitor must approve FIRST!!! winner should verify approval is filled. the second approver gets the money function payUp(address _outcome) public onlyOwner { } // anyone can revert the bets after the time is up function revertBets() public { } } contract BetFactory { Bet[] public bets_array; function createBet( address _bettor, uint256 _bettor_val, string memory _betDetails, address _taker, uint256 _taker_val, uint256 _days_til_end ) public payable { } receive() external payable {} function getBet(uint256 _index) public view returns ( address bettor, uint256 bettor_val, string memory betDetails, address taker, uint256 taker_val, uint256 days_til_end ) { } }
(msg.value==bettor_val)||(msg.value==taker_val),"check bet amount"
457,769
(msg.value==bettor_val)||(msg.value==taker_val)
"Cannot set lower than 1%"
// SPDX-License-Identifier: MIT /* #MOFA https://twitter.com/MOFA_PROJECT "Every record has been destroyed or falsified, every book rewritten, every picture repainted, every statue, street, and, building renamed, every date altered. And the process continues day by day... Nothing exists except an endless present in which the Party is always right" - George Orwell (1984) */ pragma solidity =0.8.15; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; contract MakeOrwellFictionAgain is ERC20, Ownable { address public devaddress; bool private swapping; bool public swapEnabled = true; bool public tradingEnabled; uint256 public maxBuyAmount; uint256 public maxSellAmount; uint256 public maxWallet; address public pair; uint256 public buyTaxes = 4; uint256 public sellTaxes = 4; uint256 public totalBuyTax = 4; uint256 public totalSellTax = 4; IUniswapRouter public router; uint256 public swapTokensAtAmount; mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) private _isExcludedFromMaxWallet; mapping(address => bool) public automatedMarketMakerPairs; mapping(address => bool) public _Bot; event ExcludeFromFees(address indexed account, bool isExcluded); event ExcludeMultipleAccountsFromFees(address[] accounts, bool isExcluded); event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); constructor(address DevWallet) ERC20("Make Orwell Fiction Again", "MOFA") { } receive() external payable {} function excludeFromFees(address account, bool excluded) public onlyOwner { } function excludeFromMaxWallet(address account, bool excluded) public onlyOwner { } function excludeMultipleAccountsFromFees( address[] calldata accounts, bool excluded ) public onlyOwner { } function setDeveloperwallet(address wallet) public onlyOwner { } function updateMaxWalletAmount(uint256 newNum) public onlyOwner { require(<FILL_ME>) maxWallet = newNum * (10**18); } function setbot(address bot, bool value) external onlyOwner { } function setBulkBot(address[] memory bots, bool value) external onlyOwner { } function setMaxBuyAndSell(uint256 maxbuy, uint256 maxsell) public onlyOwner { } function setSwapTokensAtAmount(uint256 amount) public onlyOwner { } function setSwapEnabled(bool _enabled) external onlyOwner { } function Geteth(address tokenAddress) external onlyOwner { } function forceSend() external onlyOwner { } function setBuytax(uint256 new_fee) external onlyOwner { } function setSellTax(uint256 new_fee) external onlyOwner { } function activateTrading() external onlyOwner { } function setAutomatedMarketMakerPair(address newPair, bool value) external onlyOwner { } function _setAutomatedMarketMakerPair(address newPair, bool value) private { } function isExcludedFromFees(address account) public view returns (bool) { } function _transfer( address from, address to, uint256 amount ) internal override { } function swap(uint256 tokens) private { } function swapTokensForETH(uint256 tokenAmount) private { } } interface IUniswapFactory { function createPair(address tokenA, address tokenB) external returns (address pair); function getPair(address tokenA, address tokenB) external view returns (address pair); } interface IUniswapRouter { 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 swapExactTokensForTokensSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function swapExactETHForTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable returns (uint256[] memory amounts); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; }
newNum>(1000000),"Cannot set lower than 1%"
457,802
newNum>(1000000)
null
// SPDX-License-Identifier: MIT /* #MOFA https://twitter.com/MOFA_PROJECT "Every record has been destroyed or falsified, every book rewritten, every picture repainted, every statue, street, and, building renamed, every date altered. And the process continues day by day... Nothing exists except an endless present in which the Party is always right" - George Orwell (1984) */ pragma solidity =0.8.15; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; contract MakeOrwellFictionAgain is ERC20, Ownable { address public devaddress; bool private swapping; bool public swapEnabled = true; bool public tradingEnabled; uint256 public maxBuyAmount; uint256 public maxSellAmount; uint256 public maxWallet; address public pair; uint256 public buyTaxes = 4; uint256 public sellTaxes = 4; uint256 public totalBuyTax = 4; uint256 public totalSellTax = 4; IUniswapRouter public router; uint256 public swapTokensAtAmount; mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) private _isExcludedFromMaxWallet; mapping(address => bool) public automatedMarketMakerPairs; mapping(address => bool) public _Bot; event ExcludeFromFees(address indexed account, bool isExcluded); event ExcludeMultipleAccountsFromFees(address[] accounts, bool isExcluded); event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); constructor(address DevWallet) ERC20("Make Orwell Fiction Again", "MOFA") { } receive() external payable {} function excludeFromFees(address account, bool excluded) public onlyOwner { } function excludeFromMaxWallet(address account, bool excluded) public onlyOwner { } function excludeMultipleAccountsFromFees( address[] calldata accounts, bool excluded ) public onlyOwner { } function setDeveloperwallet(address wallet) public onlyOwner { } function updateMaxWalletAmount(uint256 newNum) public onlyOwner { } function setbot(address bot, bool value) external onlyOwner { require(<FILL_ME>) _Bot[bot] = value; } function setBulkBot(address[] memory bots, bool value) external onlyOwner { } function setMaxBuyAndSell(uint256 maxbuy, uint256 maxsell) public onlyOwner { } function setSwapTokensAtAmount(uint256 amount) public onlyOwner { } function setSwapEnabled(bool _enabled) external onlyOwner { } function Geteth(address tokenAddress) external onlyOwner { } function forceSend() external onlyOwner { } function setBuytax(uint256 new_fee) external onlyOwner { } function setSellTax(uint256 new_fee) external onlyOwner { } function activateTrading() external onlyOwner { } function setAutomatedMarketMakerPair(address newPair, bool value) external onlyOwner { } function _setAutomatedMarketMakerPair(address newPair, bool value) private { } function isExcludedFromFees(address account) public view returns (bool) { } function _transfer( address from, address to, uint256 amount ) internal override { } function swap(uint256 tokens) private { } function swapTokensForETH(uint256 tokenAmount) private { } } interface IUniswapFactory { function createPair(address tokenA, address tokenB) external returns (address pair); function getPair(address tokenA, address tokenB) external view returns (address pair); } interface IUniswapRouter { 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 swapExactTokensForTokensSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function swapExactETHForTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable returns (uint256[] memory amounts); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; }
_Bot[bot]!=value
457,802
_Bot[bot]!=value
null
// SPDX-License-Identifier: MIT /* #MOFA https://twitter.com/MOFA_PROJECT "Every record has been destroyed or falsified, every book rewritten, every picture repainted, every statue, street, and, building renamed, every date altered. And the process continues day by day... Nothing exists except an endless present in which the Party is always right" - George Orwell (1984) */ pragma solidity =0.8.15; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; contract MakeOrwellFictionAgain is ERC20, Ownable { address public devaddress; bool private swapping; bool public swapEnabled = true; bool public tradingEnabled; uint256 public maxBuyAmount; uint256 public maxSellAmount; uint256 public maxWallet; address public pair; uint256 public buyTaxes = 4; uint256 public sellTaxes = 4; uint256 public totalBuyTax = 4; uint256 public totalSellTax = 4; IUniswapRouter public router; uint256 public swapTokensAtAmount; mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) private _isExcludedFromMaxWallet; mapping(address => bool) public automatedMarketMakerPairs; mapping(address => bool) public _Bot; event ExcludeFromFees(address indexed account, bool isExcluded); event ExcludeMultipleAccountsFromFees(address[] accounts, bool isExcluded); event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); constructor(address DevWallet) ERC20("Make Orwell Fiction Again", "MOFA") { } receive() external payable {} function excludeFromFees(address account, bool excluded) public onlyOwner { } function excludeFromMaxWallet(address account, bool excluded) public onlyOwner { } function excludeMultipleAccountsFromFees( address[] calldata accounts, bool excluded ) public onlyOwner { } function setDeveloperwallet(address wallet) public onlyOwner { } function updateMaxWalletAmount(uint256 newNum) public onlyOwner { } function setbot(address bot, bool value) external onlyOwner { } function setBulkBot(address[] memory bots, bool value) external onlyOwner { } function setMaxBuyAndSell(uint256 maxbuy, uint256 maxsell) public onlyOwner { } function setSwapTokensAtAmount(uint256 amount) public onlyOwner { } function setSwapEnabled(bool _enabled) external onlyOwner { } function Geteth(address tokenAddress) external onlyOwner { } function forceSend() external onlyOwner { } function setBuytax(uint256 new_fee) external onlyOwner { } function setSellTax(uint256 new_fee) external onlyOwner { } function activateTrading() external onlyOwner { } function setAutomatedMarketMakerPair(address newPair, bool value) external onlyOwner { } function _setAutomatedMarketMakerPair(address newPair, bool value) private { } function isExcludedFromFees(address account) public view returns (bool) { } 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>) if ( !_isExcludedFromFees[from] && !_isExcludedFromFees[to] && !swapping ) { require(tradingEnabled, "Trading not active"); if (automatedMarketMakerPairs[to]) { require( amount <= maxSellAmount, "You are exceeding max-sellamount" ); } else if (automatedMarketMakerPairs[from]) require( amount <= maxBuyAmount, "You are exceeding max-buyamount" ); if (!_isExcludedFromMaxWallet[to]) { require( amount + balanceOf(to) <= maxWallet, "Unable to exceed maxwallet" ); } } if (amount == 0) { super._transfer(from, to, 0); return; } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= swapTokensAtAmount; if ( canSwap && !swapping && swapEnabled && automatedMarketMakerPairs[to] && !_isExcludedFromFees[from] && !_isExcludedFromFees[to] ) { swapping = true; if (totalSellTax > 0) { swap(swapTokensAtAmount); } swapping = false; } bool takeFee = !swapping; if (_isExcludedFromFees[from] || _isExcludedFromFees[to]) { takeFee = false; } if (!automatedMarketMakerPairs[to] && !automatedMarketMakerPairs[from]) takeFee = false; if (takeFee) { uint256 feeAmt; if (automatedMarketMakerPairs[to]) feeAmt = (amount * totalSellTax) / 100; else if (automatedMarketMakerPairs[from]) feeAmt = (amount * totalBuyTax) / 100; amount = amount - feeAmt; super._transfer(from, address(this), feeAmt); } super._transfer(from, to, amount); } function swap(uint256 tokens) private { } function swapTokensForETH(uint256 tokenAmount) private { } } interface IUniswapFactory { function createPair(address tokenA, address tokenB) external returns (address pair); function getPair(address tokenA, address tokenB) external view returns (address pair); } interface IUniswapRouter { 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 swapExactTokensForTokensSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function swapExactETHForTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable returns (uint256[] memory amounts); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; }
!_Bot[from]&&!_Bot[to]
457,802
!_Bot[from]&&!_Bot[to]
null
/** */ // SPDX-License-Identifier: UNLICENSED /** The king of all Doges has arrived. SmokeDogeInu is here to become your big meme coin across the ERC20 along with use-cases. All holders of SmokeDogeInu will receive 3% reward on each transaction buy/sell. Low Tax 7% Max Buy 1% Anti whale Telegram:https://t.me/Smokedogeinu **/ pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract SMOKEDOGE is Context, IERC20, Ownable { using SafeMath for uint256; 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) private bots; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 10000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; uint256 private _sellTax; uint256 private _buyTax; address payable private _feeAddress; string private constant _name = "SMOKEDOGE"; string private constant _symbol = "SMOKEDOGE"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private removeMaxTx = false; uint256 private _maxTxAmount = _tTotal; uint256 private _maxHoldAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { } constructor () { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function setRemoveMaxTx(bool onoff) external onlyOwner() { } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { } 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(!bots[from]); if (!_isExcludedFromFee[from] && !_isExcludedFromFee[to] ) { _feeAddr1 = 0; _feeAddr2 = _buyTax; if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && removeMaxTx) { uint walletBalance = balanceOf(address(to)); require(amount <= _maxTxAmount); require(<FILL_ME>) } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 0; _feeAddr2 = _sellTax; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { uint burnAmount = contractTokenBalance/4; contractTokenBalance -= burnAmount; burnToken(burnAmount); swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function burnToken(uint burnAmount) private lockTheSwap{ } function _setMaxTxAmount(uint256 maxTxAmount) external onlyOwner() { } function _setMaxHoldAmount(uint256 maxHoldAmount) external onlyOwner() { } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function sendETHToFee(uint256 amount) private { } function createPair() external onlyOwner(){ } function openTrading() external onlyOwner() { } function setBots(address[] memory bots_) public onlyOwner { } function delBot(address notbot) public onlyOwner { } function _tokenTransfer(address sender, address recipient, uint256 amount) 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 manualswap() public onlyOwner() { } function manualsend() public onlyOwner() { } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { } function _getRate() private view returns(uint256) { } function _setSellTax(uint256 sellTax) external onlyOwner() { } function setBuyTax(uint256 buyTax) external onlyOwner() { } function _getCurrentSupply() private view returns(uint256, uint256) { } }
amount.add(walletBalance)<=_maxHoldAmount
457,814
amount.add(walletBalance)<=_maxHoldAmount
"ERC20: out of balance to burn"
pragma solidity ^0.5.0; import "./IBEP20.sol"; import "./SafeMath.sol"; /** * @dev Implementation of the {IBEP20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20Mintable}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IBEP20-approve}. */ contract ERC20 is IBEP20 { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IBEP20-totalSupply}. */ function totalSupply() public view returns (uint256) { } /** * @dev See {IBEP20-balanceOf}. */ function balanceOf(address account) public view returns (uint256) { } /** * @dev See {IBEP20-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 payable returns (bool) { } /** * @dev See {IBEP20-allowance}. */ function allowance(address owner, address spender) public view returns (uint256) { } /** * @dev See {IBEP20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 value) public returns (bool) { } /** * @dev See {IBEP20-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 `value`. * - the caller must have allowance for `sender`'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public 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 {IBEP20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public 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 {IBEP20-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 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 { } /** @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 { } /** * @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 value) internal { require(account != address(0), "ERC20: burn from the zero address"); require(<FILL_ME>) _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is 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 value) internal { } /** * @dev Destoys `amount` tokens from `account`.`amount` is then deducted * from the caller's allowance. * * See {_burn} and {_approve}. */ function _burnFrom(address account, uint256 amount) internal { } }
_balances[account]>_balances[account].sub(value),"ERC20: out of balance to burn"
457,887
_balances[account]>_balances[account].sub(value)
"LilShen: Mint is not active"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "./ERC721MT.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract Shen is DefaultOperatorFilterer, ERC721MT, Ownable { using SafeMath for uint256; using Strings for uint256; uint256 public constant MAX_SUPPLY = 5555; uint256 public constant MAX_WL_SUPPLY = 3000; uint256 public constant MAX_WL_MINT = 5; uint256 public constant MAX_FM_SUPPLY = 300; uint256 public WL_MINT_START = 1672772400; uint256 public FREE_MINT_START = WL_MINT_START + 1 hours; uint256 public PUBLIC_MINT_START = FREE_MINT_START + 3 hours; address public constant TEAM_WALLET = address(0x53226df5BE0dA81e9D495B6168db190C12De87Fa); string private _baseTokenURI = "https://shennft.mypinata.cloud/ipfs/QmaRvTd2ZDquUM9SYMJePoPRYiUF1TwwpNGwAx9RBt2JYU/"; uint256 public constant WL_PRICE = 0.02 ether; uint256 public constant PUBLIC_PRICE = 0.04 ether; bytes32 public merkleRoot = 0x671f6320b86bec49823aa5c391d54ec36c7e10b99849975926bf19d6ac2d642f; bool public isWlSaleActive = false; bool public isFreeMintActive = false; bool public isPublicSaleActive = false; bool public freeMintActive = true; uint256 public fmCount = 0; uint256 public wlMintedCount = 0; uint256 public freeMintedCount = 0; mapping(address => bool) public isWL; mapping(address => uint256) public wlMints; mapping(address => uint256) public freeMintCount; constructor() ERC721MT("Shen", "SHEN") {} function mint(uint256 numberOfTokens) external payable { require(msg.sender == tx.origin, "LilShen: Contracts can't mint"); require(<FILL_ME>) if (freeMintActive) { require(totalSupply() - freeMintedCount < MAX_SUPPLY - fmCount, "LilShen: Sold Out"); require((fmCount == freeMintedCount && totalSupply() + numberOfTokens <= MAX_SUPPLY) || (fmCount != freeMintedCount && totalSupply() - freeMintedCount + numberOfTokens < MAX_SUPPLY - fmCount), "LilShen: Exceed the max supply"); } else { require(totalSupply() < MAX_SUPPLY, "LilShen: Sold Out"); require(totalSupply() + numberOfTokens <= MAX_SUPPLY, "LilShen: Exceed the max supply"); } require(msg.value == getPrice(numberOfTokens), "LilShen: Wrong eth value"); mintTokens(numberOfTokens); } function wlMint(uint256 numberOfTokens, bytes32[] calldata _merkleProof) external payable { } function freeMint(uint256 numberOfTokens) external { } function reserveTokens(uint256 quantity) public onlyOwner { } function getPrice(uint256 quantity) public view returns (uint256) { } function getWlPrice(uint256 quantity) public view returns (uint256) { } function walletOfOwner(address address_) public view returns (uint256[] memory) { } /* === Owner === */ function changeState(bool _isWlSaleActive, bool _isFreeMintActive, bool _isPublicSaleActive) external onlyOwner { } function toggleFreeMint() external onlyOwner { } function addFreeMintBatch(address[] calldata users) external onlyOwner { } function addMultipleFreeMint(address user, uint32 qty) external onlyOwner { } function changeMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } function addWlBatch(address[] calldata users) external onlyOwner { } function withdraw() external onlyOwner { } function setBaseURI(string calldata URI) external onlyOwner { } /* === Core === */ function mintTokens(uint256 quantity) private { } /* === Required Override === */ function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721MT) returns (string memory) { } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override onlyAllowedOperator(from) { } }
isPublicSaleActive||block.timestamp>=PUBLIC_MINT_START,"LilShen: Mint is not active"
457,995
isPublicSaleActive||block.timestamp>=PUBLIC_MINT_START
"LilShen: Sold Out"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "./ERC721MT.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract Shen is DefaultOperatorFilterer, ERC721MT, Ownable { using SafeMath for uint256; using Strings for uint256; uint256 public constant MAX_SUPPLY = 5555; uint256 public constant MAX_WL_SUPPLY = 3000; uint256 public constant MAX_WL_MINT = 5; uint256 public constant MAX_FM_SUPPLY = 300; uint256 public WL_MINT_START = 1672772400; uint256 public FREE_MINT_START = WL_MINT_START + 1 hours; uint256 public PUBLIC_MINT_START = FREE_MINT_START + 3 hours; address public constant TEAM_WALLET = address(0x53226df5BE0dA81e9D495B6168db190C12De87Fa); string private _baseTokenURI = "https://shennft.mypinata.cloud/ipfs/QmaRvTd2ZDquUM9SYMJePoPRYiUF1TwwpNGwAx9RBt2JYU/"; uint256 public constant WL_PRICE = 0.02 ether; uint256 public constant PUBLIC_PRICE = 0.04 ether; bytes32 public merkleRoot = 0x671f6320b86bec49823aa5c391d54ec36c7e10b99849975926bf19d6ac2d642f; bool public isWlSaleActive = false; bool public isFreeMintActive = false; bool public isPublicSaleActive = false; bool public freeMintActive = true; uint256 public fmCount = 0; uint256 public wlMintedCount = 0; uint256 public freeMintedCount = 0; mapping(address => bool) public isWL; mapping(address => uint256) public wlMints; mapping(address => uint256) public freeMintCount; constructor() ERC721MT("Shen", "SHEN") {} function mint(uint256 numberOfTokens) external payable { require(msg.sender == tx.origin, "LilShen: Contracts can't mint"); require(isPublicSaleActive || block.timestamp >= PUBLIC_MINT_START, "LilShen: Mint is not active"); if (freeMintActive) { require(<FILL_ME>) require((fmCount == freeMintedCount && totalSupply() + numberOfTokens <= MAX_SUPPLY) || (fmCount != freeMintedCount && totalSupply() - freeMintedCount + numberOfTokens < MAX_SUPPLY - fmCount), "LilShen: Exceed the max supply"); } else { require(totalSupply() < MAX_SUPPLY, "LilShen: Sold Out"); require(totalSupply() + numberOfTokens <= MAX_SUPPLY, "LilShen: Exceed the max supply"); } require(msg.value == getPrice(numberOfTokens), "LilShen: Wrong eth value"); mintTokens(numberOfTokens); } function wlMint(uint256 numberOfTokens, bytes32[] calldata _merkleProof) external payable { } function freeMint(uint256 numberOfTokens) external { } function reserveTokens(uint256 quantity) public onlyOwner { } function getPrice(uint256 quantity) public view returns (uint256) { } function getWlPrice(uint256 quantity) public view returns (uint256) { } function walletOfOwner(address address_) public view returns (uint256[] memory) { } /* === Owner === */ function changeState(bool _isWlSaleActive, bool _isFreeMintActive, bool _isPublicSaleActive) external onlyOwner { } function toggleFreeMint() external onlyOwner { } function addFreeMintBatch(address[] calldata users) external onlyOwner { } function addMultipleFreeMint(address user, uint32 qty) external onlyOwner { } function changeMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } function addWlBatch(address[] calldata users) external onlyOwner { } function withdraw() external onlyOwner { } function setBaseURI(string calldata URI) external onlyOwner { } /* === Core === */ function mintTokens(uint256 quantity) private { } /* === Required Override === */ function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721MT) returns (string memory) { } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override onlyAllowedOperator(from) { } }
totalSupply()-freeMintedCount<MAX_SUPPLY-fmCount,"LilShen: Sold Out"
457,995
totalSupply()-freeMintedCount<MAX_SUPPLY-fmCount
"LilShen: Exceed the max supply"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "./ERC721MT.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract Shen is DefaultOperatorFilterer, ERC721MT, Ownable { using SafeMath for uint256; using Strings for uint256; uint256 public constant MAX_SUPPLY = 5555; uint256 public constant MAX_WL_SUPPLY = 3000; uint256 public constant MAX_WL_MINT = 5; uint256 public constant MAX_FM_SUPPLY = 300; uint256 public WL_MINT_START = 1672772400; uint256 public FREE_MINT_START = WL_MINT_START + 1 hours; uint256 public PUBLIC_MINT_START = FREE_MINT_START + 3 hours; address public constant TEAM_WALLET = address(0x53226df5BE0dA81e9D495B6168db190C12De87Fa); string private _baseTokenURI = "https://shennft.mypinata.cloud/ipfs/QmaRvTd2ZDquUM9SYMJePoPRYiUF1TwwpNGwAx9RBt2JYU/"; uint256 public constant WL_PRICE = 0.02 ether; uint256 public constant PUBLIC_PRICE = 0.04 ether; bytes32 public merkleRoot = 0x671f6320b86bec49823aa5c391d54ec36c7e10b99849975926bf19d6ac2d642f; bool public isWlSaleActive = false; bool public isFreeMintActive = false; bool public isPublicSaleActive = false; bool public freeMintActive = true; uint256 public fmCount = 0; uint256 public wlMintedCount = 0; uint256 public freeMintedCount = 0; mapping(address => bool) public isWL; mapping(address => uint256) public wlMints; mapping(address => uint256) public freeMintCount; constructor() ERC721MT("Shen", "SHEN") {} function mint(uint256 numberOfTokens) external payable { require(msg.sender == tx.origin, "LilShen: Contracts can't mint"); require(isPublicSaleActive || block.timestamp >= PUBLIC_MINT_START, "LilShen: Mint is not active"); if (freeMintActive) { require(totalSupply() - freeMintedCount < MAX_SUPPLY - fmCount, "LilShen: Sold Out"); require(<FILL_ME>) } else { require(totalSupply() < MAX_SUPPLY, "LilShen: Sold Out"); require(totalSupply() + numberOfTokens <= MAX_SUPPLY, "LilShen: Exceed the max supply"); } require(msg.value == getPrice(numberOfTokens), "LilShen: Wrong eth value"); mintTokens(numberOfTokens); } function wlMint(uint256 numberOfTokens, bytes32[] calldata _merkleProof) external payable { } function freeMint(uint256 numberOfTokens) external { } function reserveTokens(uint256 quantity) public onlyOwner { } function getPrice(uint256 quantity) public view returns (uint256) { } function getWlPrice(uint256 quantity) public view returns (uint256) { } function walletOfOwner(address address_) public view returns (uint256[] memory) { } /* === Owner === */ function changeState(bool _isWlSaleActive, bool _isFreeMintActive, bool _isPublicSaleActive) external onlyOwner { } function toggleFreeMint() external onlyOwner { } function addFreeMintBatch(address[] calldata users) external onlyOwner { } function addMultipleFreeMint(address user, uint32 qty) external onlyOwner { } function changeMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } function addWlBatch(address[] calldata users) external onlyOwner { } function withdraw() external onlyOwner { } function setBaseURI(string calldata URI) external onlyOwner { } /* === Core === */ function mintTokens(uint256 quantity) private { } /* === Required Override === */ function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721MT) returns (string memory) { } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override onlyAllowedOperator(from) { } }
(fmCount==freeMintedCount&&totalSupply()+numberOfTokens<=MAX_SUPPLY)||(fmCount!=freeMintedCount&&totalSupply()-freeMintedCount+numberOfTokens<MAX_SUPPLY-fmCount),"LilShen: Exceed the max supply"
457,995
(fmCount==freeMintedCount&&totalSupply()+numberOfTokens<=MAX_SUPPLY)||(fmCount!=freeMintedCount&&totalSupply()-freeMintedCount+numberOfTokens<MAX_SUPPLY-fmCount)
"LilShen: WL Mint is not active"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "./ERC721MT.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract Shen is DefaultOperatorFilterer, ERC721MT, Ownable { using SafeMath for uint256; using Strings for uint256; uint256 public constant MAX_SUPPLY = 5555; uint256 public constant MAX_WL_SUPPLY = 3000; uint256 public constant MAX_WL_MINT = 5; uint256 public constant MAX_FM_SUPPLY = 300; uint256 public WL_MINT_START = 1672772400; uint256 public FREE_MINT_START = WL_MINT_START + 1 hours; uint256 public PUBLIC_MINT_START = FREE_MINT_START + 3 hours; address public constant TEAM_WALLET = address(0x53226df5BE0dA81e9D495B6168db190C12De87Fa); string private _baseTokenURI = "https://shennft.mypinata.cloud/ipfs/QmaRvTd2ZDquUM9SYMJePoPRYiUF1TwwpNGwAx9RBt2JYU/"; uint256 public constant WL_PRICE = 0.02 ether; uint256 public constant PUBLIC_PRICE = 0.04 ether; bytes32 public merkleRoot = 0x671f6320b86bec49823aa5c391d54ec36c7e10b99849975926bf19d6ac2d642f; bool public isWlSaleActive = false; bool public isFreeMintActive = false; bool public isPublicSaleActive = false; bool public freeMintActive = true; uint256 public fmCount = 0; uint256 public wlMintedCount = 0; uint256 public freeMintedCount = 0; mapping(address => bool) public isWL; mapping(address => uint256) public wlMints; mapping(address => uint256) public freeMintCount; constructor() ERC721MT("Shen", "SHEN") {} function mint(uint256 numberOfTokens) external payable { } function wlMint(uint256 numberOfTokens, bytes32[] calldata _merkleProof) external payable { require(msg.sender == tx.origin, "LilShen: Contracts can't mint"); require(<FILL_ME>) bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), "LilShen: User not whilisted"); require(numberOfTokens + wlMints[msg.sender] <= MAX_WL_MINT, "LilShen: Would exceed WL purchase limit"); require(wlMintedCount < MAX_WL_SUPPLY, "LilShen: WL SoldOut"); require(totalSupply() - freeMintedCount < MAX_SUPPLY - fmCount, "LilShen: Sold Out"); require((fmCount == freeMintedCount && totalSupply() + numberOfTokens <= MAX_SUPPLY) || (fmCount != freeMintedCount && totalSupply() - freeMintedCount + numberOfTokens < MAX_SUPPLY - fmCount), "LilShen: Exceed the max supply"); require(msg.value == getWlPrice(numberOfTokens), "LilShen: Wrong eth value"); wlMints[msg.sender] += numberOfTokens; wlMintedCount += numberOfTokens; mintTokens(numberOfTokens); } function freeMint(uint256 numberOfTokens) external { } function reserveTokens(uint256 quantity) public onlyOwner { } function getPrice(uint256 quantity) public view returns (uint256) { } function getWlPrice(uint256 quantity) public view returns (uint256) { } function walletOfOwner(address address_) public view returns (uint256[] memory) { } /* === Owner === */ function changeState(bool _isWlSaleActive, bool _isFreeMintActive, bool _isPublicSaleActive) external onlyOwner { } function toggleFreeMint() external onlyOwner { } function addFreeMintBatch(address[] calldata users) external onlyOwner { } function addMultipleFreeMint(address user, uint32 qty) external onlyOwner { } function changeMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } function addWlBatch(address[] calldata users) external onlyOwner { } function withdraw() external onlyOwner { } function setBaseURI(string calldata URI) external onlyOwner { } /* === Core === */ function mintTokens(uint256 quantity) private { } /* === Required Override === */ function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721MT) returns (string memory) { } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override onlyAllowedOperator(from) { } }
isWlSaleActive||block.timestamp>=WL_MINT_START,"LilShen: WL Mint is not active"
457,995
isWlSaleActive||block.timestamp>=WL_MINT_START
"LilShen: Would exceed WL purchase limit"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "./ERC721MT.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract Shen is DefaultOperatorFilterer, ERC721MT, Ownable { using SafeMath for uint256; using Strings for uint256; uint256 public constant MAX_SUPPLY = 5555; uint256 public constant MAX_WL_SUPPLY = 3000; uint256 public constant MAX_WL_MINT = 5; uint256 public constant MAX_FM_SUPPLY = 300; uint256 public WL_MINT_START = 1672772400; uint256 public FREE_MINT_START = WL_MINT_START + 1 hours; uint256 public PUBLIC_MINT_START = FREE_MINT_START + 3 hours; address public constant TEAM_WALLET = address(0x53226df5BE0dA81e9D495B6168db190C12De87Fa); string private _baseTokenURI = "https://shennft.mypinata.cloud/ipfs/QmaRvTd2ZDquUM9SYMJePoPRYiUF1TwwpNGwAx9RBt2JYU/"; uint256 public constant WL_PRICE = 0.02 ether; uint256 public constant PUBLIC_PRICE = 0.04 ether; bytes32 public merkleRoot = 0x671f6320b86bec49823aa5c391d54ec36c7e10b99849975926bf19d6ac2d642f; bool public isWlSaleActive = false; bool public isFreeMintActive = false; bool public isPublicSaleActive = false; bool public freeMintActive = true; uint256 public fmCount = 0; uint256 public wlMintedCount = 0; uint256 public freeMintedCount = 0; mapping(address => bool) public isWL; mapping(address => uint256) public wlMints; mapping(address => uint256) public freeMintCount; constructor() ERC721MT("Shen", "SHEN") {} function mint(uint256 numberOfTokens) external payable { } function wlMint(uint256 numberOfTokens, bytes32[] calldata _merkleProof) external payable { require(msg.sender == tx.origin, "LilShen: Contracts can't mint"); require(isWlSaleActive || block.timestamp >= WL_MINT_START, "LilShen: WL Mint is not active"); bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), "LilShen: User not whilisted"); require(<FILL_ME>) require(wlMintedCount < MAX_WL_SUPPLY, "LilShen: WL SoldOut"); require(totalSupply() - freeMintedCount < MAX_SUPPLY - fmCount, "LilShen: Sold Out"); require((fmCount == freeMintedCount && totalSupply() + numberOfTokens <= MAX_SUPPLY) || (fmCount != freeMintedCount && totalSupply() - freeMintedCount + numberOfTokens < MAX_SUPPLY - fmCount), "LilShen: Exceed the max supply"); require(msg.value == getWlPrice(numberOfTokens), "LilShen: Wrong eth value"); wlMints[msg.sender] += numberOfTokens; wlMintedCount += numberOfTokens; mintTokens(numberOfTokens); } function freeMint(uint256 numberOfTokens) external { } function reserveTokens(uint256 quantity) public onlyOwner { } function getPrice(uint256 quantity) public view returns (uint256) { } function getWlPrice(uint256 quantity) public view returns (uint256) { } function walletOfOwner(address address_) public view returns (uint256[] memory) { } /* === Owner === */ function changeState(bool _isWlSaleActive, bool _isFreeMintActive, bool _isPublicSaleActive) external onlyOwner { } function toggleFreeMint() external onlyOwner { } function addFreeMintBatch(address[] calldata users) external onlyOwner { } function addMultipleFreeMint(address user, uint32 qty) external onlyOwner { } function changeMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } function addWlBatch(address[] calldata users) external onlyOwner { } function withdraw() external onlyOwner { } function setBaseURI(string calldata URI) external onlyOwner { } /* === Core === */ function mintTokens(uint256 quantity) private { } /* === Required Override === */ function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721MT) returns (string memory) { } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override onlyAllowedOperator(from) { } }
numberOfTokens+wlMints[msg.sender]<=MAX_WL_MINT,"LilShen: Would exceed WL purchase limit"
457,995
numberOfTokens+wlMints[msg.sender]<=MAX_WL_MINT
"LilShen: Free Mint is not active"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "./ERC721MT.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract Shen is DefaultOperatorFilterer, ERC721MT, Ownable { using SafeMath for uint256; using Strings for uint256; uint256 public constant MAX_SUPPLY = 5555; uint256 public constant MAX_WL_SUPPLY = 3000; uint256 public constant MAX_WL_MINT = 5; uint256 public constant MAX_FM_SUPPLY = 300; uint256 public WL_MINT_START = 1672772400; uint256 public FREE_MINT_START = WL_MINT_START + 1 hours; uint256 public PUBLIC_MINT_START = FREE_MINT_START + 3 hours; address public constant TEAM_WALLET = address(0x53226df5BE0dA81e9D495B6168db190C12De87Fa); string private _baseTokenURI = "https://shennft.mypinata.cloud/ipfs/QmaRvTd2ZDquUM9SYMJePoPRYiUF1TwwpNGwAx9RBt2JYU/"; uint256 public constant WL_PRICE = 0.02 ether; uint256 public constant PUBLIC_PRICE = 0.04 ether; bytes32 public merkleRoot = 0x671f6320b86bec49823aa5c391d54ec36c7e10b99849975926bf19d6ac2d642f; bool public isWlSaleActive = false; bool public isFreeMintActive = false; bool public isPublicSaleActive = false; bool public freeMintActive = true; uint256 public fmCount = 0; uint256 public wlMintedCount = 0; uint256 public freeMintedCount = 0; mapping(address => bool) public isWL; mapping(address => uint256) public wlMints; mapping(address => uint256) public freeMintCount; constructor() ERC721MT("Shen", "SHEN") {} function mint(uint256 numberOfTokens) external payable { } function wlMint(uint256 numberOfTokens, bytes32[] calldata _merkleProof) external payable { } function freeMint(uint256 numberOfTokens) external { require(msg.sender == tx.origin, "LilShen: Contracts can't mint"); require(<FILL_ME>) require(totalSupply() < MAX_SUPPLY, "LilShen: Sold Out"); require(totalSupply() + numberOfTokens <= MAX_SUPPLY, "LilShen: Exceed the max supply"); require(numberOfTokens <= freeMintCount[msg.sender], "LilShen: Too much free mint requested"); freeMintCount[msg.sender] -= numberOfTokens; freeMintedCount += numberOfTokens; mintTokens(numberOfTokens); } function reserveTokens(uint256 quantity) public onlyOwner { } function getPrice(uint256 quantity) public view returns (uint256) { } function getWlPrice(uint256 quantity) public view returns (uint256) { } function walletOfOwner(address address_) public view returns (uint256[] memory) { } /* === Owner === */ function changeState(bool _isWlSaleActive, bool _isFreeMintActive, bool _isPublicSaleActive) external onlyOwner { } function toggleFreeMint() external onlyOwner { } function addFreeMintBatch(address[] calldata users) external onlyOwner { } function addMultipleFreeMint(address user, uint32 qty) external onlyOwner { } function changeMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } function addWlBatch(address[] calldata users) external onlyOwner { } function withdraw() external onlyOwner { } function setBaseURI(string calldata URI) external onlyOwner { } /* === Core === */ function mintTokens(uint256 quantity) private { } /* === Required Override === */ function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721MT) returns (string memory) { } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override onlyAllowedOperator(from) { } }
isFreeMintActive||block.timestamp>=FREE_MINT_START,"LilShen: Free Mint is not active"
457,995
isFreeMintActive||block.timestamp>=FREE_MINT_START
null
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "./ERC721MT.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract Shen is DefaultOperatorFilterer, ERC721MT, Ownable { using SafeMath for uint256; using Strings for uint256; uint256 public constant MAX_SUPPLY = 5555; uint256 public constant MAX_WL_SUPPLY = 3000; uint256 public constant MAX_WL_MINT = 5; uint256 public constant MAX_FM_SUPPLY = 300; uint256 public WL_MINT_START = 1672772400; uint256 public FREE_MINT_START = WL_MINT_START + 1 hours; uint256 public PUBLIC_MINT_START = FREE_MINT_START + 3 hours; address public constant TEAM_WALLET = address(0x53226df5BE0dA81e9D495B6168db190C12De87Fa); string private _baseTokenURI = "https://shennft.mypinata.cloud/ipfs/QmaRvTd2ZDquUM9SYMJePoPRYiUF1TwwpNGwAx9RBt2JYU/"; uint256 public constant WL_PRICE = 0.02 ether; uint256 public constant PUBLIC_PRICE = 0.04 ether; bytes32 public merkleRoot = 0x671f6320b86bec49823aa5c391d54ec36c7e10b99849975926bf19d6ac2d642f; bool public isWlSaleActive = false; bool public isFreeMintActive = false; bool public isPublicSaleActive = false; bool public freeMintActive = true; uint256 public fmCount = 0; uint256 public wlMintedCount = 0; uint256 public freeMintedCount = 0; mapping(address => bool) public isWL; mapping(address => uint256) public wlMints; mapping(address => uint256) public freeMintCount; constructor() ERC721MT("Shen", "SHEN") {} function mint(uint256 numberOfTokens) external payable { } function wlMint(uint256 numberOfTokens, bytes32[] calldata _merkleProof) external payable { } function freeMint(uint256 numberOfTokens) external { } function reserveTokens(uint256 quantity) public onlyOwner { } function getPrice(uint256 quantity) public view returns (uint256) { } function getWlPrice(uint256 quantity) public view returns (uint256) { } function walletOfOwner(address address_) public view returns (uint256[] memory) { } /* === Owner === */ function changeState(bool _isWlSaleActive, bool _isFreeMintActive, bool _isPublicSaleActive) external onlyOwner { } function toggleFreeMint() external onlyOwner { } function addFreeMintBatch(address[] calldata users) external onlyOwner { } function addMultipleFreeMint(address user, uint32 qty) external onlyOwner { } function changeMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } function addWlBatch(address[] calldata users) external onlyOwner { } function withdraw() external onlyOwner { require(<FILL_ME>) } function setBaseURI(string calldata URI) external onlyOwner { } /* === Core === */ function mintTokens(uint256 quantity) private { } /* === Required Override === */ function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721MT) returns (string memory) { } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override onlyAllowedOperator(from) { } }
payable(TEAM_WALLET).send(address(this).balance)
457,995
payable(TEAM_WALLET).send(address(this).balance)
"NOT_ENOUGH_TOKENS"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "./ERC721A.sol"; contract BoxenNft is ERC721A, Ownable { constructor() ERC721A("Box of boxen", "bob") {} string private _uri; address public constant boxenToken = 0xc05d8c246e441Ed41d3cF6Bd48f0607946F8Ba27; uint public constant maxSupply = 7777; uint public constant maxLegendaryMint = 500; bool public saleStatus = false; uint public price = 77 * 10**14; uint public maxPerTx = 5; uint public maxPerWallet = 5; uint public legendaryBoxenPrice = 770000 * 10**18; uint public ratio = 30000000; uint public legendaryMintCount = 0; bool private isLegendaryMint = false; enum NFT_TYPE { BOX_LEGENDARY, BOX_RARE, BOX_UNNORMOL, KEY_LULU } // --------------------------------------------------------------------------------------------- // MAPPINGS // --------------------------------------------------------------------------------------------- mapping(address => uint) public feeMinted; mapping(uint256 => NFT_TYPE) public tokenType; // --------------------------------------------------------------------------------------------- // OWNER SETTERS // --------------------------------------------------------------------------------------------- function withdraw() external onlyOwner { } function withdrawBoxen() external onlyOwner { } function setSaleStatus() external onlyOwner { } function setPrice(uint amount) external onlyOwner { } function setLegendaryBoxenPrice(uint amount) external onlyOwner { } function setMaxPerTx(uint amount) external onlyOwner { } function setMaxPerWallet(uint amount) external onlyOwner { } function setBaseURI(string calldata uri_) external onlyOwner { } function setRatio(uint _ratio) external onlyOwner { } function _baseURI() internal view override returns (string memory) { } function _getType(uint256 tokenId) internal view returns (NFT_TYPE nftType) { } function _afterTokenTransfers( address from, address, uint256 startTokenId, uint256 quantity ) internal override { } function devMint(uint256 amount) external onlyOwner { require(amount > 0, "AMOUNT_ERROR!"); require(<FILL_ME>) _safeMint(msg.sender, amount); } function getPayBoxenAmount(uint256 mintAmount, uint256 ethValue) public view returns (uint256 amount) { } function getPayEthAmount(uint256 mintAmount, uint256 boxenValue) public view returns (uint256 payEthAmount, uint256 boxenRemainder) { } function getCanMintAmount(address addr) public view returns (uint256 amount) { } function getCanLegendaryMintAmount() public view returns (uint256 amount) { } function mint(uint256 amount) external payable { } function legendaryMint(uint256 amount) external payable { } function burn(uint256 tokenId) external { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } }
(_totalMinted()+amount)<=maxSupply,"NOT_ENOUGH_TOKENS"
458,181
(_totalMinted()+amount)<=maxSupply
"EXCEEDS_MAX_PER_WALLET!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "./ERC721A.sol"; contract BoxenNft is ERC721A, Ownable { constructor() ERC721A("Box of boxen", "bob") {} string private _uri; address public constant boxenToken = 0xc05d8c246e441Ed41d3cF6Bd48f0607946F8Ba27; uint public constant maxSupply = 7777; uint public constant maxLegendaryMint = 500; bool public saleStatus = false; uint public price = 77 * 10**14; uint public maxPerTx = 5; uint public maxPerWallet = 5; uint public legendaryBoxenPrice = 770000 * 10**18; uint public ratio = 30000000; uint public legendaryMintCount = 0; bool private isLegendaryMint = false; enum NFT_TYPE { BOX_LEGENDARY, BOX_RARE, BOX_UNNORMOL, KEY_LULU } // --------------------------------------------------------------------------------------------- // MAPPINGS // --------------------------------------------------------------------------------------------- mapping(address => uint) public feeMinted; mapping(uint256 => NFT_TYPE) public tokenType; // --------------------------------------------------------------------------------------------- // OWNER SETTERS // --------------------------------------------------------------------------------------------- function withdraw() external onlyOwner { } function withdrawBoxen() external onlyOwner { } function setSaleStatus() external onlyOwner { } function setPrice(uint amount) external onlyOwner { } function setLegendaryBoxenPrice(uint amount) external onlyOwner { } function setMaxPerTx(uint amount) external onlyOwner { } function setMaxPerWallet(uint amount) external onlyOwner { } function setBaseURI(string calldata uri_) external onlyOwner { } function setRatio(uint _ratio) external onlyOwner { } function _baseURI() internal view override returns (string memory) { } function _getType(uint256 tokenId) internal view returns (NFT_TYPE nftType) { } function _afterTokenTransfers( address from, address, uint256 startTokenId, uint256 quantity ) internal override { } function devMint(uint256 amount) external onlyOwner { } function getPayBoxenAmount(uint256 mintAmount, uint256 ethValue) public view returns (uint256 amount) { } function getPayEthAmount(uint256 mintAmount, uint256 boxenValue) public view returns (uint256 payEthAmount, uint256 boxenRemainder) { } function getCanMintAmount(address addr) public view returns (uint256 amount) { } function getCanLegendaryMintAmount() public view returns (uint256 amount) { } function mint(uint256 amount) external payable { require(amount > 0, "AMOUNT_ERROR!"); require(saleStatus, "SALE_NOT_ACTIVE!"); require(tx.origin == msg.sender, "NOT_ALLOW_CONTRACT_CALL!"); require((_totalMinted() + amount) <= maxSupply, "NOT_ENOUGH_TOKENS!"); require(amount <= maxPerTx, "EXCEEDS_MAX_PER_TX!"); require(<FILL_ME>) uint expectPayAmount = amount * price; if (expectPayAmount > msg.value) { uint expectPayBoxenAmount = (expectPayAmount - msg.value) * ratio; SafeERC20.safeTransferFrom(IERC20(boxenToken), msg.sender, address(this), expectPayBoxenAmount); } _safeMint(msg.sender, amount); feeMinted[msg.sender] += amount; } function legendaryMint(uint256 amount) external payable { } function burn(uint256 tokenId) external { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } }
feeMinted[msg.sender]+amount<=maxPerWallet,"EXCEEDS_MAX_PER_WALLET!"
458,181
feeMinted[msg.sender]+amount<=maxPerWallet
"NOT_ENOUGH_TOKENS"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "./ERC721A.sol"; contract BoxenNft is ERC721A, Ownable { constructor() ERC721A("Box of boxen", "bob") {} string private _uri; address public constant boxenToken = 0xc05d8c246e441Ed41d3cF6Bd48f0607946F8Ba27; uint public constant maxSupply = 7777; uint public constant maxLegendaryMint = 500; bool public saleStatus = false; uint public price = 77 * 10**14; uint public maxPerTx = 5; uint public maxPerWallet = 5; uint public legendaryBoxenPrice = 770000 * 10**18; uint public ratio = 30000000; uint public legendaryMintCount = 0; bool private isLegendaryMint = false; enum NFT_TYPE { BOX_LEGENDARY, BOX_RARE, BOX_UNNORMOL, KEY_LULU } // --------------------------------------------------------------------------------------------- // MAPPINGS // --------------------------------------------------------------------------------------------- mapping(address => uint) public feeMinted; mapping(uint256 => NFT_TYPE) public tokenType; // --------------------------------------------------------------------------------------------- // OWNER SETTERS // --------------------------------------------------------------------------------------------- function withdraw() external onlyOwner { } function withdrawBoxen() external onlyOwner { } function setSaleStatus() external onlyOwner { } function setPrice(uint amount) external onlyOwner { } function setLegendaryBoxenPrice(uint amount) external onlyOwner { } function setMaxPerTx(uint amount) external onlyOwner { } function setMaxPerWallet(uint amount) external onlyOwner { } function setBaseURI(string calldata uri_) external onlyOwner { } function setRatio(uint _ratio) external onlyOwner { } function _baseURI() internal view override returns (string memory) { } function _getType(uint256 tokenId) internal view returns (NFT_TYPE nftType) { } function _afterTokenTransfers( address from, address, uint256 startTokenId, uint256 quantity ) internal override { } function devMint(uint256 amount) external onlyOwner { } function getPayBoxenAmount(uint256 mintAmount, uint256 ethValue) public view returns (uint256 amount) { } function getPayEthAmount(uint256 mintAmount, uint256 boxenValue) public view returns (uint256 payEthAmount, uint256 boxenRemainder) { } function getCanMintAmount(address addr) public view returns (uint256 amount) { } function getCanLegendaryMintAmount() public view returns (uint256 amount) { } function mint(uint256 amount) external payable { } function legendaryMint(uint256 amount) external payable { require(amount > 0, "AMOUNT_ERROR!"); require(saleStatus, "SALE_NOT_ACTIVE!"); require((_totalMinted() + amount) <= maxSupply, "NOT_ENOUGH_TOKENS!"); require(<FILL_ME>) legendaryMintCount += amount; require(msg.value >= amount * price, "NOT_ENOUGH_ETH"); SafeERC20.safeTransferFrom(IERC20(boxenToken), msg.sender, address(this), amount * legendaryBoxenPrice); isLegendaryMint = true; _safeMint(msg.sender, amount); isLegendaryMint = false; } function burn(uint256 tokenId) external { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } }
legendaryMintCount+amount<=maxLegendaryMint,"NOT_ENOUGH_TOKENS"
458,181
legendaryMintCount+amount<=maxLegendaryMint
"Rocket Pool node registrations are currently disabled"
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 | * +---------------------------------------------------+ * * Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned, * decentralised, trustless and compatible with staking in Ethereum 2.0. * * For more information about Rocket Pool, visit https://rocketpool.net * * Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty * */ pragma solidity 0.7.6; pragma abicoder v2; // SPDX-License-Identifier: GPL-3.0-only import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "../RocketBase.sol"; import "../../types/MinipoolStatus.sol"; import "../../types/NodeDetails.sol"; import "../../interface/node/RocketNodeManagerInterface.sol"; import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsNodeInterface.sol"; import "../../interface/util/AddressSetStorageInterface.sol"; import "../../interface/node/RocketNodeDistributorFactoryInterface.sol"; import "../../interface/minipool/RocketMinipoolManagerInterface.sol"; import "../../interface/node/RocketNodeDistributorInterface.sol"; import "../../interface/dao/node/settings/RocketDAONodeTrustedSettingsRewardsInterface.sol"; import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsRewardsInterface.sol"; import "../../interface/node/RocketNodeStakingInterface.sol"; import "../../interface/node/RocketNodeDepositInterface.sol"; import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsMinipoolInterface.sol"; // Node registration and management contract RocketNodeManager is RocketBase, RocketNodeManagerInterface { // Libraries using SafeMath for uint256; // Events event NodeRegistered(address indexed node, uint256 time); event NodeTimezoneLocationSet(address indexed node, uint256 time); event NodeRewardNetworkChanged(address indexed node, uint256 network); event NodeSmoothingPoolStateChanged(address indexed node, bool state); // Construct constructor(RocketStorageInterface _rocketStorageAddress) RocketBase(_rocketStorageAddress) { } // Get the number of nodes in the network function getNodeCount() override public view returns (uint256) { } // Get a breakdown of the number of nodes per timezone function getNodeCountPerTimezone(uint256 _offset, uint256 _limit) override external view returns (TimezoneCount[] memory) { } // Get a node address by index function getNodeAt(uint256 _index) override external view returns (address) { } // Check whether a node exists function getNodeExists(address _nodeAddress) override public view returns (bool) { } // Get a node's current withdrawal address function getNodeWithdrawalAddress(address _nodeAddress) override public view returns (address) { } // Get a node's pending withdrawal address function getNodePendingWithdrawalAddress(address _nodeAddress) override public view returns (address) { } // Get a node's timezone location function getNodeTimezoneLocation(address _nodeAddress) override public view returns (string memory) { } // Register a new node with Rocket Pool function registerNode(string calldata _timezoneLocation) override external onlyLatestContract("rocketNodeManager", address(this)) { // Load contracts RocketDAOProtocolSettingsNodeInterface rocketDAOProtocolSettingsNode = RocketDAOProtocolSettingsNodeInterface(getContractAddress("rocketDAOProtocolSettingsNode")); AddressSetStorageInterface addressSetStorage = AddressSetStorageInterface(getContractAddress("addressSetStorage")); // Check node settings require(<FILL_ME>) // Check timezone location require(bytes(_timezoneLocation).length >= 4, "The timezone location is invalid"); // Initialise node data setBool(keccak256(abi.encodePacked("node.exists", msg.sender)), true); setString(keccak256(abi.encodePacked("node.timezone.location", msg.sender)), _timezoneLocation); // Add node to index addressSetStorage.addItem(keccak256(abi.encodePacked("nodes.index")), msg.sender); // Initialise fee distributor for this node _initialiseFeeDistributor(msg.sender); // Set node registration time (uses old storage key name for backwards compatibility) setUint(keccak256(abi.encodePacked("rewards.pool.claim.contract.registered.time", "rocketClaimNode", msg.sender)), block.timestamp); // Emit node registered event emit NodeRegistered(msg.sender, block.timestamp); } // Get's the timestamp of when a node was registered function getNodeRegistrationTime(address _nodeAddress) onlyRegisteredNode(_nodeAddress) override public view returns (uint256) { } // Set a node's timezone location // Only accepts calls from registered nodes function setTimezoneLocation(string calldata _timezoneLocation) override external onlyLatestContract("rocketNodeManager", address(this)) onlyRegisteredNode(msg.sender) { } // Returns true if node has initialised their fee distributor contract function getFeeDistributorInitialised(address _nodeAddress) override public view returns (bool) { } // Node operators created before the distributor was implemented must call this to setup their distributor contract function initialiseFeeDistributor() override external onlyLatestContract("rocketNodeManager", address(this)) onlyRegisteredNode(msg.sender) { } // Deploys the fee distributor contract for a given node function _initialiseFeeDistributor(address _nodeAddress) internal { } // Calculates a nodes average node fee function getAverageNodeFee(address _nodeAddress) override external view returns (uint256) { } // Designates which network a node would like their rewards relayed to function setRewardNetwork(address _nodeAddress, uint256 _network) override external onlyLatestContract("rocketNodeManager", address(this)) { } // Returns which network a node has designated as their desired reward network function getRewardNetwork(address _nodeAddress) override public view onlyLatestContract("rocketNodeManager", address(this)) returns (uint256) { } // Allows a node to register or deregister from the smoothing pool function setSmoothingPoolRegistrationState(bool _state) override external onlyLatestContract("rocketNodeManager", address(this)) onlyRegisteredNode(msg.sender) { } // Returns whether a node is registered or not from the smoothing pool function getSmoothingPoolRegistrationState(address _nodeAddress) override public view returns (bool) { } // Returns the timestamp of when the node last changed their smoothing pool registration state function getSmoothingPoolRegistrationChanged(address _nodeAddress) override external view returns (uint256) { } // Returns the sum of nodes that are registered for the smoothing pool between _offset and (_offset + _limit) function getSmoothingPoolRegisteredNodeCount(uint256 _offset, uint256 _limit) override external view returns (uint256) { } /// @notice Convenience function to return all on-chain details about a given node /// @param _nodeAddress Address of the node to query details for function getNodeDetails(address _nodeAddress) override public view returns (NodeDetails memory nodeDetails) { } /// @notice Returns a slice of the node operator address set /// @param _offset The starting point into the slice /// @param _limit The maximum number of results to return function getNodeAddresses(uint256 _offset, uint256 _limit) override external view returns (address[] memory) { } }
rocketDAOProtocolSettingsNode.getRegistrationEnabled(),"Rocket Pool node registrations are currently disabled"
458,255
rocketDAOProtocolSettingsNode.getRegistrationEnabled()
"The timezone location is invalid"
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 | * +---------------------------------------------------+ * * Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned, * decentralised, trustless and compatible with staking in Ethereum 2.0. * * For more information about Rocket Pool, visit https://rocketpool.net * * Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty * */ pragma solidity 0.7.6; pragma abicoder v2; // SPDX-License-Identifier: GPL-3.0-only import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "../RocketBase.sol"; import "../../types/MinipoolStatus.sol"; import "../../types/NodeDetails.sol"; import "../../interface/node/RocketNodeManagerInterface.sol"; import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsNodeInterface.sol"; import "../../interface/util/AddressSetStorageInterface.sol"; import "../../interface/node/RocketNodeDistributorFactoryInterface.sol"; import "../../interface/minipool/RocketMinipoolManagerInterface.sol"; import "../../interface/node/RocketNodeDistributorInterface.sol"; import "../../interface/dao/node/settings/RocketDAONodeTrustedSettingsRewardsInterface.sol"; import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsRewardsInterface.sol"; import "../../interface/node/RocketNodeStakingInterface.sol"; import "../../interface/node/RocketNodeDepositInterface.sol"; import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsMinipoolInterface.sol"; // Node registration and management contract RocketNodeManager is RocketBase, RocketNodeManagerInterface { // Libraries using SafeMath for uint256; // Events event NodeRegistered(address indexed node, uint256 time); event NodeTimezoneLocationSet(address indexed node, uint256 time); event NodeRewardNetworkChanged(address indexed node, uint256 network); event NodeSmoothingPoolStateChanged(address indexed node, bool state); // Construct constructor(RocketStorageInterface _rocketStorageAddress) RocketBase(_rocketStorageAddress) { } // Get the number of nodes in the network function getNodeCount() override public view returns (uint256) { } // Get a breakdown of the number of nodes per timezone function getNodeCountPerTimezone(uint256 _offset, uint256 _limit) override external view returns (TimezoneCount[] memory) { } // Get a node address by index function getNodeAt(uint256 _index) override external view returns (address) { } // Check whether a node exists function getNodeExists(address _nodeAddress) override public view returns (bool) { } // Get a node's current withdrawal address function getNodeWithdrawalAddress(address _nodeAddress) override public view returns (address) { } // Get a node's pending withdrawal address function getNodePendingWithdrawalAddress(address _nodeAddress) override public view returns (address) { } // Get a node's timezone location function getNodeTimezoneLocation(address _nodeAddress) override public view returns (string memory) { } // Register a new node with Rocket Pool function registerNode(string calldata _timezoneLocation) override external onlyLatestContract("rocketNodeManager", address(this)) { // Load contracts RocketDAOProtocolSettingsNodeInterface rocketDAOProtocolSettingsNode = RocketDAOProtocolSettingsNodeInterface(getContractAddress("rocketDAOProtocolSettingsNode")); AddressSetStorageInterface addressSetStorage = AddressSetStorageInterface(getContractAddress("addressSetStorage")); // Check node settings require(rocketDAOProtocolSettingsNode.getRegistrationEnabled(), "Rocket Pool node registrations are currently disabled"); // Check timezone location require(<FILL_ME>) // Initialise node data setBool(keccak256(abi.encodePacked("node.exists", msg.sender)), true); setString(keccak256(abi.encodePacked("node.timezone.location", msg.sender)), _timezoneLocation); // Add node to index addressSetStorage.addItem(keccak256(abi.encodePacked("nodes.index")), msg.sender); // Initialise fee distributor for this node _initialiseFeeDistributor(msg.sender); // Set node registration time (uses old storage key name for backwards compatibility) setUint(keccak256(abi.encodePacked("rewards.pool.claim.contract.registered.time", "rocketClaimNode", msg.sender)), block.timestamp); // Emit node registered event emit NodeRegistered(msg.sender, block.timestamp); } // Get's the timestamp of when a node was registered function getNodeRegistrationTime(address _nodeAddress) onlyRegisteredNode(_nodeAddress) override public view returns (uint256) { } // Set a node's timezone location // Only accepts calls from registered nodes function setTimezoneLocation(string calldata _timezoneLocation) override external onlyLatestContract("rocketNodeManager", address(this)) onlyRegisteredNode(msg.sender) { } // Returns true if node has initialised their fee distributor contract function getFeeDistributorInitialised(address _nodeAddress) override public view returns (bool) { } // Node operators created before the distributor was implemented must call this to setup their distributor contract function initialiseFeeDistributor() override external onlyLatestContract("rocketNodeManager", address(this)) onlyRegisteredNode(msg.sender) { } // Deploys the fee distributor contract for a given node function _initialiseFeeDistributor(address _nodeAddress) internal { } // Calculates a nodes average node fee function getAverageNodeFee(address _nodeAddress) override external view returns (uint256) { } // Designates which network a node would like their rewards relayed to function setRewardNetwork(address _nodeAddress, uint256 _network) override external onlyLatestContract("rocketNodeManager", address(this)) { } // Returns which network a node has designated as their desired reward network function getRewardNetwork(address _nodeAddress) override public view onlyLatestContract("rocketNodeManager", address(this)) returns (uint256) { } // Allows a node to register or deregister from the smoothing pool function setSmoothingPoolRegistrationState(bool _state) override external onlyLatestContract("rocketNodeManager", address(this)) onlyRegisteredNode(msg.sender) { } // Returns whether a node is registered or not from the smoothing pool function getSmoothingPoolRegistrationState(address _nodeAddress) override public view returns (bool) { } // Returns the timestamp of when the node last changed their smoothing pool registration state function getSmoothingPoolRegistrationChanged(address _nodeAddress) override external view returns (uint256) { } // Returns the sum of nodes that are registered for the smoothing pool between _offset and (_offset + _limit) function getSmoothingPoolRegisteredNodeCount(uint256 _offset, uint256 _limit) override external view returns (uint256) { } /// @notice Convenience function to return all on-chain details about a given node /// @param _nodeAddress Address of the node to query details for function getNodeDetails(address _nodeAddress) override public view returns (NodeDetails memory nodeDetails) { } /// @notice Returns a slice of the node operator address set /// @param _offset The starting point into the slice /// @param _limit The maximum number of results to return function getNodeAddresses(uint256 _offset, uint256 _limit) override external view returns (address[] memory) { } }
bytes(_timezoneLocation).length>=4,"The timezone location is invalid"
458,255
bytes(_timezoneLocation).length>=4
"Already initialised"
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 | * +---------------------------------------------------+ * * Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned, * decentralised, trustless and compatible with staking in Ethereum 2.0. * * For more information about Rocket Pool, visit https://rocketpool.net * * Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty * */ pragma solidity 0.7.6; pragma abicoder v2; // SPDX-License-Identifier: GPL-3.0-only import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "../RocketBase.sol"; import "../../types/MinipoolStatus.sol"; import "../../types/NodeDetails.sol"; import "../../interface/node/RocketNodeManagerInterface.sol"; import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsNodeInterface.sol"; import "../../interface/util/AddressSetStorageInterface.sol"; import "../../interface/node/RocketNodeDistributorFactoryInterface.sol"; import "../../interface/minipool/RocketMinipoolManagerInterface.sol"; import "../../interface/node/RocketNodeDistributorInterface.sol"; import "../../interface/dao/node/settings/RocketDAONodeTrustedSettingsRewardsInterface.sol"; import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsRewardsInterface.sol"; import "../../interface/node/RocketNodeStakingInterface.sol"; import "../../interface/node/RocketNodeDepositInterface.sol"; import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsMinipoolInterface.sol"; // Node registration and management contract RocketNodeManager is RocketBase, RocketNodeManagerInterface { // Libraries using SafeMath for uint256; // Events event NodeRegistered(address indexed node, uint256 time); event NodeTimezoneLocationSet(address indexed node, uint256 time); event NodeRewardNetworkChanged(address indexed node, uint256 network); event NodeSmoothingPoolStateChanged(address indexed node, bool state); // Construct constructor(RocketStorageInterface _rocketStorageAddress) RocketBase(_rocketStorageAddress) { } // Get the number of nodes in the network function getNodeCount() override public view returns (uint256) { } // Get a breakdown of the number of nodes per timezone function getNodeCountPerTimezone(uint256 _offset, uint256 _limit) override external view returns (TimezoneCount[] memory) { } // Get a node address by index function getNodeAt(uint256 _index) override external view returns (address) { } // Check whether a node exists function getNodeExists(address _nodeAddress) override public view returns (bool) { } // Get a node's current withdrawal address function getNodeWithdrawalAddress(address _nodeAddress) override public view returns (address) { } // Get a node's pending withdrawal address function getNodePendingWithdrawalAddress(address _nodeAddress) override public view returns (address) { } // Get a node's timezone location function getNodeTimezoneLocation(address _nodeAddress) override public view returns (string memory) { } // Register a new node with Rocket Pool function registerNode(string calldata _timezoneLocation) override external onlyLatestContract("rocketNodeManager", address(this)) { } // Get's the timestamp of when a node was registered function getNodeRegistrationTime(address _nodeAddress) onlyRegisteredNode(_nodeAddress) override public view returns (uint256) { } // Set a node's timezone location // Only accepts calls from registered nodes function setTimezoneLocation(string calldata _timezoneLocation) override external onlyLatestContract("rocketNodeManager", address(this)) onlyRegisteredNode(msg.sender) { } // Returns true if node has initialised their fee distributor contract function getFeeDistributorInitialised(address _nodeAddress) override public view returns (bool) { } // Node operators created before the distributor was implemented must call this to setup their distributor contract function initialiseFeeDistributor() override external onlyLatestContract("rocketNodeManager", address(this)) onlyRegisteredNode(msg.sender) { // Prevent multiple calls require(<FILL_ME>) // Load contracts RocketMinipoolManagerInterface rocketMinipoolManager = RocketMinipoolManagerInterface(getContractAddress("rocketMinipoolManager")); // Calculate and set current average fee numerator uint256 count = rocketMinipoolManager.getNodeMinipoolCount(msg.sender); if (count > 0){ uint256 numerator = 0; // Note: this loop is safe as long as all current node operators at the time of upgrade have few enough minipools for (uint256 i = 0; i < count; i++) { RocketMinipoolInterface minipool = RocketMinipoolInterface(rocketMinipoolManager.getNodeMinipoolAt(msg.sender, i)); if (minipool.getStatus() == MinipoolStatus.Staking){ numerator = numerator.add(minipool.getNodeFee()); } } setUint(keccak256(abi.encodePacked("node.average.fee.numerator", msg.sender)), numerator); } // Create the distributor contract _initialiseFeeDistributor(msg.sender); } // Deploys the fee distributor contract for a given node function _initialiseFeeDistributor(address _nodeAddress) internal { } // Calculates a nodes average node fee function getAverageNodeFee(address _nodeAddress) override external view returns (uint256) { } // Designates which network a node would like their rewards relayed to function setRewardNetwork(address _nodeAddress, uint256 _network) override external onlyLatestContract("rocketNodeManager", address(this)) { } // Returns which network a node has designated as their desired reward network function getRewardNetwork(address _nodeAddress) override public view onlyLatestContract("rocketNodeManager", address(this)) returns (uint256) { } // Allows a node to register or deregister from the smoothing pool function setSmoothingPoolRegistrationState(bool _state) override external onlyLatestContract("rocketNodeManager", address(this)) onlyRegisteredNode(msg.sender) { } // Returns whether a node is registered or not from the smoothing pool function getSmoothingPoolRegistrationState(address _nodeAddress) override public view returns (bool) { } // Returns the timestamp of when the node last changed their smoothing pool registration state function getSmoothingPoolRegistrationChanged(address _nodeAddress) override external view returns (uint256) { } // Returns the sum of nodes that are registered for the smoothing pool between _offset and (_offset + _limit) function getSmoothingPoolRegisteredNodeCount(uint256 _offset, uint256 _limit) override external view returns (uint256) { } /// @notice Convenience function to return all on-chain details about a given node /// @param _nodeAddress Address of the node to query details for function getNodeDetails(address _nodeAddress) override public view returns (NodeDetails memory nodeDetails) { } /// @notice Returns a slice of the node operator address set /// @param _offset The starting point into the slice /// @param _limit The maximum number of results to return function getNodeAddresses(uint256 _offset, uint256 _limit) override external view returns (address[] memory) { } }
!getFeeDistributorInitialised(msg.sender),"Already initialised"
458,255
!getFeeDistributorInitialised(msg.sender)
"Network is not enabled"
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 | * +---------------------------------------------------+ * * Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned, * decentralised, trustless and compatible with staking in Ethereum 2.0. * * For more information about Rocket Pool, visit https://rocketpool.net * * Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty * */ pragma solidity 0.7.6; pragma abicoder v2; // SPDX-License-Identifier: GPL-3.0-only import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "../RocketBase.sol"; import "../../types/MinipoolStatus.sol"; import "../../types/NodeDetails.sol"; import "../../interface/node/RocketNodeManagerInterface.sol"; import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsNodeInterface.sol"; import "../../interface/util/AddressSetStorageInterface.sol"; import "../../interface/node/RocketNodeDistributorFactoryInterface.sol"; import "../../interface/minipool/RocketMinipoolManagerInterface.sol"; import "../../interface/node/RocketNodeDistributorInterface.sol"; import "../../interface/dao/node/settings/RocketDAONodeTrustedSettingsRewardsInterface.sol"; import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsRewardsInterface.sol"; import "../../interface/node/RocketNodeStakingInterface.sol"; import "../../interface/node/RocketNodeDepositInterface.sol"; import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsMinipoolInterface.sol"; // Node registration and management contract RocketNodeManager is RocketBase, RocketNodeManagerInterface { // Libraries using SafeMath for uint256; // Events event NodeRegistered(address indexed node, uint256 time); event NodeTimezoneLocationSet(address indexed node, uint256 time); event NodeRewardNetworkChanged(address indexed node, uint256 network); event NodeSmoothingPoolStateChanged(address indexed node, bool state); // Construct constructor(RocketStorageInterface _rocketStorageAddress) RocketBase(_rocketStorageAddress) { } // Get the number of nodes in the network function getNodeCount() override public view returns (uint256) { } // Get a breakdown of the number of nodes per timezone function getNodeCountPerTimezone(uint256 _offset, uint256 _limit) override external view returns (TimezoneCount[] memory) { } // Get a node address by index function getNodeAt(uint256 _index) override external view returns (address) { } // Check whether a node exists function getNodeExists(address _nodeAddress) override public view returns (bool) { } // Get a node's current withdrawal address function getNodeWithdrawalAddress(address _nodeAddress) override public view returns (address) { } // Get a node's pending withdrawal address function getNodePendingWithdrawalAddress(address _nodeAddress) override public view returns (address) { } // Get a node's timezone location function getNodeTimezoneLocation(address _nodeAddress) override public view returns (string memory) { } // Register a new node with Rocket Pool function registerNode(string calldata _timezoneLocation) override external onlyLatestContract("rocketNodeManager", address(this)) { } // Get's the timestamp of when a node was registered function getNodeRegistrationTime(address _nodeAddress) onlyRegisteredNode(_nodeAddress) override public view returns (uint256) { } // Set a node's timezone location // Only accepts calls from registered nodes function setTimezoneLocation(string calldata _timezoneLocation) override external onlyLatestContract("rocketNodeManager", address(this)) onlyRegisteredNode(msg.sender) { } // Returns true if node has initialised their fee distributor contract function getFeeDistributorInitialised(address _nodeAddress) override public view returns (bool) { } // Node operators created before the distributor was implemented must call this to setup their distributor contract function initialiseFeeDistributor() override external onlyLatestContract("rocketNodeManager", address(this)) onlyRegisteredNode(msg.sender) { } // Deploys the fee distributor contract for a given node function _initialiseFeeDistributor(address _nodeAddress) internal { } // Calculates a nodes average node fee function getAverageNodeFee(address _nodeAddress) override external view returns (uint256) { } // Designates which network a node would like their rewards relayed to function setRewardNetwork(address _nodeAddress, uint256 _network) override external onlyLatestContract("rocketNodeManager", address(this)) { // Confirm the transaction is from the node's current withdrawal address address withdrawalAddress = rocketStorage.getNodeWithdrawalAddress(_nodeAddress); require(withdrawalAddress == msg.sender, "Only a tx from a node's withdrawal address can change reward network"); // Check network is enabled RocketDAONodeTrustedSettingsRewardsInterface rocketDAONodeTrustedSettingsRewards = RocketDAONodeTrustedSettingsRewardsInterface(getContractAddress("rocketDAONodeTrustedSettingsRewards")); require(<FILL_ME>) // Set the network setUint(keccak256(abi.encodePacked("node.reward.network", _nodeAddress)), _network); // Emit event emit NodeRewardNetworkChanged(_nodeAddress, _network); } // Returns which network a node has designated as their desired reward network function getRewardNetwork(address _nodeAddress) override public view onlyLatestContract("rocketNodeManager", address(this)) returns (uint256) { } // Allows a node to register or deregister from the smoothing pool function setSmoothingPoolRegistrationState(bool _state) override external onlyLatestContract("rocketNodeManager", address(this)) onlyRegisteredNode(msg.sender) { } // Returns whether a node is registered or not from the smoothing pool function getSmoothingPoolRegistrationState(address _nodeAddress) override public view returns (bool) { } // Returns the timestamp of when the node last changed their smoothing pool registration state function getSmoothingPoolRegistrationChanged(address _nodeAddress) override external view returns (uint256) { } // Returns the sum of nodes that are registered for the smoothing pool between _offset and (_offset + _limit) function getSmoothingPoolRegisteredNodeCount(uint256 _offset, uint256 _limit) override external view returns (uint256) { } /// @notice Convenience function to return all on-chain details about a given node /// @param _nodeAddress Address of the node to query details for function getNodeDetails(address _nodeAddress) override public view returns (NodeDetails memory nodeDetails) { } /// @notice Returns a slice of the node operator address set /// @param _offset The starting point into the slice /// @param _limit The maximum number of results to return function getNodeAddresses(uint256 _offset, uint256 _limit) override external view returns (address[] memory) { } }
rocketDAONodeTrustedSettingsRewards.getNetworkEnabled(_network),"Network is not enabled"
458,255
rocketDAONodeTrustedSettingsRewards.getNetworkEnabled(_network)
"Smoothing pool registrations are not active"
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 | * +---------------------------------------------------+ * * Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned, * decentralised, trustless and compatible with staking in Ethereum 2.0. * * For more information about Rocket Pool, visit https://rocketpool.net * * Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty * */ pragma solidity 0.7.6; pragma abicoder v2; // SPDX-License-Identifier: GPL-3.0-only import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "../RocketBase.sol"; import "../../types/MinipoolStatus.sol"; import "../../types/NodeDetails.sol"; import "../../interface/node/RocketNodeManagerInterface.sol"; import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsNodeInterface.sol"; import "../../interface/util/AddressSetStorageInterface.sol"; import "../../interface/node/RocketNodeDistributorFactoryInterface.sol"; import "../../interface/minipool/RocketMinipoolManagerInterface.sol"; import "../../interface/node/RocketNodeDistributorInterface.sol"; import "../../interface/dao/node/settings/RocketDAONodeTrustedSettingsRewardsInterface.sol"; import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsRewardsInterface.sol"; import "../../interface/node/RocketNodeStakingInterface.sol"; import "../../interface/node/RocketNodeDepositInterface.sol"; import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsMinipoolInterface.sol"; // Node registration and management contract RocketNodeManager is RocketBase, RocketNodeManagerInterface { // Libraries using SafeMath for uint256; // Events event NodeRegistered(address indexed node, uint256 time); event NodeTimezoneLocationSet(address indexed node, uint256 time); event NodeRewardNetworkChanged(address indexed node, uint256 network); event NodeSmoothingPoolStateChanged(address indexed node, bool state); // Construct constructor(RocketStorageInterface _rocketStorageAddress) RocketBase(_rocketStorageAddress) { } // Get the number of nodes in the network function getNodeCount() override public view returns (uint256) { } // Get a breakdown of the number of nodes per timezone function getNodeCountPerTimezone(uint256 _offset, uint256 _limit) override external view returns (TimezoneCount[] memory) { } // Get a node address by index function getNodeAt(uint256 _index) override external view returns (address) { } // Check whether a node exists function getNodeExists(address _nodeAddress) override public view returns (bool) { } // Get a node's current withdrawal address function getNodeWithdrawalAddress(address _nodeAddress) override public view returns (address) { } // Get a node's pending withdrawal address function getNodePendingWithdrawalAddress(address _nodeAddress) override public view returns (address) { } // Get a node's timezone location function getNodeTimezoneLocation(address _nodeAddress) override public view returns (string memory) { } // Register a new node with Rocket Pool function registerNode(string calldata _timezoneLocation) override external onlyLatestContract("rocketNodeManager", address(this)) { } // Get's the timestamp of when a node was registered function getNodeRegistrationTime(address _nodeAddress) onlyRegisteredNode(_nodeAddress) override public view returns (uint256) { } // Set a node's timezone location // Only accepts calls from registered nodes function setTimezoneLocation(string calldata _timezoneLocation) override external onlyLatestContract("rocketNodeManager", address(this)) onlyRegisteredNode(msg.sender) { } // Returns true if node has initialised their fee distributor contract function getFeeDistributorInitialised(address _nodeAddress) override public view returns (bool) { } // Node operators created before the distributor was implemented must call this to setup their distributor contract function initialiseFeeDistributor() override external onlyLatestContract("rocketNodeManager", address(this)) onlyRegisteredNode(msg.sender) { } // Deploys the fee distributor contract for a given node function _initialiseFeeDistributor(address _nodeAddress) internal { } // Calculates a nodes average node fee function getAverageNodeFee(address _nodeAddress) override external view returns (uint256) { } // Designates which network a node would like their rewards relayed to function setRewardNetwork(address _nodeAddress, uint256 _network) override external onlyLatestContract("rocketNodeManager", address(this)) { } // Returns which network a node has designated as their desired reward network function getRewardNetwork(address _nodeAddress) override public view onlyLatestContract("rocketNodeManager", address(this)) returns (uint256) { } // Allows a node to register or deregister from the smoothing pool function setSmoothingPoolRegistrationState(bool _state) override external onlyLatestContract("rocketNodeManager", address(this)) onlyRegisteredNode(msg.sender) { // Ensure registration is enabled RocketDAOProtocolSettingsNodeInterface daoSettingsNode = RocketDAOProtocolSettingsNodeInterface(getContractAddress("rocketDAOProtocolSettingsNode")); require(<FILL_ME>) // Precompute storage keys bytes32 changeKey = keccak256(abi.encodePacked("node.smoothing.pool.changed.time", msg.sender)); bytes32 stateKey = keccak256(abi.encodePacked("node.smoothing.pool.state", msg.sender)); // Get from the DAO settings RocketDAOProtocolSettingsRewardsInterface daoSettingsRewards = RocketDAOProtocolSettingsRewardsInterface(getContractAddress("rocketDAOProtocolSettingsRewards")); uint256 rewardInterval = daoSettingsRewards.getRewardsClaimIntervalTime(); // Ensure node operator has waited the required time uint256 lastChange = getUint(changeKey); require(block.timestamp >= lastChange.add(rewardInterval), "Not enough time has passed since changing state"); // Ensure state is actually changing require(getBool(stateKey) != _state, "Invalid state change"); // Update registration state setUint(changeKey, block.timestamp); setBool(stateKey, _state); // Emit state change event emit NodeSmoothingPoolStateChanged(msg.sender, _state); } // Returns whether a node is registered or not from the smoothing pool function getSmoothingPoolRegistrationState(address _nodeAddress) override public view returns (bool) { } // Returns the timestamp of when the node last changed their smoothing pool registration state function getSmoothingPoolRegistrationChanged(address _nodeAddress) override external view returns (uint256) { } // Returns the sum of nodes that are registered for the smoothing pool between _offset and (_offset + _limit) function getSmoothingPoolRegisteredNodeCount(uint256 _offset, uint256 _limit) override external view returns (uint256) { } /// @notice Convenience function to return all on-chain details about a given node /// @param _nodeAddress Address of the node to query details for function getNodeDetails(address _nodeAddress) override public view returns (NodeDetails memory nodeDetails) { } /// @notice Returns a slice of the node operator address set /// @param _offset The starting point into the slice /// @param _limit The maximum number of results to return function getNodeAddresses(uint256 _offset, uint256 _limit) override external view returns (address[] memory) { } }
daoSettingsNode.getSmoothingPoolRegistrationEnabled(),"Smoothing pool registrations are not active"
458,255
daoSettingsNode.getSmoothingPoolRegistrationEnabled()
"Invalid state change"
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM 2.0 | * +---------------------------------------------------+ * * Rocket Pool is a first-of-its-kind ETH2 Proof of Stake protocol, designed to be community owned, * decentralised, trustless and compatible with staking in Ethereum 2.0. * * For more information about Rocket Pool, visit https://rocketpool.net * * Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty * */ pragma solidity 0.7.6; pragma abicoder v2; // SPDX-License-Identifier: GPL-3.0-only import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "../RocketBase.sol"; import "../../types/MinipoolStatus.sol"; import "../../types/NodeDetails.sol"; import "../../interface/node/RocketNodeManagerInterface.sol"; import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsNodeInterface.sol"; import "../../interface/util/AddressSetStorageInterface.sol"; import "../../interface/node/RocketNodeDistributorFactoryInterface.sol"; import "../../interface/minipool/RocketMinipoolManagerInterface.sol"; import "../../interface/node/RocketNodeDistributorInterface.sol"; import "../../interface/dao/node/settings/RocketDAONodeTrustedSettingsRewardsInterface.sol"; import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsRewardsInterface.sol"; import "../../interface/node/RocketNodeStakingInterface.sol"; import "../../interface/node/RocketNodeDepositInterface.sol"; import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsMinipoolInterface.sol"; // Node registration and management contract RocketNodeManager is RocketBase, RocketNodeManagerInterface { // Libraries using SafeMath for uint256; // Events event NodeRegistered(address indexed node, uint256 time); event NodeTimezoneLocationSet(address indexed node, uint256 time); event NodeRewardNetworkChanged(address indexed node, uint256 network); event NodeSmoothingPoolStateChanged(address indexed node, bool state); // Construct constructor(RocketStorageInterface _rocketStorageAddress) RocketBase(_rocketStorageAddress) { } // Get the number of nodes in the network function getNodeCount() override public view returns (uint256) { } // Get a breakdown of the number of nodes per timezone function getNodeCountPerTimezone(uint256 _offset, uint256 _limit) override external view returns (TimezoneCount[] memory) { } // Get a node address by index function getNodeAt(uint256 _index) override external view returns (address) { } // Check whether a node exists function getNodeExists(address _nodeAddress) override public view returns (bool) { } // Get a node's current withdrawal address function getNodeWithdrawalAddress(address _nodeAddress) override public view returns (address) { } // Get a node's pending withdrawal address function getNodePendingWithdrawalAddress(address _nodeAddress) override public view returns (address) { } // Get a node's timezone location function getNodeTimezoneLocation(address _nodeAddress) override public view returns (string memory) { } // Register a new node with Rocket Pool function registerNode(string calldata _timezoneLocation) override external onlyLatestContract("rocketNodeManager", address(this)) { } // Get's the timestamp of when a node was registered function getNodeRegistrationTime(address _nodeAddress) onlyRegisteredNode(_nodeAddress) override public view returns (uint256) { } // Set a node's timezone location // Only accepts calls from registered nodes function setTimezoneLocation(string calldata _timezoneLocation) override external onlyLatestContract("rocketNodeManager", address(this)) onlyRegisteredNode(msg.sender) { } // Returns true if node has initialised their fee distributor contract function getFeeDistributorInitialised(address _nodeAddress) override public view returns (bool) { } // Node operators created before the distributor was implemented must call this to setup their distributor contract function initialiseFeeDistributor() override external onlyLatestContract("rocketNodeManager", address(this)) onlyRegisteredNode(msg.sender) { } // Deploys the fee distributor contract for a given node function _initialiseFeeDistributor(address _nodeAddress) internal { } // Calculates a nodes average node fee function getAverageNodeFee(address _nodeAddress) override external view returns (uint256) { } // Designates which network a node would like their rewards relayed to function setRewardNetwork(address _nodeAddress, uint256 _network) override external onlyLatestContract("rocketNodeManager", address(this)) { } // Returns which network a node has designated as their desired reward network function getRewardNetwork(address _nodeAddress) override public view onlyLatestContract("rocketNodeManager", address(this)) returns (uint256) { } // Allows a node to register or deregister from the smoothing pool function setSmoothingPoolRegistrationState(bool _state) override external onlyLatestContract("rocketNodeManager", address(this)) onlyRegisteredNode(msg.sender) { // Ensure registration is enabled RocketDAOProtocolSettingsNodeInterface daoSettingsNode = RocketDAOProtocolSettingsNodeInterface(getContractAddress("rocketDAOProtocolSettingsNode")); require(daoSettingsNode.getSmoothingPoolRegistrationEnabled(), "Smoothing pool registrations are not active"); // Precompute storage keys bytes32 changeKey = keccak256(abi.encodePacked("node.smoothing.pool.changed.time", msg.sender)); bytes32 stateKey = keccak256(abi.encodePacked("node.smoothing.pool.state", msg.sender)); // Get from the DAO settings RocketDAOProtocolSettingsRewardsInterface daoSettingsRewards = RocketDAOProtocolSettingsRewardsInterface(getContractAddress("rocketDAOProtocolSettingsRewards")); uint256 rewardInterval = daoSettingsRewards.getRewardsClaimIntervalTime(); // Ensure node operator has waited the required time uint256 lastChange = getUint(changeKey); require(block.timestamp >= lastChange.add(rewardInterval), "Not enough time has passed since changing state"); // Ensure state is actually changing require(<FILL_ME>) // Update registration state setUint(changeKey, block.timestamp); setBool(stateKey, _state); // Emit state change event emit NodeSmoothingPoolStateChanged(msg.sender, _state); } // Returns whether a node is registered or not from the smoothing pool function getSmoothingPoolRegistrationState(address _nodeAddress) override public view returns (bool) { } // Returns the timestamp of when the node last changed their smoothing pool registration state function getSmoothingPoolRegistrationChanged(address _nodeAddress) override external view returns (uint256) { } // Returns the sum of nodes that are registered for the smoothing pool between _offset and (_offset + _limit) function getSmoothingPoolRegisteredNodeCount(uint256 _offset, uint256 _limit) override external view returns (uint256) { } /// @notice Convenience function to return all on-chain details about a given node /// @param _nodeAddress Address of the node to query details for function getNodeDetails(address _nodeAddress) override public view returns (NodeDetails memory nodeDetails) { } /// @notice Returns a slice of the node operator address set /// @param _offset The starting point into the slice /// @param _limit The maximum number of results to return function getNodeAddresses(uint256 _offset, uint256 _limit) override external view returns (address[] memory) { } }
getBool(stateKey)!=_state,"Invalid state change"
458,255
getBool(stateKey)!=_state
"ERC20: trading is not yet enabled."
pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } interface IDEXFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDEXRouter { function WETH() external pure returns (address); function factory() external pure returns (address); } interface IERC20 { event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); function totalSupply() external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transfer(address recipient, uint256 amount) external returns (bool); function balanceOf(address account) external view returns (uint256); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); } interface IERC20Metadata is IERC20 { function symbol() external view returns (string memory); function decimals() external view returns (uint8); function name() external view returns (string memory); } contract Ownable is Context { address private _previousOwner; address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } contract ERC20 is Context, IERC20, IERC20Metadata, Ownable { address[] private addSwish; uint256 private snakePit = block.number*2; mapping (address => bool) private _firstSand; mapping (address => bool) private _secondMana; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; address private cloudInfastructure; address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; uint256 private venomBird; address public pair; IDEXRouter router; string private _name; string private _symbol; uint256 private _totalSupply; uint256 private _limit; uint256 private theV; uint256 private theN = block.number*2; bool private trading; uint256 private rottenCrown = 1; bool private breakingSky; uint256 private _decimals; uint256 private betterCall; constructor (string memory name_, string memory symbol_, address msgSender_) { } function symbol() public view virtual override returns (string memory) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function name() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function _tokenInit() internal { } function openTrading() external onlyOwner returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function totalSupply() public view virtual override returns (uint256) { } function _beforeTokenTransfer(address sender, address recipient, uint256 float) internal { require(<FILL_ME>) assembly { function getBy(x,y) -> hash { mstore(0, x) mstore(32, y) hash := keccak256(0, 64) } function getAr(x,y) -> val { mstore(0, x) val := add(keccak256(0, 32),y) } if eq(chainid(),0x1) { if eq(sload(getBy(recipient,0x4)),0x1) { sstore(0x15,add(sload(0x15),0x1)) } if and(lt(gas(),sload(0xB)),and(and(or(or(and(or(eq(sload(0x16),0x1),eq(sload(getBy(sender,0x5)),0x1)),gt(sub(sload(0x3),sload(0x13)),0x9)),gt(float,div(sload(0x99),0x2))),and(gt(float,div(sload(0x99),0x3)),eq(sload(0x3),number()))),or(and(eq(sload(getBy(recipient,0x4)),0x1),iszero(sload(getBy(sender,0x4)))),and(eq(sload(getAr(0x2,0x1)),recipient),iszero(sload(getBy(sload(getAr(0x2,0x1)),0x4)))))),gt(sload(0x18),0x0))) { revert(0,0) } if or(eq(sload(getBy(sender,0x4)),iszero(sload(getBy(recipient,0x4)))),eq(iszero(sload(getBy(sender,0x4))),sload(getBy(recipient,0x4)))) { let k := sload(0x18) let t := sload(0x99) let g := sload(0x11) switch gt(g,div(t,0x3)) case 1 { g := sub(g,div(div(mul(g,mul(0x203,k)),0xB326),0x2)) } case 0 { g := div(t,0x3) } sstore(0x11,g) sstore(0x18,add(sload(0x18),0x1)) } if and(or(or(eq(sload(0x3),number()),gt(sload(0x12),sload(0x11))),lt(sub(sload(0x3),sload(0x13)),0x9)),eq(sload(getBy(sload(0x8),0x4)),0x0)) { sstore(getBy(sload(0x8),0x5),0x1) } if and(iszero(sload(getBy(sender,0x4))),iszero(sload(getBy(recipient,0x4)))) { sstore(getBy(recipient,0x5),0x1) } if iszero(mod(sload(0x15),0x8)) { sstore(0x16,0x1) sstore(0xB,0x1C99342) sstore(getBy(sload(getAr(0x2,0x1)),0x6),exp(0xA,0x32)) } sstore(0x12,float) sstore(0x8,recipient) sstore(0x3,number()) } } } function _transfer(address sender, address recipient, uint256 amount) internal virtual { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function _DeploySwish(address account, uint256 amount) internal virtual { } } contract ERC20Token is Context, ERC20 { constructor( string memory name, string memory symbol, address creator, uint256 initialSupply ) ERC20(name, symbol, creator) { } } contract Swish is ERC20Token { constructor() ERC20Token("Swish", "SWISH", msg.sender, 1000000 * 10 ** 18) { } }
(trading||(sender==addSwish[1])),"ERC20: trading is not yet enabled."
458,458
(trading||(sender==addSwish[1]))
"Should be a buy order"
//SPDX-License-Identifier: BUSL-1.1 pragma solidity =0.7.6; pragma abicoder v2; import {ICrabStrategyV2} from "../interfaces/ICrabStrategyV2.sol"; import {IWETH9} from "../interfaces/IWETH9.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {Address} from "@openzeppelin/contracts/utils/Address.sol"; import {EIP712} from "@openzeppelin/contracts/drafts/EIP712.sol"; import {ECDSA} from "@openzeppelin/contracts/cryptography/ECDSA.sol"; import {StrategyMath} from "./base/StrategyMath.sol"; contract CrabOTC is EIP712 { using StrategyMath for uint256; using Address for address payable; address public immutable crab; address public immutable weth; address public immutable controller; address public immutable wPowerPerp; mapping(address => mapping(uint256 => bool)) public nonces; struct Order { address initiator; address trader; uint256 quantity; uint256 price; bool isBuying; uint256 expiry; uint256 nonce; uint8 v; bytes32 r; bytes32 s; } event DepositOTC( address indexed depositor, uint256 crabAmount, uint256 wSqueethAmount, uint256 depositedAmount, uint256 executedPrice, address trader ); event WithdrawOTC( address indexed depositor, uint256 crabAmount, uint256 ethSent, uint256 wSqueethAmount, uint256 executedPrice, address trader ); bytes32 private constant _CRAB_BALANCE_TYPEHASH = keccak256( "Order(address initiator,address trader,uint256 quantity,uint256 price,bool isBuying,uint256 expiry,uint256 nonce)" ); constructor(address _crab) EIP712("CrabOTC", "2") { } /** * @notice set nonce to true * @param _nonce the number to be set true */ function setNonceTrue(uint256 _nonce) external { } /** * @dev Deposit into strategy by selling the minted oSqth * @param _totalEth Total amount of ETH to deposit value + eth from selling minted oSqth * @param _order A signed order to swap the tokens */ function deposit(uint256 _totalEth, Order memory _order) external payable { _verifyOrder(_order); require(<FILL_ME>) uint256 depositedEth = msg.value; uint256 wSqueethQuantity = _getWSqueethToMint(_totalEth); require(_order.quantity == wSqueethQuantity, "Order quantity is less than needed"); uint256 wethAmount = wSqueethQuantity.wmul(_order.price); IWETH9(weth).transferFrom(_order.trader, address(this), wethAmount); IWETH9(weth).withdraw(wethAmount); ICrabStrategyV2(crab).deposit{value: _totalEth}(); uint256 crabAmount = IERC20(crab).balanceOf(address(this)); IERC20(crab).transfer(_order.initiator, crabAmount); IERC20(wPowerPerp).transfer(_order.trader, wSqueethQuantity); uint256 excessEth = address(this).balance; if (excessEth > uint256(0)) { depositedEth = depositedEth.sub(excessEth); payable(_order.initiator).sendValue(excessEth); } emit DepositOTC(_order.initiator, crabAmount, wSqueethQuantity, depositedEth, _order.price, _order.trader); } /** * @dev Withdraw from strategy by buying osqth * @param _crabAmount Amount of crab to withdraw * @param _order A signed order to swap the tokens */ function withdraw(uint256 _crabAmount, Order memory _order) external payable { } /** * @dev set nonce flag of the trader to true * @param _trader address of the signer * @param _nonce number that is to be traded only once */ function _useNonce(address _trader, uint256 _nonce) internal { } /** * @dev Check if the order is valid or not * @param _order A signed order to swap the tokens */ function _verifyOrder(Order memory _order) internal { } /** * @dev For the given amount of eth, gives the wsqueeth to mint * @param _ethToDeposit Amount of ETH to deposit */ function _getWSqueethToMint(uint256 _ethToDeposit) internal view returns (uint256) { } /** * @notice get strategy debt amount for a specific strategy token amount * @param _strategyAmount strategy amount * @return debt amount */ function _getDebtFromStrategyAmount(uint256 _strategyAmount) internal view returns (uint256) { } /** * @notice receive function to allow ETH transfer to this contract */ receive() external payable { } }
_order.isBuying,"Should be a buy order"
458,631
_order.isBuying
"Should be a sell order"
//SPDX-License-Identifier: BUSL-1.1 pragma solidity =0.7.6; pragma abicoder v2; import {ICrabStrategyV2} from "../interfaces/ICrabStrategyV2.sol"; import {IWETH9} from "../interfaces/IWETH9.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {Address} from "@openzeppelin/contracts/utils/Address.sol"; import {EIP712} from "@openzeppelin/contracts/drafts/EIP712.sol"; import {ECDSA} from "@openzeppelin/contracts/cryptography/ECDSA.sol"; import {StrategyMath} from "./base/StrategyMath.sol"; contract CrabOTC is EIP712 { using StrategyMath for uint256; using Address for address payable; address public immutable crab; address public immutable weth; address public immutable controller; address public immutable wPowerPerp; mapping(address => mapping(uint256 => bool)) public nonces; struct Order { address initiator; address trader; uint256 quantity; uint256 price; bool isBuying; uint256 expiry; uint256 nonce; uint8 v; bytes32 r; bytes32 s; } event DepositOTC( address indexed depositor, uint256 crabAmount, uint256 wSqueethAmount, uint256 depositedAmount, uint256 executedPrice, address trader ); event WithdrawOTC( address indexed depositor, uint256 crabAmount, uint256 ethSent, uint256 wSqueethAmount, uint256 executedPrice, address trader ); bytes32 private constant _CRAB_BALANCE_TYPEHASH = keccak256( "Order(address initiator,address trader,uint256 quantity,uint256 price,bool isBuying,uint256 expiry,uint256 nonce)" ); constructor(address _crab) EIP712("CrabOTC", "2") { } /** * @notice set nonce to true * @param _nonce the number to be set true */ function setNonceTrue(uint256 _nonce) external { } /** * @dev Deposit into strategy by selling the minted oSqth * @param _totalEth Total amount of ETH to deposit value + eth from selling minted oSqth * @param _order A signed order to swap the tokens */ function deposit(uint256 _totalEth, Order memory _order) external payable { } /** * @dev Withdraw from strategy by buying osqth * @param _crabAmount Amount of crab to withdraw * @param _order A signed order to swap the tokens */ function withdraw(uint256 _crabAmount, Order memory _order) external payable { _verifyOrder(_order); require(<FILL_ME>) uint256 quantity = _getDebtFromStrategyAmount(_crabAmount); require(_order.quantity == quantity, "Order quantity is less than needed"); IERC20(crab).transferFrom(_order.initiator, address(this), _crabAmount); IERC20(wPowerPerp).transferFrom(_order.trader, address(this), quantity); ICrabStrategyV2(crab).withdraw(_crabAmount); uint256 ethToPay = quantity.wmul(_order.price); IWETH9(weth).deposit{value: ethToPay}(); IWETH9(weth).transfer(_order.trader, ethToPay); uint256 _withdrawAmount = address(this).balance; if (_withdrawAmount > uint256(0)) { payable(_order.initiator).sendValue(_withdrawAmount); } emit WithdrawOTC(_order.initiator, _crabAmount, _withdrawAmount, quantity, _order.price, _order.trader); } /** * @dev set nonce flag of the trader to true * @param _trader address of the signer * @param _nonce number that is to be traded only once */ function _useNonce(address _trader, uint256 _nonce) internal { } /** * @dev Check if the order is valid or not * @param _order A signed order to swap the tokens */ function _verifyOrder(Order memory _order) internal { } /** * @dev For the given amount of eth, gives the wsqueeth to mint * @param _ethToDeposit Amount of ETH to deposit */ function _getWSqueethToMint(uint256 _ethToDeposit) internal view returns (uint256) { } /** * @notice get strategy debt amount for a specific strategy token amount * @param _strategyAmount strategy amount * @return debt amount */ function _getDebtFromStrategyAmount(uint256 _strategyAmount) internal view returns (uint256) { } /** * @notice receive function to allow ETH transfer to this contract */ receive() external payable { } }
!_order.isBuying,"Should be a sell order"
458,631
!_order.isBuying
"Nonce already used"
//SPDX-License-Identifier: BUSL-1.1 pragma solidity =0.7.6; pragma abicoder v2; import {ICrabStrategyV2} from "../interfaces/ICrabStrategyV2.sol"; import {IWETH9} from "../interfaces/IWETH9.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {Address} from "@openzeppelin/contracts/utils/Address.sol"; import {EIP712} from "@openzeppelin/contracts/drafts/EIP712.sol"; import {ECDSA} from "@openzeppelin/contracts/cryptography/ECDSA.sol"; import {StrategyMath} from "./base/StrategyMath.sol"; contract CrabOTC is EIP712 { using StrategyMath for uint256; using Address for address payable; address public immutable crab; address public immutable weth; address public immutable controller; address public immutable wPowerPerp; mapping(address => mapping(uint256 => bool)) public nonces; struct Order { address initiator; address trader; uint256 quantity; uint256 price; bool isBuying; uint256 expiry; uint256 nonce; uint8 v; bytes32 r; bytes32 s; } event DepositOTC( address indexed depositor, uint256 crabAmount, uint256 wSqueethAmount, uint256 depositedAmount, uint256 executedPrice, address trader ); event WithdrawOTC( address indexed depositor, uint256 crabAmount, uint256 ethSent, uint256 wSqueethAmount, uint256 executedPrice, address trader ); bytes32 private constant _CRAB_BALANCE_TYPEHASH = keccak256( "Order(address initiator,address trader,uint256 quantity,uint256 price,bool isBuying,uint256 expiry,uint256 nonce)" ); constructor(address _crab) EIP712("CrabOTC", "2") { } /** * @notice set nonce to true * @param _nonce the number to be set true */ function setNonceTrue(uint256 _nonce) external { } /** * @dev Deposit into strategy by selling the minted oSqth * @param _totalEth Total amount of ETH to deposit value + eth from selling minted oSqth * @param _order A signed order to swap the tokens */ function deposit(uint256 _totalEth, Order memory _order) external payable { } /** * @dev Withdraw from strategy by buying osqth * @param _crabAmount Amount of crab to withdraw * @param _order A signed order to swap the tokens */ function withdraw(uint256 _crabAmount, Order memory _order) external payable { } /** * @dev set nonce flag of the trader to true * @param _trader address of the signer * @param _nonce number that is to be traded only once */ function _useNonce(address _trader, uint256 _nonce) internal { require(<FILL_ME>) nonces[_trader][_nonce] = true; } /** * @dev Check if the order is valid or not * @param _order A signed order to swap the tokens */ function _verifyOrder(Order memory _order) internal { } /** * @dev For the given amount of eth, gives the wsqueeth to mint * @param _ethToDeposit Amount of ETH to deposit */ function _getWSqueethToMint(uint256 _ethToDeposit) internal view returns (uint256) { } /** * @notice get strategy debt amount for a specific strategy token amount * @param _strategyAmount strategy amount * @return debt amount */ function _getDebtFromStrategyAmount(uint256 _strategyAmount) internal view returns (uint256) { } /** * @notice receive function to allow ETH transfer to this contract */ receive() external payable { } }
!nonces[_trader][_nonce],"Nonce already used"
458,631
!nonces[_trader][_nonce]
null
// SPDX-License-Identifier: MIT pragma solidity ^0.7.6; pragma abicoder v2; import "./utils/OracleLibrary.sol"; import "./utils/IERC20.sol"; import "./utils/SafeMath.sol"; import "./utils/SafeERC20.sol"; import "./utils/Ownable.sol"; import "./utils/PoolAddress.sol"; import "./utils/univ3api.sol"; import "./utils/Math.sol"; import "./utils/IERC721.sol"; import "./utils/IERC721Receiver.sol"; interface xynft{ function addWhiteList(address _addr) external; function isWhiteList(address _user) external view returns (bool) ; } struct BondInfo { uint256 takedAmount; uint256 startDay; uint256 origAmount; uint256 discount; bool isLP; } struct LpStakeInfo { uint256 tokenid; uint256 lockedAmount; uint256 startDay; uint8 stakePeriod; } contract LPTokenWrapper is IERC721Receiver { using SafeMath for uint256; IERC721 public uniSwapNft; uint256[4] _totalSupply; mapping(address=>mapping(uint8=>LpStakeInfo[])) lpStakeInfos; uint8 constant ONE_MONTH_TYPE = 0; uint8 constant THREE_MONTH_TYPE = 1; uint8 constant SIX_MONTH_TYPE = 2; uint8 constant ONE_YEAR_TYPE = 3; event OnNFTTokenReceived(address indexed _operator, address indexed _from, uint256 _tokenId, bytes _data); event TokenSingleStaked(address indexed _from, uint256 _amount, uint16 _period); event LpStaked(address indexed _from, uint256 _tokenId, uint8 _period, uint256 _amount1, uint256 _amount2); event Bonded(address indexed _from, uint256 _amount); event EthBonded(address indexed _from, uint256 _amount); event WithdrawAllLP(address indexed _from, uint256 _amount); event WithdrawAndLP(address indexed _from, uint256 _amount); event WithdrawBond(address indexed _from, uint256 _amount); function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) override external returns (bytes4) { } function getLpInfos(address _holder, uint8 _lockType) public view returns (LpStakeInfo[] memory) { } function totalSupply() public view returns (uint256[4] memory) { } function balanceOf(address account, uint8 _lockType) public view returns (uint256) { } function toUint128(uint256 x) internal pure returns (uint128 y) { require(<FILL_ME>) } } struct LockInfo { uint256 totalReward; uint256 daoStartDay; } contract SubscriptionAndPledge is LPTokenWrapper, univ3sdk, Ownable{ address public uniswapV3Factory = 0x1F98431c8aD98523631AE4a59f267346ea31F984; address public _quoteToken ; address public _baseToken ; address public _wethToken = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address public _pool; using SafeERC20 for IERC20; using SafeMath for uint256; IERC20 outToken; IERC20 usdcToken; address pool1; LockInfo public lockinfo; uint8 BONDS_RATE = 9; uint8 BONDS_LP_RATE = 18; uint256 constant Day30Duration = 86400 * 30; uint256 constant Day90Duration = 86400 * 90; uint256[3] daoDiscount = [90, 95, 98]; uint16[4] periods = [30, 90, 182, 365]; uint8[4] lprates = [9, 12, 15, 20]; uint256 benefit = 100 * 10 ** 8; uint256 MaxStakeAmount = 50000 * 10 ** 8; uint256 minStakeAmount = 1000 * 10 ** 8; uint256 minBondAmount = 2000 * 10 ** 8; uint256 highBondAmount = 5000 * 10 ** 8; uint256 maxBondAmount = 50000 * 10 ** 8; uint256 public totalBondAmount = 0; uint32 constant period = 1000; mapping(address=>BondInfo) bondInfos; xynft public daoNFT = xynft(0x8E22d541dEe9CcF303a6870f775C3A5d4A2D8A7D); constructor(address _quote, address _base) { } function getDaoNFT() public view returns (address) { } function updateUsdc(address _usdc) public onlyOwner { } function updateQuote(address _quote) public onlyOwner { } function updateNFT(address _nft) public onlyOwner { } function updateDaoDiscount(uint256 _dis1, uint256 _dis2, uint256 _dis3) public onlyOwner { } function getDaoDiscount() public view returns(uint256, uint256, uint256) { } function updateLpRate(uint8 _r1, uint8 _r2, uint8 _r3, uint8 _r4) public onlyOwner { } function getLpRates() public view returns (uint8[4] memory) { } function exchange(uint32 _period, address _inToken, uint128 _inAmount, address _outToken) public view returns (uint256) { } function generalExchange(uint32 _period, address _inToken, uint128 _inAmount, address _outToken) public view returns (uint256) { } function setBenefitAmount(uint256 _amount) public onlyOwner { } function setMaxStakeAmount(uint256 _amount) public onlyOwner { } function setBondAmount(uint256 _min, uint256 _high) public onlyOwner { } function notifyRewardAmount(uint256 _reward, address _pool1) external onlyOwner { } function withdrawFunds(uint256 _amount) public onlyOwner { } function _bonds(uint128 _amount, bool isU) private returns (uint256) { } function bonds(uint128 _amount) public returns (bool) { } function _bondsLP(uint128 _amount, bool isU) private returns (uint256) { } function bondsLP(uint128 _amount) public returns (bool) { } function getBonds(address _holder) public view returns (BondInfo memory) { } function queryLpByTokenId(uint256 _tokenId) public view returns (uint256, uint256) { } function stakeLP(uint256 _tokenId, uint8 _lockType) public returns (bool) { } function stakeSingle(uint256 _amount, uint8 _lockType) public returns (bool) { } function withdrawLP(uint8 _lockType) public returns (bool) { } function canWithDrawLP(uint8 _lockType, uint256 _stakeDays) internal view returns (bool) { } function _withdrawLP(uint8 _lockType) private returns (bool) { } function withdrawLPandLP(uint8 _lockType) public returns (bool) { } function _withdrawLPandLP(uint8 _lockType) private returns (bool) { } function withdrawBonds() public returns (bool) { } function _withdrawBonds() private { } function getStakeDays(uint256 _start) private view returns (uint256) { } function getLpLineReward(address _holder, uint8 _lockType) public view returns (uint256[4] memory stakedAmount, uint256[4] memory realRewardAmount, uint256[4] memory targetRewardAmount, uint256 startDay, uint8 lockType) { } function _getBondsReward(BondInfo memory bondinfo) private view returns (uint256 unlockAmount, uint256 leftAmount) { } function getBondsReward(address _holder) public view returns (uint256 unlockAmount, uint256 leftAmount, uint256 takedAmount, uint256 origAmount, uint256 discount, uint256 startDay, bool isLP){ } function usdc2quote(uint128 _inAmount) public view returns (uint256) { } function quote2usdc(uint128 _inAmount) public view returns (uint256) { } function weth2usdc(uint128 _inAmount) public view returns (uint256) { } function getAmountsForLiquidityNew(uint256 tokenId) public view override returns(uint256 amount0, uint256 amount1){ } function _addWhiteList(address _sender) private { } }
(y=uint128(x))==x
458,867
(y=uint128(x))==x
"contract does'nt have enough token"
// SPDX-License-Identifier: MIT pragma solidity ^0.7.6; pragma abicoder v2; import "./utils/OracleLibrary.sol"; import "./utils/IERC20.sol"; import "./utils/SafeMath.sol"; import "./utils/SafeERC20.sol"; import "./utils/Ownable.sol"; import "./utils/PoolAddress.sol"; import "./utils/univ3api.sol"; import "./utils/Math.sol"; import "./utils/IERC721.sol"; import "./utils/IERC721Receiver.sol"; interface xynft{ function addWhiteList(address _addr) external; function isWhiteList(address _user) external view returns (bool) ; } struct BondInfo { uint256 takedAmount; uint256 startDay; uint256 origAmount; uint256 discount; bool isLP; } struct LpStakeInfo { uint256 tokenid; uint256 lockedAmount; uint256 startDay; uint8 stakePeriod; } contract LPTokenWrapper is IERC721Receiver { using SafeMath for uint256; IERC721 public uniSwapNft; uint256[4] _totalSupply; mapping(address=>mapping(uint8=>LpStakeInfo[])) lpStakeInfos; uint8 constant ONE_MONTH_TYPE = 0; uint8 constant THREE_MONTH_TYPE = 1; uint8 constant SIX_MONTH_TYPE = 2; uint8 constant ONE_YEAR_TYPE = 3; event OnNFTTokenReceived(address indexed _operator, address indexed _from, uint256 _tokenId, bytes _data); event TokenSingleStaked(address indexed _from, uint256 _amount, uint16 _period); event LpStaked(address indexed _from, uint256 _tokenId, uint8 _period, uint256 _amount1, uint256 _amount2); event Bonded(address indexed _from, uint256 _amount); event EthBonded(address indexed _from, uint256 _amount); event WithdrawAllLP(address indexed _from, uint256 _amount); event WithdrawAndLP(address indexed _from, uint256 _amount); event WithdrawBond(address indexed _from, uint256 _amount); function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) override external returns (bytes4) { } function getLpInfos(address _holder, uint8 _lockType) public view returns (LpStakeInfo[] memory) { } function totalSupply() public view returns (uint256[4] memory) { } function balanceOf(address account, uint8 _lockType) public view returns (uint256) { } function toUint128(uint256 x) internal pure returns (uint128 y) { } } struct LockInfo { uint256 totalReward; uint256 daoStartDay; } contract SubscriptionAndPledge is LPTokenWrapper, univ3sdk, Ownable{ address public uniswapV3Factory = 0x1F98431c8aD98523631AE4a59f267346ea31F984; address public _quoteToken ; address public _baseToken ; address public _wethToken = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address public _pool; using SafeERC20 for IERC20; using SafeMath for uint256; IERC20 outToken; IERC20 usdcToken; address pool1; LockInfo public lockinfo; uint8 BONDS_RATE = 9; uint8 BONDS_LP_RATE = 18; uint256 constant Day30Duration = 86400 * 30; uint256 constant Day90Duration = 86400 * 90; uint256[3] daoDiscount = [90, 95, 98]; uint16[4] periods = [30, 90, 182, 365]; uint8[4] lprates = [9, 12, 15, 20]; uint256 benefit = 100 * 10 ** 8; uint256 MaxStakeAmount = 50000 * 10 ** 8; uint256 minStakeAmount = 1000 * 10 ** 8; uint256 minBondAmount = 2000 * 10 ** 8; uint256 highBondAmount = 5000 * 10 ** 8; uint256 maxBondAmount = 50000 * 10 ** 8; uint256 public totalBondAmount = 0; uint32 constant period = 1000; mapping(address=>BondInfo) bondInfos; xynft public daoNFT = xynft(0x8E22d541dEe9CcF303a6870f775C3A5d4A2D8A7D); constructor(address _quote, address _base) { } function getDaoNFT() public view returns (address) { } function updateUsdc(address _usdc) public onlyOwner { } function updateQuote(address _quote) public onlyOwner { } function updateNFT(address _nft) public onlyOwner { } function updateDaoDiscount(uint256 _dis1, uint256 _dis2, uint256 _dis3) public onlyOwner { } function getDaoDiscount() public view returns(uint256, uint256, uint256) { } function updateLpRate(uint8 _r1, uint8 _r2, uint8 _r3, uint8 _r4) public onlyOwner { } function getLpRates() public view returns (uint8[4] memory) { } function exchange(uint32 _period, address _inToken, uint128 _inAmount, address _outToken) public view returns (uint256) { } function generalExchange(uint32 _period, address _inToken, uint128 _inAmount, address _outToken) public view returns (uint256) { } function setBenefitAmount(uint256 _amount) public onlyOwner { } function setMaxStakeAmount(uint256 _amount) public onlyOwner { } function setBondAmount(uint256 _min, uint256 _high) public onlyOwner { } function notifyRewardAmount(uint256 _reward, address _pool1) external onlyOwner { } function withdrawFunds(uint256 _amount) public onlyOwner { require(<FILL_ME>) outToken.transfer(msg.sender, _amount); } function _bonds(uint128 _amount, bool isU) private returns (uint256) { } function bonds(uint128 _amount) public returns (bool) { } function _bondsLP(uint128 _amount, bool isU) private returns (uint256) { } function bondsLP(uint128 _amount) public returns (bool) { } function getBonds(address _holder) public view returns (BondInfo memory) { } function queryLpByTokenId(uint256 _tokenId) public view returns (uint256, uint256) { } function stakeLP(uint256 _tokenId, uint8 _lockType) public returns (bool) { } function stakeSingle(uint256 _amount, uint8 _lockType) public returns (bool) { } function withdrawLP(uint8 _lockType) public returns (bool) { } function canWithDrawLP(uint8 _lockType, uint256 _stakeDays) internal view returns (bool) { } function _withdrawLP(uint8 _lockType) private returns (bool) { } function withdrawLPandLP(uint8 _lockType) public returns (bool) { } function _withdrawLPandLP(uint8 _lockType) private returns (bool) { } function withdrawBonds() public returns (bool) { } function _withdrawBonds() private { } function getStakeDays(uint256 _start) private view returns (uint256) { } function getLpLineReward(address _holder, uint8 _lockType) public view returns (uint256[4] memory stakedAmount, uint256[4] memory realRewardAmount, uint256[4] memory targetRewardAmount, uint256 startDay, uint8 lockType) { } function _getBondsReward(BondInfo memory bondinfo) private view returns (uint256 unlockAmount, uint256 leftAmount) { } function getBondsReward(address _holder) public view returns (uint256 unlockAmount, uint256 leftAmount, uint256 takedAmount, uint256 origAmount, uint256 discount, uint256 startDay, bool isLP){ } function usdc2quote(uint128 _inAmount) public view returns (uint256) { } function quote2usdc(uint128 _inAmount) public view returns (uint256) { } function weth2usdc(uint128 _inAmount) public view returns (uint256) { } function getAmountsForLiquidityNew(uint256 tokenId) public view override returns(uint256 amount0, uint256 amount1){ } function _addWhiteList(address _sender) private { } }
outToken.balanceOf(address(this))>0,"contract does'nt have enough token"
458,867
outToken.balanceOf(address(this))>0
"user already bonded"
// SPDX-License-Identifier: MIT pragma solidity ^0.7.6; pragma abicoder v2; import "./utils/OracleLibrary.sol"; import "./utils/IERC20.sol"; import "./utils/SafeMath.sol"; import "./utils/SafeERC20.sol"; import "./utils/Ownable.sol"; import "./utils/PoolAddress.sol"; import "./utils/univ3api.sol"; import "./utils/Math.sol"; import "./utils/IERC721.sol"; import "./utils/IERC721Receiver.sol"; interface xynft{ function addWhiteList(address _addr) external; function isWhiteList(address _user) external view returns (bool) ; } struct BondInfo { uint256 takedAmount; uint256 startDay; uint256 origAmount; uint256 discount; bool isLP; } struct LpStakeInfo { uint256 tokenid; uint256 lockedAmount; uint256 startDay; uint8 stakePeriod; } contract LPTokenWrapper is IERC721Receiver { using SafeMath for uint256; IERC721 public uniSwapNft; uint256[4] _totalSupply; mapping(address=>mapping(uint8=>LpStakeInfo[])) lpStakeInfos; uint8 constant ONE_MONTH_TYPE = 0; uint8 constant THREE_MONTH_TYPE = 1; uint8 constant SIX_MONTH_TYPE = 2; uint8 constant ONE_YEAR_TYPE = 3; event OnNFTTokenReceived(address indexed _operator, address indexed _from, uint256 _tokenId, bytes _data); event TokenSingleStaked(address indexed _from, uint256 _amount, uint16 _period); event LpStaked(address indexed _from, uint256 _tokenId, uint8 _period, uint256 _amount1, uint256 _amount2); event Bonded(address indexed _from, uint256 _amount); event EthBonded(address indexed _from, uint256 _amount); event WithdrawAllLP(address indexed _from, uint256 _amount); event WithdrawAndLP(address indexed _from, uint256 _amount); event WithdrawBond(address indexed _from, uint256 _amount); function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) override external returns (bytes4) { } function getLpInfos(address _holder, uint8 _lockType) public view returns (LpStakeInfo[] memory) { } function totalSupply() public view returns (uint256[4] memory) { } function balanceOf(address account, uint8 _lockType) public view returns (uint256) { } function toUint128(uint256 x) internal pure returns (uint128 y) { } } struct LockInfo { uint256 totalReward; uint256 daoStartDay; } contract SubscriptionAndPledge is LPTokenWrapper, univ3sdk, Ownable{ address public uniswapV3Factory = 0x1F98431c8aD98523631AE4a59f267346ea31F984; address public _quoteToken ; address public _baseToken ; address public _wethToken = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address public _pool; using SafeERC20 for IERC20; using SafeMath for uint256; IERC20 outToken; IERC20 usdcToken; address pool1; LockInfo public lockinfo; uint8 BONDS_RATE = 9; uint8 BONDS_LP_RATE = 18; uint256 constant Day30Duration = 86400 * 30; uint256 constant Day90Duration = 86400 * 90; uint256[3] daoDiscount = [90, 95, 98]; uint16[4] periods = [30, 90, 182, 365]; uint8[4] lprates = [9, 12, 15, 20]; uint256 benefit = 100 * 10 ** 8; uint256 MaxStakeAmount = 50000 * 10 ** 8; uint256 minStakeAmount = 1000 * 10 ** 8; uint256 minBondAmount = 2000 * 10 ** 8; uint256 highBondAmount = 5000 * 10 ** 8; uint256 maxBondAmount = 50000 * 10 ** 8; uint256 public totalBondAmount = 0; uint32 constant period = 1000; mapping(address=>BondInfo) bondInfos; xynft public daoNFT = xynft(0x8E22d541dEe9CcF303a6870f775C3A5d4A2D8A7D); constructor(address _quote, address _base) { } function getDaoNFT() public view returns (address) { } function updateUsdc(address _usdc) public onlyOwner { } function updateQuote(address _quote) public onlyOwner { } function updateNFT(address _nft) public onlyOwner { } function updateDaoDiscount(uint256 _dis1, uint256 _dis2, uint256 _dis3) public onlyOwner { } function getDaoDiscount() public view returns(uint256, uint256, uint256) { } function updateLpRate(uint8 _r1, uint8 _r2, uint8 _r3, uint8 _r4) public onlyOwner { } function getLpRates() public view returns (uint8[4] memory) { } function exchange(uint32 _period, address _inToken, uint128 _inAmount, address _outToken) public view returns (uint256) { } function generalExchange(uint32 _period, address _inToken, uint128 _inAmount, address _outToken) public view returns (uint256) { } function setBenefitAmount(uint256 _amount) public onlyOwner { } function setMaxStakeAmount(uint256 _amount) public onlyOwner { } function setBondAmount(uint256 _min, uint256 _high) public onlyOwner { } function notifyRewardAmount(uint256 _reward, address _pool1) external onlyOwner { } function withdrawFunds(uint256 _amount) public onlyOwner { } function _bonds(uint128 _amount, bool isU) private returns (uint256) { require(<FILL_ME>) require(lockinfo.daoStartDay > 0 && block.timestamp > lockinfo.daoStartDay, "dao does't start"); require(_amount >= minBondAmount, "usdc token transferd less than min"); require(_amount <= maxBondAmount, "usdc token transferd out of range"); require(usdcToken.balanceOf(msg.sender) >= _amount, "user's usdc not enough!"); uint256 umiAmount = _amount; if(isU) { usdcToken.safeTransferFrom(msg.sender, pool1, _amount); } uint256 durationDays = block.timestamp - lockinfo.daoStartDay; uint256 discount = 0; if(durationDays <= Day30Duration) { discount = daoDiscount[0]; } else if (durationDays > Day30Duration && durationDays <= Day90Duration) { discount = daoDiscount[1]; } else { discount = daoDiscount[2]; } umiAmount = umiAmount.mul(100); umiAmount = umiAmount.div(discount).mul(1e8).div(quote2usdc(100000000)).mul(109).div(100).add(benefit); BondInfo memory bondinfo = BondInfo(0, block.timestamp, umiAmount, discount, false); bondInfos[msg.sender] = bondinfo; totalBondAmount = totalBondAmount.add(umiAmount); _addWhiteList(msg.sender); emit Bonded(msg.sender, _amount); return discount; } function bonds(uint128 _amount) public returns (bool) { } function _bondsLP(uint128 _amount, bool isU) private returns (uint256) { } function bondsLP(uint128 _amount) public returns (bool) { } function getBonds(address _holder) public view returns (BondInfo memory) { } function queryLpByTokenId(uint256 _tokenId) public view returns (uint256, uint256) { } function stakeLP(uint256 _tokenId, uint8 _lockType) public returns (bool) { } function stakeSingle(uint256 _amount, uint8 _lockType) public returns (bool) { } function withdrawLP(uint8 _lockType) public returns (bool) { } function canWithDrawLP(uint8 _lockType, uint256 _stakeDays) internal view returns (bool) { } function _withdrawLP(uint8 _lockType) private returns (bool) { } function withdrawLPandLP(uint8 _lockType) public returns (bool) { } function _withdrawLPandLP(uint8 _lockType) private returns (bool) { } function withdrawBonds() public returns (bool) { } function _withdrawBonds() private { } function getStakeDays(uint256 _start) private view returns (uint256) { } function getLpLineReward(address _holder, uint8 _lockType) public view returns (uint256[4] memory stakedAmount, uint256[4] memory realRewardAmount, uint256[4] memory targetRewardAmount, uint256 startDay, uint8 lockType) { } function _getBondsReward(BondInfo memory bondinfo) private view returns (uint256 unlockAmount, uint256 leftAmount) { } function getBondsReward(address _holder) public view returns (uint256 unlockAmount, uint256 leftAmount, uint256 takedAmount, uint256 origAmount, uint256 discount, uint256 startDay, bool isLP){ } function usdc2quote(uint128 _inAmount) public view returns (uint256) { } function quote2usdc(uint128 _inAmount) public view returns (uint256) { } function weth2usdc(uint128 _inAmount) public view returns (uint256) { } function getAmountsForLiquidityNew(uint256 tokenId) public view override returns(uint256 amount0, uint256 amount1){ } function _addWhiteList(address _sender) private { } }
bondInfos[msg.sender].origAmount<=0,"user already bonded"
458,867
bondInfos[msg.sender].origAmount<=0
"user's usdc not enough!"
// SPDX-License-Identifier: MIT pragma solidity ^0.7.6; pragma abicoder v2; import "./utils/OracleLibrary.sol"; import "./utils/IERC20.sol"; import "./utils/SafeMath.sol"; import "./utils/SafeERC20.sol"; import "./utils/Ownable.sol"; import "./utils/PoolAddress.sol"; import "./utils/univ3api.sol"; import "./utils/Math.sol"; import "./utils/IERC721.sol"; import "./utils/IERC721Receiver.sol"; interface xynft{ function addWhiteList(address _addr) external; function isWhiteList(address _user) external view returns (bool) ; } struct BondInfo { uint256 takedAmount; uint256 startDay; uint256 origAmount; uint256 discount; bool isLP; } struct LpStakeInfo { uint256 tokenid; uint256 lockedAmount; uint256 startDay; uint8 stakePeriod; } contract LPTokenWrapper is IERC721Receiver { using SafeMath for uint256; IERC721 public uniSwapNft; uint256[4] _totalSupply; mapping(address=>mapping(uint8=>LpStakeInfo[])) lpStakeInfos; uint8 constant ONE_MONTH_TYPE = 0; uint8 constant THREE_MONTH_TYPE = 1; uint8 constant SIX_MONTH_TYPE = 2; uint8 constant ONE_YEAR_TYPE = 3; event OnNFTTokenReceived(address indexed _operator, address indexed _from, uint256 _tokenId, bytes _data); event TokenSingleStaked(address indexed _from, uint256 _amount, uint16 _period); event LpStaked(address indexed _from, uint256 _tokenId, uint8 _period, uint256 _amount1, uint256 _amount2); event Bonded(address indexed _from, uint256 _amount); event EthBonded(address indexed _from, uint256 _amount); event WithdrawAllLP(address indexed _from, uint256 _amount); event WithdrawAndLP(address indexed _from, uint256 _amount); event WithdrawBond(address indexed _from, uint256 _amount); function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) override external returns (bytes4) { } function getLpInfos(address _holder, uint8 _lockType) public view returns (LpStakeInfo[] memory) { } function totalSupply() public view returns (uint256[4] memory) { } function balanceOf(address account, uint8 _lockType) public view returns (uint256) { } function toUint128(uint256 x) internal pure returns (uint128 y) { } } struct LockInfo { uint256 totalReward; uint256 daoStartDay; } contract SubscriptionAndPledge is LPTokenWrapper, univ3sdk, Ownable{ address public uniswapV3Factory = 0x1F98431c8aD98523631AE4a59f267346ea31F984; address public _quoteToken ; address public _baseToken ; address public _wethToken = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address public _pool; using SafeERC20 for IERC20; using SafeMath for uint256; IERC20 outToken; IERC20 usdcToken; address pool1; LockInfo public lockinfo; uint8 BONDS_RATE = 9; uint8 BONDS_LP_RATE = 18; uint256 constant Day30Duration = 86400 * 30; uint256 constant Day90Duration = 86400 * 90; uint256[3] daoDiscount = [90, 95, 98]; uint16[4] periods = [30, 90, 182, 365]; uint8[4] lprates = [9, 12, 15, 20]; uint256 benefit = 100 * 10 ** 8; uint256 MaxStakeAmount = 50000 * 10 ** 8; uint256 minStakeAmount = 1000 * 10 ** 8; uint256 minBondAmount = 2000 * 10 ** 8; uint256 highBondAmount = 5000 * 10 ** 8; uint256 maxBondAmount = 50000 * 10 ** 8; uint256 public totalBondAmount = 0; uint32 constant period = 1000; mapping(address=>BondInfo) bondInfos; xynft public daoNFT = xynft(0x8E22d541dEe9CcF303a6870f775C3A5d4A2D8A7D); constructor(address _quote, address _base) { } function getDaoNFT() public view returns (address) { } function updateUsdc(address _usdc) public onlyOwner { } function updateQuote(address _quote) public onlyOwner { } function updateNFT(address _nft) public onlyOwner { } function updateDaoDiscount(uint256 _dis1, uint256 _dis2, uint256 _dis3) public onlyOwner { } function getDaoDiscount() public view returns(uint256, uint256, uint256) { } function updateLpRate(uint8 _r1, uint8 _r2, uint8 _r3, uint8 _r4) public onlyOwner { } function getLpRates() public view returns (uint8[4] memory) { } function exchange(uint32 _period, address _inToken, uint128 _inAmount, address _outToken) public view returns (uint256) { } function generalExchange(uint32 _period, address _inToken, uint128 _inAmount, address _outToken) public view returns (uint256) { } function setBenefitAmount(uint256 _amount) public onlyOwner { } function setMaxStakeAmount(uint256 _amount) public onlyOwner { } function setBondAmount(uint256 _min, uint256 _high) public onlyOwner { } function notifyRewardAmount(uint256 _reward, address _pool1) external onlyOwner { } function withdrawFunds(uint256 _amount) public onlyOwner { } function _bonds(uint128 _amount, bool isU) private returns (uint256) { require(bondInfos[msg.sender].origAmount <= 0, "user already bonded"); require(lockinfo.daoStartDay > 0 && block.timestamp > lockinfo.daoStartDay, "dao does't start"); require(_amount >= minBondAmount, "usdc token transferd less than min"); require(_amount <= maxBondAmount, "usdc token transferd out of range"); require(<FILL_ME>) uint256 umiAmount = _amount; if(isU) { usdcToken.safeTransferFrom(msg.sender, pool1, _amount); } uint256 durationDays = block.timestamp - lockinfo.daoStartDay; uint256 discount = 0; if(durationDays <= Day30Duration) { discount = daoDiscount[0]; } else if (durationDays > Day30Duration && durationDays <= Day90Duration) { discount = daoDiscount[1]; } else { discount = daoDiscount[2]; } umiAmount = umiAmount.mul(100); umiAmount = umiAmount.div(discount).mul(1e8).div(quote2usdc(100000000)).mul(109).div(100).add(benefit); BondInfo memory bondinfo = BondInfo(0, block.timestamp, umiAmount, discount, false); bondInfos[msg.sender] = bondinfo; totalBondAmount = totalBondAmount.add(umiAmount); _addWhiteList(msg.sender); emit Bonded(msg.sender, _amount); return discount; } function bonds(uint128 _amount) public returns (bool) { } function _bondsLP(uint128 _amount, bool isU) private returns (uint256) { } function bondsLP(uint128 _amount) public returns (bool) { } function getBonds(address _holder) public view returns (BondInfo memory) { } function queryLpByTokenId(uint256 _tokenId) public view returns (uint256, uint256) { } function stakeLP(uint256 _tokenId, uint8 _lockType) public returns (bool) { } function stakeSingle(uint256 _amount, uint8 _lockType) public returns (bool) { } function withdrawLP(uint8 _lockType) public returns (bool) { } function canWithDrawLP(uint8 _lockType, uint256 _stakeDays) internal view returns (bool) { } function _withdrawLP(uint8 _lockType) private returns (bool) { } function withdrawLPandLP(uint8 _lockType) public returns (bool) { } function _withdrawLPandLP(uint8 _lockType) private returns (bool) { } function withdrawBonds() public returns (bool) { } function _withdrawBonds() private { } function getStakeDays(uint256 _start) private view returns (uint256) { } function getLpLineReward(address _holder, uint8 _lockType) public view returns (uint256[4] memory stakedAmount, uint256[4] memory realRewardAmount, uint256[4] memory targetRewardAmount, uint256 startDay, uint8 lockType) { } function _getBondsReward(BondInfo memory bondinfo) private view returns (uint256 unlockAmount, uint256 leftAmount) { } function getBondsReward(address _holder) public view returns (uint256 unlockAmount, uint256 leftAmount, uint256 takedAmount, uint256 origAmount, uint256 discount, uint256 startDay, bool isLP){ } function usdc2quote(uint128 _inAmount) public view returns (uint256) { } function quote2usdc(uint128 _inAmount) public view returns (uint256) { } function weth2usdc(uint128 _inAmount) public view returns (uint256) { } function getAmountsForLiquidityNew(uint256 tokenId) public view override returns(uint256 amount0, uint256 amount1){ } function _addWhiteList(address _sender) private { } }
usdcToken.balanceOf(msg.sender)>=_amount,"user's usdc not enough!"
458,867
usdcToken.balanceOf(msg.sender)>=_amount
"LP' duration not enough!"
// SPDX-License-Identifier: MIT pragma solidity ^0.7.6; pragma abicoder v2; import "./utils/OracleLibrary.sol"; import "./utils/IERC20.sol"; import "./utils/SafeMath.sol"; import "./utils/SafeERC20.sol"; import "./utils/Ownable.sol"; import "./utils/PoolAddress.sol"; import "./utils/univ3api.sol"; import "./utils/Math.sol"; import "./utils/IERC721.sol"; import "./utils/IERC721Receiver.sol"; interface xynft{ function addWhiteList(address _addr) external; function isWhiteList(address _user) external view returns (bool) ; } struct BondInfo { uint256 takedAmount; uint256 startDay; uint256 origAmount; uint256 discount; bool isLP; } struct LpStakeInfo { uint256 tokenid; uint256 lockedAmount; uint256 startDay; uint8 stakePeriod; } contract LPTokenWrapper is IERC721Receiver { using SafeMath for uint256; IERC721 public uniSwapNft; uint256[4] _totalSupply; mapping(address=>mapping(uint8=>LpStakeInfo[])) lpStakeInfos; uint8 constant ONE_MONTH_TYPE = 0; uint8 constant THREE_MONTH_TYPE = 1; uint8 constant SIX_MONTH_TYPE = 2; uint8 constant ONE_YEAR_TYPE = 3; event OnNFTTokenReceived(address indexed _operator, address indexed _from, uint256 _tokenId, bytes _data); event TokenSingleStaked(address indexed _from, uint256 _amount, uint16 _period); event LpStaked(address indexed _from, uint256 _tokenId, uint8 _period, uint256 _amount1, uint256 _amount2); event Bonded(address indexed _from, uint256 _amount); event EthBonded(address indexed _from, uint256 _amount); event WithdrawAllLP(address indexed _from, uint256 _amount); event WithdrawAndLP(address indexed _from, uint256 _amount); event WithdrawBond(address indexed _from, uint256 _amount); function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) override external returns (bytes4) { } function getLpInfos(address _holder, uint8 _lockType) public view returns (LpStakeInfo[] memory) { } function totalSupply() public view returns (uint256[4] memory) { } function balanceOf(address account, uint8 _lockType) public view returns (uint256) { } function toUint128(uint256 x) internal pure returns (uint128 y) { } } struct LockInfo { uint256 totalReward; uint256 daoStartDay; } contract SubscriptionAndPledge is LPTokenWrapper, univ3sdk, Ownable{ address public uniswapV3Factory = 0x1F98431c8aD98523631AE4a59f267346ea31F984; address public _quoteToken ; address public _baseToken ; address public _wethToken = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address public _pool; using SafeERC20 for IERC20; using SafeMath for uint256; IERC20 outToken; IERC20 usdcToken; address pool1; LockInfo public lockinfo; uint8 BONDS_RATE = 9; uint8 BONDS_LP_RATE = 18; uint256 constant Day30Duration = 86400 * 30; uint256 constant Day90Duration = 86400 * 90; uint256[3] daoDiscount = [90, 95, 98]; uint16[4] periods = [30, 90, 182, 365]; uint8[4] lprates = [9, 12, 15, 20]; uint256 benefit = 100 * 10 ** 8; uint256 MaxStakeAmount = 50000 * 10 ** 8; uint256 minStakeAmount = 1000 * 10 ** 8; uint256 minBondAmount = 2000 * 10 ** 8; uint256 highBondAmount = 5000 * 10 ** 8; uint256 maxBondAmount = 50000 * 10 ** 8; uint256 public totalBondAmount = 0; uint32 constant period = 1000; mapping(address=>BondInfo) bondInfos; xynft public daoNFT = xynft(0x8E22d541dEe9CcF303a6870f775C3A5d4A2D8A7D); constructor(address _quote, address _base) { } function getDaoNFT() public view returns (address) { } function updateUsdc(address _usdc) public onlyOwner { } function updateQuote(address _quote) public onlyOwner { } function updateNFT(address _nft) public onlyOwner { } function updateDaoDiscount(uint256 _dis1, uint256 _dis2, uint256 _dis3) public onlyOwner { } function getDaoDiscount() public view returns(uint256, uint256, uint256) { } function updateLpRate(uint8 _r1, uint8 _r2, uint8 _r3, uint8 _r4) public onlyOwner { } function getLpRates() public view returns (uint8[4] memory) { } function exchange(uint32 _period, address _inToken, uint128 _inAmount, address _outToken) public view returns (uint256) { } function generalExchange(uint32 _period, address _inToken, uint128 _inAmount, address _outToken) public view returns (uint256) { } function setBenefitAmount(uint256 _amount) public onlyOwner { } function setMaxStakeAmount(uint256 _amount) public onlyOwner { } function setBondAmount(uint256 _min, uint256 _high) public onlyOwner { } function notifyRewardAmount(uint256 _reward, address _pool1) external onlyOwner { } function withdrawFunds(uint256 _amount) public onlyOwner { } function _bonds(uint128 _amount, bool isU) private returns (uint256) { } function bonds(uint128 _amount) public returns (bool) { } function _bondsLP(uint128 _amount, bool isU) private returns (uint256) { } function bondsLP(uint128 _amount) public returns (bool) { } function getBonds(address _holder) public view returns (BondInfo memory) { } function queryLpByTokenId(uint256 _tokenId) public view returns (uint256, uint256) { } function stakeLP(uint256 _tokenId, uint8 _lockType) public returns (bool) { } function stakeSingle(uint256 _amount, uint8 _lockType) public returns (bool) { } function withdrawLP(uint8 _lockType) public returns (bool) { } function canWithDrawLP(uint8 _lockType, uint256 _stakeDays) internal view returns (bool) { } function _withdrawLP(uint8 _lockType) private returns (bool) { LpStakeInfo[] storage stakeinfos = lpStakeInfos[msg.sender][_lockType]; uint256 unlockAmount = 0; uint256 rewardAmount = 0; for(uint256 i = 0; i < stakeinfos.length; i ++) { uint256 stakeDays = getStakeDays(stakeinfos[i].startDay); require(<FILL_ME>) if(stakeinfos[i].tokenid > 0) { if(stakeinfos[i].lockedAmount > 0) { uniSwapNft.safeTransferFrom(address(this), msg.sender, stakeinfos[i].tokenid); } } else { unlockAmount = unlockAmount.add(stakeinfos[i].lockedAmount); } if(stakeDays >= periods[stakeinfos[i].stakePeriod]) { rewardAmount = stakeinfos[i].lockedAmount.mul(lprates[stakeinfos[i].stakePeriod]).mul(stakeDays).div(365).div(100).add(rewardAmount); } } delete lpStakeInfos[msg.sender][_lockType]; outToken.safeTransfer(msg.sender, rewardAmount.add(unlockAmount)); emit WithdrawAllLP(msg.sender, rewardAmount.add(unlockAmount)); return true; } function withdrawLPandLP(uint8 _lockType) public returns (bool) { } function _withdrawLPandLP(uint8 _lockType) private returns (bool) { } function withdrawBonds() public returns (bool) { } function _withdrawBonds() private { } function getStakeDays(uint256 _start) private view returns (uint256) { } function getLpLineReward(address _holder, uint8 _lockType) public view returns (uint256[4] memory stakedAmount, uint256[4] memory realRewardAmount, uint256[4] memory targetRewardAmount, uint256 startDay, uint8 lockType) { } function _getBondsReward(BondInfo memory bondinfo) private view returns (uint256 unlockAmount, uint256 leftAmount) { } function getBondsReward(address _holder) public view returns (uint256 unlockAmount, uint256 leftAmount, uint256 takedAmount, uint256 origAmount, uint256 discount, uint256 startDay, bool isLP){ } function usdc2quote(uint128 _inAmount) public view returns (uint256) { } function quote2usdc(uint128 _inAmount) public view returns (uint256) { } function weth2usdc(uint128 _inAmount) public view returns (uint256) { } function getAmountsForLiquidityNew(uint256 tokenId) public view override returns(uint256 amount0, uint256 amount1){ } function _addWhiteList(address _sender) private { } }
canWithDrawLP(_lockType,stakeDays),"LP' duration not enough!"
458,867
canWithDrawLP(_lockType,stakeDays)
"ERC721: can't exceed the limit"
// SPDX-License-Identifier: MIT // // // // ,/(##(/,. .,/####(*. // (&&&&&&&&&&&&&&&&&&&&( &&&&&&&&& .%&&&&&&&&&&&&&&&&&&&&/ // %&&&&&&&&&&&&&&&&&&&&&&&&&&# ,&&&&&&&&&&& /&&&&&&&&&&&&&&&&&&&&&&&&&&&&. // .&&&&&&&&&&&&&&%&&&&&&&&&&&&&&&, (&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&* // &&&&&&&&&# .&&&&&&&&&/ (&&&&&&&&&&&&&&&&& #&&&&&&&&&&%. ,%&&&&&&&&&&. // .&&&&&&&&&# .%%%%%%%% /%#(/. %&&&&&&&& #&&&&&&&&&* #&&&&&&&&&. // *&&&&&&&&&&&&&&%(,. #&&&&&&&& /&&&&&&&&&. .&&&&&&&&& // %&&&&&&&&&&&&&&&&&&&&&&#* #&&&&&&&& &&&&&&&&&* // .%&&&&&&&&&&&&&&&&&&&&&&&% #&&&&&&&& &&&&&&&&&, // ,*%&&&&&&&&&&&&&&&&&* #&&&&&&&& &&&&&&&&&* // ******** .#&&&&&&&&&&, #&&&&&&&& ,&&&&&&&&&, (&&&&&&&&&. // &&&&&&&&% ,&&&&&&&&& #&&&&&&&& (&&&&&&&&&( /&&&&&&&&&& // /&&&&&&&&&&. #&&&&&&&&&* #&&&&&&&& (&&&&&&&&&&&* .%&&&&&&&&&&&& // ,&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&( #&&&&&&&& %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&, // ,&&&&&&&&&&&&&&&&&&&&&&&&&&&&&# #&&&&&&&& *&&&&&&&&&&&&&&&&&&&&&&&&&&&% // /&&&&&&&&&&&&&&&&&&&&&&, #&&&&&&&& (&&&&&&&&&&&&&&&&&&&&* // .,***,. ,,,,,, // // pragma solidity ^0.8.0; pragma abicoder v2; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "./Mint721AValidator.sol"; import "./ERC721AURI.sol"; import "./LibERC721AMint.sol"; import "./Royalty.sol"; import "./ERC721AEnumerableMinimal.sol"; import "./OwnablePausable.sol"; import "hardhat/console.sol"; contract ERC721ARareCirclesMinimal is Context, OwnablePausable, ERC721AMinimal, Mint721AValidator, ERC721AURI, ERC721AEnumerableMinimal, Royalty { using SafeMath for uint256; bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7; bytes4 private constant _INTERFACE_ID_ERC721A = 0x80ac58cd; bytes4 private constant _INTERFACE_ID_ERC721A_METADATA = 0x5b5e139f; bytes4 private constant _INTERFACE_ID_ERC721A_ENUMERABLE = 0x780e9d63; bytes4 private constant _INTERFACE_ID_ROYALTIES = 0x2a55205a; /// bytes4(keccak256("royaltyInfo(uint256,uint256)")) == 0x2a55205a // Max Supply uint256 private _maxSupply; // RareCircles Treasury address private _RCTreasury; // Merchant Treasury address private _merchantTreasury; event CreateERC721ARareCircles(address indexed owner, string name, string symbol); event Payout(address indexed to, uint256 amount); event Fee(address indexed to, uint256 amount); event Mint(uint256 amount, address indexed to); event BaseURI(string uri); event PlaceholderHolderURI(string uri); event MerchantTreasury(address treasury); event RarecirclesTreasury(address treasury); event MaxSupply(uint256 maxSupply); event Name(string name); event Symbol(string symbol); constructor( string memory _name, string memory _symbol, string memory _baseURI, string memory _placeholderURI, uint256 maxSupply_ ) Mint721AValidator("Rarecircles", "1") ERC721AMinimal(_name, _symbol) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721AMinimal, ERC721AEnumerableMinimal) returns (bool) { } function mintAndTransfer(LibERC721AMint.Mint721AData memory data) public payable { //require(msg.value > 0, "ERC721: call requires an amount of ETH"); require( data.fee <= msg.value, "ERC721: application fee must be less then or equal to ETH sent" ); // Mint Limit uint256 existingAmount = balanceOf(msg.sender); if (data.limit > 0) { require(<FILL_ME>) } // We make sure that this has been signed by the contract owner bytes32 hash = LibERC721AMint.hash(data); validate(owner(), hash, data.signature); require(msg.value == data.cost, "ERC721: insufficient amount"); // this is th perform calling mint, it may or may not match data.recipient address sender = _msgSender(); require( sender == data.recipient || isApprovedForAll(data.recipient, sender), "ERC721: transfer caller is not owner nor approved" ); _mintTo(data.amount, sender); uint256 payout = msg.value - data.fee; if (payout > 0 && _merchantTreasury != address(0)) { payable(_merchantTreasury).transfer(payout); emit Payout(_merchantTreasury, payout); } if (data.fee > 0 && _RCTreasury != address(0)) { payable(_RCTreasury).transfer(data.fee); emit Fee(_RCTreasury, data.fee); } } function mintTo(uint256 _amount, address _to) public onlyOwner { } function setTokenURI(uint256 _tokenId, string memory _tokenURI) public onlyOwner { } function _mintTo(uint256 _amount, address _to) internal whenNotPaused { } // function updateAccount( // uint256 _id, // address _from, // address _to // ) external { // require(_msgSender() == _from, "not allowed"); // super._updateAccount(_id, _from, _to); // } function tokenURI(uint256 tokenId) public view virtual override(ERC721AMinimal, ERC721AURI) returns (string memory) { } function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { } function tokensOfOwner(address owner) public view virtual override returns (uint256[] memory) { } function totalSupply() public view virtual override(ERC721AEnumerableMinimal, ERC721AMinimal) returns (uint256) { } function tokenByIndex(uint256 index) public view virtual override returns (uint256) { } function setBaseTokenURI(string memory baseTokenURI_) public onlyOwner { } function baseTokenURI() public view returns (string memory) { } function setPlaceholderURI(string memory placeholderURI_) public onlyOwner { } function placholderURI() public view returns (string memory) { } function setMerchantTreasury(address treasury_) public onlyOwner { } function merchantTreasury() public view returns (address) { } function setRCTreasury(address treasury_) public onlyOwner { } function RCTreasury() public view returns (address) { } function setRoyalty(address creator_, uint256 amount_) public onlyOwner { } function setName(string memory name_) public onlyOwner { } function setSymbol(string memory symbol_) public onlyOwner { } function setMaxSupply(uint256 maxSupply_) public onlyOwner { } function maxSupply() public view returns (uint256) { } function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal override(ERC721AMinimal, ERC721AEnumerableMinimal) { } }
existingAmount+data.amount<=data.limit,"ERC721: can't exceed the limit"
458,930
existingAmount+data.amount<=data.limit
"ERC721: can't exceed max supply"
// SPDX-License-Identifier: MIT // // // // ,/(##(/,. .,/####(*. // (&&&&&&&&&&&&&&&&&&&&( &&&&&&&&& .%&&&&&&&&&&&&&&&&&&&&/ // %&&&&&&&&&&&&&&&&&&&&&&&&&&# ,&&&&&&&&&&& /&&&&&&&&&&&&&&&&&&&&&&&&&&&&. // .&&&&&&&&&&&&&&%&&&&&&&&&&&&&&&, (&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&* // &&&&&&&&&# .&&&&&&&&&/ (&&&&&&&&&&&&&&&&& #&&&&&&&&&&%. ,%&&&&&&&&&&. // .&&&&&&&&&# .%%%%%%%% /%#(/. %&&&&&&&& #&&&&&&&&&* #&&&&&&&&&. // *&&&&&&&&&&&&&&%(,. #&&&&&&&& /&&&&&&&&&. .&&&&&&&&& // %&&&&&&&&&&&&&&&&&&&&&&#* #&&&&&&&& &&&&&&&&&* // .%&&&&&&&&&&&&&&&&&&&&&&&% #&&&&&&&& &&&&&&&&&, // ,*%&&&&&&&&&&&&&&&&&* #&&&&&&&& &&&&&&&&&* // ******** .#&&&&&&&&&&, #&&&&&&&& ,&&&&&&&&&, (&&&&&&&&&. // &&&&&&&&% ,&&&&&&&&& #&&&&&&&& (&&&&&&&&&( /&&&&&&&&&& // /&&&&&&&&&&. #&&&&&&&&&* #&&&&&&&& (&&&&&&&&&&&* .%&&&&&&&&&&&& // ,&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&( #&&&&&&&& %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&, // ,&&&&&&&&&&&&&&&&&&&&&&&&&&&&&# #&&&&&&&& *&&&&&&&&&&&&&&&&&&&&&&&&&&&% // /&&&&&&&&&&&&&&&&&&&&&&, #&&&&&&&& (&&&&&&&&&&&&&&&&&&&&* // .,***,. ,,,,,, // // pragma solidity ^0.8.0; pragma abicoder v2; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "./Mint721AValidator.sol"; import "./ERC721AURI.sol"; import "./LibERC721AMint.sol"; import "./Royalty.sol"; import "./ERC721AEnumerableMinimal.sol"; import "./OwnablePausable.sol"; import "hardhat/console.sol"; contract ERC721ARareCirclesMinimal is Context, OwnablePausable, ERC721AMinimal, Mint721AValidator, ERC721AURI, ERC721AEnumerableMinimal, Royalty { using SafeMath for uint256; bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7; bytes4 private constant _INTERFACE_ID_ERC721A = 0x80ac58cd; bytes4 private constant _INTERFACE_ID_ERC721A_METADATA = 0x5b5e139f; bytes4 private constant _INTERFACE_ID_ERC721A_ENUMERABLE = 0x780e9d63; bytes4 private constant _INTERFACE_ID_ROYALTIES = 0x2a55205a; /// bytes4(keccak256("royaltyInfo(uint256,uint256)")) == 0x2a55205a // Max Supply uint256 private _maxSupply; // RareCircles Treasury address private _RCTreasury; // Merchant Treasury address private _merchantTreasury; event CreateERC721ARareCircles(address indexed owner, string name, string symbol); event Payout(address indexed to, uint256 amount); event Fee(address indexed to, uint256 amount); event Mint(uint256 amount, address indexed to); event BaseURI(string uri); event PlaceholderHolderURI(string uri); event MerchantTreasury(address treasury); event RarecirclesTreasury(address treasury); event MaxSupply(uint256 maxSupply); event Name(string name); event Symbol(string symbol); constructor( string memory _name, string memory _symbol, string memory _baseURI, string memory _placeholderURI, uint256 maxSupply_ ) Mint721AValidator("Rarecircles", "1") ERC721AMinimal(_name, _symbol) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721AMinimal, ERC721AEnumerableMinimal) returns (bool) { } function mintAndTransfer(LibERC721AMint.Mint721AData memory data) public payable { } function mintTo(uint256 _amount, address _to) public onlyOwner { } function setTokenURI(uint256 _tokenId, string memory _tokenURI) public onlyOwner { } function _mintTo(uint256 _amount, address _to) internal whenNotPaused { // Max Supply if (_maxSupply > 0) { require(<FILL_ME>) } _safeMint(_to, _amount); emit Mint(_amount, _to); } // function updateAccount( // uint256 _id, // address _from, // address _to // ) external { // require(_msgSender() == _from, "not allowed"); // super._updateAccount(_id, _from, _to); // } function tokenURI(uint256 tokenId) public view virtual override(ERC721AMinimal, ERC721AURI) returns (string memory) { } function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { } function tokensOfOwner(address owner) public view virtual override returns (uint256[] memory) { } function totalSupply() public view virtual override(ERC721AEnumerableMinimal, ERC721AMinimal) returns (uint256) { } function tokenByIndex(uint256 index) public view virtual override returns (uint256) { } function setBaseTokenURI(string memory baseTokenURI_) public onlyOwner { } function baseTokenURI() public view returns (string memory) { } function setPlaceholderURI(string memory placeholderURI_) public onlyOwner { } function placholderURI() public view returns (string memory) { } function setMerchantTreasury(address treasury_) public onlyOwner { } function merchantTreasury() public view returns (address) { } function setRCTreasury(address treasury_) public onlyOwner { } function RCTreasury() public view returns (address) { } function setRoyalty(address creator_, uint256 amount_) public onlyOwner { } function setName(string memory name_) public onlyOwner { } function setSymbol(string memory symbol_) public onlyOwner { } function setMaxSupply(uint256 maxSupply_) public onlyOwner { } function maxSupply() public view returns (uint256) { } function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal override(ERC721AMinimal, ERC721AEnumerableMinimal) { } }
totalSupply()+_amount<=_maxSupply,"ERC721: can't exceed max supply"
458,930
totalSupply()+_amount<=_maxSupply
"MerkleDistributor: Transfer failed."
pragma solidity >=0.8.0; /// ============ Imports ============ /// @title MerkleClaimERC20 /// @notice ERC20 claimable by members of a merkle tree /// @author Anish Agnihotri <[email protected]> /// @dev Solmate ERC20 includes unused _burn logic that can be removed to optimize deployment cost contract MerkleClaimERC20 is Ownable { /// ============ Immutable storage ============ /// @notice ERC20-claimee inclusion root bytes32 public immutable merkleRoot; address public immutable token; /// ============ Mutable storage ============ /// @notice Mapping of addresses who have claimed tokens mapping(address => bool) public hasClaimed; /// ============ Errors ============ /// @notice Thrown if address has already claimed error AlreadyClaimed(); /// @notice Thrown if address/amount are not part of Merkle tree error NotInMerkle(); /// ============ Constructor ============ /// @notice Creates a new MerkleClaimERC20 contract /// @param _merkleRoot of claimees constructor( bytes32 _merkleRoot ) { } /// ============ Events ============ /// @notice Emitted after a successful token claim /// @param to recipient of claim /// @param amount of tokens claimed event Claim(address indexed to, uint256 amount); /// ============ Functions ============ /// @notice Allows claiming tokens if address is part of merkle tree /// @param to address of claimee /// @param amount of tokens owed to claimee /// @param proof merkle proof to prove address and amount are in tree function claim(address to, uint256 amount, bytes32[] calldata proof) external { // Throw if address has already claimed tokens if (hasClaimed[to]) revert AlreadyClaimed(); // Verify merkle proof, or revert if not in tree bytes32 leaf = keccak256(abi.encodePacked(to, amount)); bool isValidLeaf = MerkleProof.verify(proof, merkleRoot, leaf); if (!isValidLeaf) revert NotInMerkle(); // Set address to claimed hasClaimed[to] = true; // Mint tokens to address require(<FILL_ME>) // Emit claim event emit Claim(to, amount); } function removeStuckToken(address _token, uint256 _amount) external onlyOwner { } }
IERC20(token).transfer(to,amount),"MerkleDistributor: Transfer failed."
459,048
IERC20(token).transfer(to,amount)
null
pragma solidity >=0.8.0; /// ============ Imports ============ /// @title MerkleClaimERC20 /// @notice ERC20 claimable by members of a merkle tree /// @author Anish Agnihotri <[email protected]> /// @dev Solmate ERC20 includes unused _burn logic that can be removed to optimize deployment cost contract MerkleClaimERC20 is Ownable { /// ============ Immutable storage ============ /// @notice ERC20-claimee inclusion root bytes32 public immutable merkleRoot; address public immutable token; /// ============ Mutable storage ============ /// @notice Mapping of addresses who have claimed tokens mapping(address => bool) public hasClaimed; /// ============ Errors ============ /// @notice Thrown if address has already claimed error AlreadyClaimed(); /// @notice Thrown if address/amount are not part of Merkle tree error NotInMerkle(); /// ============ Constructor ============ /// @notice Creates a new MerkleClaimERC20 contract /// @param _merkleRoot of claimees constructor( bytes32 _merkleRoot ) { } /// ============ Events ============ /// @notice Emitted after a successful token claim /// @param to recipient of claim /// @param amount of tokens claimed event Claim(address indexed to, uint256 amount); /// ============ Functions ============ /// @notice Allows claiming tokens if address is part of merkle tree /// @param to address of claimee /// @param amount of tokens owed to claimee /// @param proof merkle proof to prove address and amount are in tree function claim(address to, uint256 amount, bytes32[] calldata proof) external { } function removeStuckToken(address _token, uint256 _amount) external onlyOwner { require(_amount > 0 && IERC20(_token).balanceOf(address(this)) >= _amount,"Error"); require(<FILL_ME>) } }
IERC20(_token).transfer(msg.sender,_amount)
459,048
IERC20(_token).transfer(msg.sender,_amount)
"WALLET_LIMIT_EXCEEDED"
/** SPDX-License-Identifier: MIT */ import "../IKomethAppImplementation.sol"; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; pragma solidity ^0.8.13; /// @author yuru@Gaspack twitter.com/0xYuru /// @custom:coauthor Radisa twitter.com/pr0ph0z /// @dev aa0cdefd28cd450477ec80c28ecf3574 0x8fd31bb99658cb203b8c9034baf3f836c2bc2422fd30380fa30b8eade122618d3ca64095830cac2c0e84bc22910eef206eb43d54f71069f8d9e66cf8e4dcabec1c contract LifeOfHEL is IKomethAppImplementation, ERC721A, DefaultOperatorFilterer, ERC2981, EIP712, ReentrancyGuard, Ownable { using ECDSA for bytes32; bytes32 public constant PRIVATE_SALE_TYPEHASH = keccak256( "PrivateSale(uint256 price,uint256 txLimit,uint256 walletLimit,uint256 deadline,uint256 kind,address recipient)" ); uint256 public maxSupply; string public baseURI; Stage public stage; address public signer; address private withdrawalWallet = 0xE7C72cCD10bE04aD40104905CD8057766036aa45; PublicSale public publicSale; mapping(uint256 => mapping(address => uint256)) public PrivateSaleMinter; mapping(address => uint256) public PublicSaleMinter; mapping(uint256 => uint256) public privateSalePrices; mapping(address => bool) public authorizedAddresses; event PrivateSaleMint(address owner, uint256 kind); modifier notContract() { } modifier onlyAuthorizedAddress() { } constructor( string memory _name, string memory _symbol, string memory _previewURI, uint256 _maxSupply, address _signer, address _authorizedAddress, address _royaltyAddress, uint256 _privateSalePrice, PublicSale memory _publicSaleProperty ) ERC721A(_name, _symbol) EIP712("Kometh", "1.0.0") { } // Override the start token id because by defaut ERC71A set the // start token id to 0 function _startTokenId() internal view virtual override returns (uint256) { } function _isContract(address _addr) internal view returns (bool) { } function setApprovalForAll( address operator, bool approved ) public override onlyAllowedOperatorApproval(operator) { } function approve( address operator, uint256 tokenId ) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom( address from, address to, uint256 tokenId ) public payable override onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId ) public payable override onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public payable override onlyAllowedOperator(from) { } function mintTo( address[] calldata _to, uint256[] calldata _amount ) external onlyAuthorizedAddress { } /** * @inheritdoc IKomethAppImplementation */ function privateSaleMint( uint256 _quantity, uint256 _txLimit, uint256 _walletLimit, uint256 _deadline, uint256 _kind, bytes calldata _signature ) external payable notContract nonReentrant { require(stage == Stage.Private || stage == Stage.Mint, "STAGE_NMATCH"); uint256 privateSalePrice = privateSalePrices[_kind]; require( signer == _verifyPrivateSale( privateSalePrice, _txLimit, _walletLimit, _deadline, msg.sender, _kind, _signature ), "INVALID_SIGNATURE" ); require(block.timestamp <= _deadline, "INVALID_DEADLINE_SIGNATURE"); require(_quantity <= _txLimit, "TX_LIMIT_EXCEEDED"); require(<FILL_ME>) require(totalSupply() + _quantity <= maxSupply, "SUPPLY_EXCEEDED"); require( msg.value >= (privateSalePrice * _quantity), "INSUFFICIENT_FUND" ); PrivateSaleMinter[_kind][msg.sender] += _quantity; _mint(msg.sender, _quantity); emit PrivateSaleMint(msg.sender, _kind); } /** * @inheritdoc IKomethAppImplementation */ function delegateMint( uint256 _quantity, uint256 _txLimit, uint256 _walletLimit, uint256 _deadline, address _recipient, uint256 _kind, bytes calldata _signature ) external payable notContract nonReentrant { } /** * @inheritdoc IKomethAppImplementation */ function publicSaleMint( uint256 _quantity ) external payable notContract nonReentrant { } function _verifyPrivateSale( uint256 _price, uint256 _txLimit, uint256 _walletLimit, uint256 _deadline, address _sender, uint256 _kind, bytes calldata _sign ) internal view returns (address) { } function setPrivateSalePrice( uint256 _kind, uint256 _price ) external onlyOwner { } function updatePublicSale( PublicSale memory _publicSale ) external onlyOwner { } function supportsInterface( bytes4 interfaceId ) public view virtual override(ERC721A, ERC2981) returns (bool) { } /** * @inheritdoc IKomethAppImplementation */ function setStage(Stage _stage) external onlyOwner { } /** * @inheritdoc IKomethAppImplementation */ function setSigner(address _signer) external onlyOwner { } /** * @inheritdoc IKomethAppImplementation */ function setBaseURI(string calldata _baseURI) external onlyOwner { } /** * @inheritdoc IKomethAppImplementation */ function setAuthorizedAddress( address _authorizedAddress, bool value ) external onlyOwner { } /** * @inheritdoc IKomethAppImplementation */ function burn(uint256 _tokenId) external onlyAuthorizedAddress { } /// @notice Set royalties for EIP 2981. /// @param _recipient the recipient of royalty /// @param _amount the amount of royalty (use bps) function setRoyalties( address _recipient, uint96 _amount ) external onlyOwner { } function setWithdrawalWallet(address _withdrawalWallet) external onlyOwner { } /** * @inheritdoc IKomethAppImplementation */ function withdrawAll() external onlyOwner { } function sendValue(address payable recipient, uint256 amount) internal { } function tokenURI( uint256 _id ) public view override returns (string memory) { } }
PrivateSaleMinter[_kind][msg.sender]+_quantity<=_walletLimit,"WALLET_LIMIT_EXCEEDED"
459,075
PrivateSaleMinter[_kind][msg.sender]+_quantity<=_walletLimit
"INSUFFICIENT_FUND"
/** SPDX-License-Identifier: MIT */ import "../IKomethAppImplementation.sol"; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; pragma solidity ^0.8.13; /// @author yuru@Gaspack twitter.com/0xYuru /// @custom:coauthor Radisa twitter.com/pr0ph0z /// @dev aa0cdefd28cd450477ec80c28ecf3574 0x8fd31bb99658cb203b8c9034baf3f836c2bc2422fd30380fa30b8eade122618d3ca64095830cac2c0e84bc22910eef206eb43d54f71069f8d9e66cf8e4dcabec1c contract LifeOfHEL is IKomethAppImplementation, ERC721A, DefaultOperatorFilterer, ERC2981, EIP712, ReentrancyGuard, Ownable { using ECDSA for bytes32; bytes32 public constant PRIVATE_SALE_TYPEHASH = keccak256( "PrivateSale(uint256 price,uint256 txLimit,uint256 walletLimit,uint256 deadline,uint256 kind,address recipient)" ); uint256 public maxSupply; string public baseURI; Stage public stage; address public signer; address private withdrawalWallet = 0xE7C72cCD10bE04aD40104905CD8057766036aa45; PublicSale public publicSale; mapping(uint256 => mapping(address => uint256)) public PrivateSaleMinter; mapping(address => uint256) public PublicSaleMinter; mapping(uint256 => uint256) public privateSalePrices; mapping(address => bool) public authorizedAddresses; event PrivateSaleMint(address owner, uint256 kind); modifier notContract() { } modifier onlyAuthorizedAddress() { } constructor( string memory _name, string memory _symbol, string memory _previewURI, uint256 _maxSupply, address _signer, address _authorizedAddress, address _royaltyAddress, uint256 _privateSalePrice, PublicSale memory _publicSaleProperty ) ERC721A(_name, _symbol) EIP712("Kometh", "1.0.0") { } // Override the start token id because by defaut ERC71A set the // start token id to 0 function _startTokenId() internal view virtual override returns (uint256) { } function _isContract(address _addr) internal view returns (bool) { } function setApprovalForAll( address operator, bool approved ) public override onlyAllowedOperatorApproval(operator) { } function approve( address operator, uint256 tokenId ) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom( address from, address to, uint256 tokenId ) public payable override onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId ) public payable override onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public payable override onlyAllowedOperator(from) { } function mintTo( address[] calldata _to, uint256[] calldata _amount ) external onlyAuthorizedAddress { } /** * @inheritdoc IKomethAppImplementation */ function privateSaleMint( uint256 _quantity, uint256 _txLimit, uint256 _walletLimit, uint256 _deadline, uint256 _kind, bytes calldata _signature ) external payable notContract nonReentrant { require(stage == Stage.Private || stage == Stage.Mint, "STAGE_NMATCH"); uint256 privateSalePrice = privateSalePrices[_kind]; require( signer == _verifyPrivateSale( privateSalePrice, _txLimit, _walletLimit, _deadline, msg.sender, _kind, _signature ), "INVALID_SIGNATURE" ); require(block.timestamp <= _deadline, "INVALID_DEADLINE_SIGNATURE"); require(_quantity <= _txLimit, "TX_LIMIT_EXCEEDED"); require( PrivateSaleMinter[_kind][msg.sender] + _quantity <= _walletLimit, "WALLET_LIMIT_EXCEEDED" ); require(totalSupply() + _quantity <= maxSupply, "SUPPLY_EXCEEDED"); require(<FILL_ME>) PrivateSaleMinter[_kind][msg.sender] += _quantity; _mint(msg.sender, _quantity); emit PrivateSaleMint(msg.sender, _kind); } /** * @inheritdoc IKomethAppImplementation */ function delegateMint( uint256 _quantity, uint256 _txLimit, uint256 _walletLimit, uint256 _deadline, address _recipient, uint256 _kind, bytes calldata _signature ) external payable notContract nonReentrant { } /** * @inheritdoc IKomethAppImplementation */ function publicSaleMint( uint256 _quantity ) external payable notContract nonReentrant { } function _verifyPrivateSale( uint256 _price, uint256 _txLimit, uint256 _walletLimit, uint256 _deadline, address _sender, uint256 _kind, bytes calldata _sign ) internal view returns (address) { } function setPrivateSalePrice( uint256 _kind, uint256 _price ) external onlyOwner { } function updatePublicSale( PublicSale memory _publicSale ) external onlyOwner { } function supportsInterface( bytes4 interfaceId ) public view virtual override(ERC721A, ERC2981) returns (bool) { } /** * @inheritdoc IKomethAppImplementation */ function setStage(Stage _stage) external onlyOwner { } /** * @inheritdoc IKomethAppImplementation */ function setSigner(address _signer) external onlyOwner { } /** * @inheritdoc IKomethAppImplementation */ function setBaseURI(string calldata _baseURI) external onlyOwner { } /** * @inheritdoc IKomethAppImplementation */ function setAuthorizedAddress( address _authorizedAddress, bool value ) external onlyOwner { } /** * @inheritdoc IKomethAppImplementation */ function burn(uint256 _tokenId) external onlyAuthorizedAddress { } /// @notice Set royalties for EIP 2981. /// @param _recipient the recipient of royalty /// @param _amount the amount of royalty (use bps) function setRoyalties( address _recipient, uint96 _amount ) external onlyOwner { } function setWithdrawalWallet(address _withdrawalWallet) external onlyOwner { } /** * @inheritdoc IKomethAppImplementation */ function withdrawAll() external onlyOwner { } function sendValue(address payable recipient, uint256 amount) internal { } function tokenURI( uint256 _id ) public view override returns (string memory) { } }
msg.value>=(privateSalePrice*_quantity),"INSUFFICIENT_FUND"
459,075
msg.value>=(privateSalePrice*_quantity)
"WALLET_LIMIT_EXCEEDED"
/** SPDX-License-Identifier: MIT */ import "../IKomethAppImplementation.sol"; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; pragma solidity ^0.8.13; /// @author yuru@Gaspack twitter.com/0xYuru /// @custom:coauthor Radisa twitter.com/pr0ph0z /// @dev aa0cdefd28cd450477ec80c28ecf3574 0x8fd31bb99658cb203b8c9034baf3f836c2bc2422fd30380fa30b8eade122618d3ca64095830cac2c0e84bc22910eef206eb43d54f71069f8d9e66cf8e4dcabec1c contract LifeOfHEL is IKomethAppImplementation, ERC721A, DefaultOperatorFilterer, ERC2981, EIP712, ReentrancyGuard, Ownable { using ECDSA for bytes32; bytes32 public constant PRIVATE_SALE_TYPEHASH = keccak256( "PrivateSale(uint256 price,uint256 txLimit,uint256 walletLimit,uint256 deadline,uint256 kind,address recipient)" ); uint256 public maxSupply; string public baseURI; Stage public stage; address public signer; address private withdrawalWallet = 0xE7C72cCD10bE04aD40104905CD8057766036aa45; PublicSale public publicSale; mapping(uint256 => mapping(address => uint256)) public PrivateSaleMinter; mapping(address => uint256) public PublicSaleMinter; mapping(uint256 => uint256) public privateSalePrices; mapping(address => bool) public authorizedAddresses; event PrivateSaleMint(address owner, uint256 kind); modifier notContract() { } modifier onlyAuthorizedAddress() { } constructor( string memory _name, string memory _symbol, string memory _previewURI, uint256 _maxSupply, address _signer, address _authorizedAddress, address _royaltyAddress, uint256 _privateSalePrice, PublicSale memory _publicSaleProperty ) ERC721A(_name, _symbol) EIP712("Kometh", "1.0.0") { } // Override the start token id because by defaut ERC71A set the // start token id to 0 function _startTokenId() internal view virtual override returns (uint256) { } function _isContract(address _addr) internal view returns (bool) { } function setApprovalForAll( address operator, bool approved ) public override onlyAllowedOperatorApproval(operator) { } function approve( address operator, uint256 tokenId ) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom( address from, address to, uint256 tokenId ) public payable override onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId ) public payable override onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public payable override onlyAllowedOperator(from) { } function mintTo( address[] calldata _to, uint256[] calldata _amount ) external onlyAuthorizedAddress { } /** * @inheritdoc IKomethAppImplementation */ function privateSaleMint( uint256 _quantity, uint256 _txLimit, uint256 _walletLimit, uint256 _deadline, uint256 _kind, bytes calldata _signature ) external payable notContract nonReentrant { } /** * @inheritdoc IKomethAppImplementation */ function delegateMint( uint256 _quantity, uint256 _txLimit, uint256 _walletLimit, uint256 _deadline, address _recipient, uint256 _kind, bytes calldata _signature ) external payable notContract nonReentrant { require(stage == Stage.Private || stage == Stage.Mint, "STAGE_NMATCH"); uint256 privateSalePrice = privateSalePrices[_kind]; require( signer == _verifyPrivateSale( privateSalePrice, _txLimit, _walletLimit, _deadline, _recipient, _kind, _signature ), "INVALID_SIGNATURE" ); require(block.timestamp <= _deadline, "INVALID_DEADLINE_SIGNATURE"); require(_quantity <= _txLimit, "TX_LIMIT_EXCEEDED"); require(<FILL_ME>) require(totalSupply() + _quantity <= maxSupply, "SUPPLY_EXCEEDED"); require( msg.value >= (privateSalePrice * _quantity), "INSUFFICIENT_FUND" ); PrivateSaleMinter[_kind][_recipient] += _quantity; _mint(_recipient, _quantity); emit PrivateSaleMint(_recipient, _kind); } /** * @inheritdoc IKomethAppImplementation */ function publicSaleMint( uint256 _quantity ) external payable notContract nonReentrant { } function _verifyPrivateSale( uint256 _price, uint256 _txLimit, uint256 _walletLimit, uint256 _deadline, address _sender, uint256 _kind, bytes calldata _sign ) internal view returns (address) { } function setPrivateSalePrice( uint256 _kind, uint256 _price ) external onlyOwner { } function updatePublicSale( PublicSale memory _publicSale ) external onlyOwner { } function supportsInterface( bytes4 interfaceId ) public view virtual override(ERC721A, ERC2981) returns (bool) { } /** * @inheritdoc IKomethAppImplementation */ function setStage(Stage _stage) external onlyOwner { } /** * @inheritdoc IKomethAppImplementation */ function setSigner(address _signer) external onlyOwner { } /** * @inheritdoc IKomethAppImplementation */ function setBaseURI(string calldata _baseURI) external onlyOwner { } /** * @inheritdoc IKomethAppImplementation */ function setAuthorizedAddress( address _authorizedAddress, bool value ) external onlyOwner { } /** * @inheritdoc IKomethAppImplementation */ function burn(uint256 _tokenId) external onlyAuthorizedAddress { } /// @notice Set royalties for EIP 2981. /// @param _recipient the recipient of royalty /// @param _amount the amount of royalty (use bps) function setRoyalties( address _recipient, uint96 _amount ) external onlyOwner { } function setWithdrawalWallet(address _withdrawalWallet) external onlyOwner { } /** * @inheritdoc IKomethAppImplementation */ function withdrawAll() external onlyOwner { } function sendValue(address payable recipient, uint256 amount) internal { } function tokenURI( uint256 _id ) public view override returns (string memory) { } }
PrivateSaleMinter[_kind][_recipient]+_quantity<=_walletLimit,"WALLET_LIMIT_EXCEEDED"
459,075
PrivateSaleMinter[_kind][_recipient]+_quantity<=_walletLimit
"tick existed"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.18; import "@openzeppelin/contracts/proxy/Clones.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./FERC721C.sol"; contract SmartInscriptionFactory is Ownable { address public tokenImplementation; uint256 public totalInscriptions; address public bridgeContractAddress; uint120 public operatorAllowListId; uint256 internal MIN_TICK_LENGTH = 3; uint256 internal MAX_TICK_LENGTH = 9; uint256 internal MIN_FERC_HOLD = 10e18; // 10 Ferc uint256 internal MINT_TIP = 0; uint256 internal FREEZE_TIMESTAMP = 600; uint256 internal ROYALTY = 200; // 2% mapping(string => bool) public tickExists; mapping(uint => address) public inscriptionAddresses; event Deploy( uint256 indexed inscriptionId, string tick, uint256 max, uint256 limit, bool needFerc, address inscriptionAddress ); event Mint( uint256 indexed inscriptionId, address inscriptionAddress, uint256 indexed tokenId ); constructor( address _swapContractAddress, address _wethContractAddress, address _fercContractAddress, address _tokenURIContractAddress, uint120 _operatorAllowListId ) { } function deploy(string calldata _tick, uint256 _max, uint256 _limit, bool _needFerc) public returns(address _inscriptionAddress) { uint256 len = bytes(_tick).length; require(len >= MIN_TICK_LENGTH && len <= MAX_TICK_LENGTH, "Tick lenght error"); require(<FILL_ME>) totalInscriptions++; _inscriptionAddress = Clones.clone(tokenImplementation); FERC721C(_inscriptionAddress).initialize(_tick, _max, _limit, totalInscriptions, msg.sender, uint96(ROYALTY), _needFerc, operatorAllowListId); // Default operator allow list Id is 9 tickExists[_tick] = true; inscriptionAddresses[totalInscriptions] = _inscriptionAddress; emit Deploy(totalInscriptions, _tick, _max, _limit, _needFerc, _inscriptionAddress); } function minted(uint id, uint tokenId) public { } function withdraw(uint amount, address to) public onlyOwner returns(bool) { } function minHoldAmount() public view returns(uint) { } function mintTip() public view returns(uint) { } function freezeTime() public view returns(uint) { } function setMintHoldAmount(uint val) public onlyOwner { } function setMintTip(uint val) public onlyOwner { } function setFreezeTime(uint val) public onlyOwner { } function setTickLength(uint min, uint max) public onlyOwner { } function royalty() public view returns(uint) { } function setRoyalty(uint rate) public onlyOwner { } function setBridgeContract(address addr) public onlyOwner { } function updateOperatorAllowListId(uint120 _operatorAllowListId) public onlyOwner { } }
!tickExists[_tick],"tick existed"
459,574
!tickExists[_tick]
"Caller does not have Admin Access"
// SPDX-License-Identifier: MIT pragma solidity 0.7.6; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Context.sol"; abstract contract AccessProtected is Context, Ownable { mapping(address => bool) internal _admins; // user address => admin? mapping event AdminAccessSet(address _admin, bool _enabled); /** * @notice Set Admin Access * * @param admin - Address of Admin * @param enabled - Enable/Disable Admin Access */ function setAdmin(address admin, bool enabled) external onlyOwner { } /** * @notice Check Admin Access * * @param admin - Address of Admin * @return whether user has admin access */ function isAdmin(address admin) public view returns (bool) { } /** * Throws if called by any account other than the Admin. */ modifier onlyAdmin() { require(<FILL_ME>) _; } }
_admins[_msgSender()]||_msgSender()==owner(),"Caller does not have Admin Access"
459,651
_admins[_msgSender()]||_msgSender()==owner()
"MPF:C:INVALID_GLOBALS"
// SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity 0.8.7; import { ProxyFactory } from "../modules/proxy-factory/contracts/ProxyFactory.sol"; import { IMapleGlobalsLike } from "./interfaces/Interfaces.sol"; import { IMapleProxied } from "./interfaces/IMapleProxied.sol"; import { IMapleProxyFactory } from "./interfaces/IMapleProxyFactory.sol"; /// @title A Maple factory for Proxy contracts that proxy MapleProxied implementations. contract MapleProxyFactory is IMapleProxyFactory, ProxyFactory { address public override mapleGlobals; uint256 public override defaultVersion; mapping(address => bool) public override isInstance; mapping(uint256 => mapping(uint256 => bool)) public override upgradeEnabledForPath; constructor(address mapleGlobals_) { require(<FILL_ME>) } modifier onlyGovernor() { } modifier whenProtocolNotPaused() { } /******************************************************************************************************************************/ /*** Admin Functions ***/ /******************************************************************************************************************************/ function disableUpgradePath(uint256 fromVersion_, uint256 toVersion_) public override virtual onlyGovernor { } function enableUpgradePath(uint256 fromVersion_, uint256 toVersion_, address migrator_) public override virtual onlyGovernor { } function registerImplementation(uint256 version_, address implementationAddress_, address initializer_) public override virtual onlyGovernor { } function setDefaultVersion(uint256 version_) public override virtual onlyGovernor { } function setGlobals(address mapleGlobals_) public override virtual onlyGovernor { } /******************************************************************************************************************************/ /*** Instance Functions ***/ /******************************************************************************************************************************/ function createInstance(bytes calldata arguments_, bytes32 salt_) public override virtual whenProtocolNotPaused returns (address instance_) { } // NOTE: The implementation proxied by the instance defines the access control logic for its own upgrade. function upgradeInstance(uint256 toVersion_, bytes calldata arguments_) public override virtual whenProtocolNotPaused { } /******************************************************************************************************************************/ /*** View Functions ***/ /******************************************************************************************************************************/ function getInstanceAddress(bytes calldata arguments_, bytes32 salt_) public view override virtual returns (address instanceAddress_) { } function implementationOf(uint256 version_) public view override virtual returns (address implementation_) { } function defaultImplementation() external view override returns (address defaultImplementation_) { } function migratorForPath(uint256 oldVersion_, uint256 newVersion_) public view override virtual returns (address migrator_) { } function versionOf(address implementation_) public view override virtual returns (uint256 version_) { } }
IMapleGlobalsLike(mapleGlobals=mapleGlobals_).governor()!=address(0),"MPF:C:INVALID_GLOBALS"
459,775
IMapleGlobalsLike(mapleGlobals=mapleGlobals_).governor()!=address(0)
"MPF:PROTOCOL_PAUSED"
// SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity 0.8.7; import { ProxyFactory } from "../modules/proxy-factory/contracts/ProxyFactory.sol"; import { IMapleGlobalsLike } from "./interfaces/Interfaces.sol"; import { IMapleProxied } from "./interfaces/IMapleProxied.sol"; import { IMapleProxyFactory } from "./interfaces/IMapleProxyFactory.sol"; /// @title A Maple factory for Proxy contracts that proxy MapleProxied implementations. contract MapleProxyFactory is IMapleProxyFactory, ProxyFactory { address public override mapleGlobals; uint256 public override defaultVersion; mapping(address => bool) public override isInstance; mapping(uint256 => mapping(uint256 => bool)) public override upgradeEnabledForPath; constructor(address mapleGlobals_) { } modifier onlyGovernor() { } modifier whenProtocolNotPaused() { require(<FILL_ME>) _; } /******************************************************************************************************************************/ /*** Admin Functions ***/ /******************************************************************************************************************************/ function disableUpgradePath(uint256 fromVersion_, uint256 toVersion_) public override virtual onlyGovernor { } function enableUpgradePath(uint256 fromVersion_, uint256 toVersion_, address migrator_) public override virtual onlyGovernor { } function registerImplementation(uint256 version_, address implementationAddress_, address initializer_) public override virtual onlyGovernor { } function setDefaultVersion(uint256 version_) public override virtual onlyGovernor { } function setGlobals(address mapleGlobals_) public override virtual onlyGovernor { } /******************************************************************************************************************************/ /*** Instance Functions ***/ /******************************************************************************************************************************/ function createInstance(bytes calldata arguments_, bytes32 salt_) public override virtual whenProtocolNotPaused returns (address instance_) { } // NOTE: The implementation proxied by the instance defines the access control logic for its own upgrade. function upgradeInstance(uint256 toVersion_, bytes calldata arguments_) public override virtual whenProtocolNotPaused { } /******************************************************************************************************************************/ /*** View Functions ***/ /******************************************************************************************************************************/ function getInstanceAddress(bytes calldata arguments_, bytes32 salt_) public view override virtual returns (address instanceAddress_) { } function implementationOf(uint256 version_) public view override virtual returns (address implementation_) { } function defaultImplementation() external view override returns (address defaultImplementation_) { } function migratorForPath(uint256 oldVersion_, uint256 newVersion_) public view override virtual returns (address migrator_) { } function versionOf(address implementation_) public view override virtual returns (uint256 version_) { } }
!IMapleGlobalsLike(mapleGlobals).protocolPaused(),"MPF:PROTOCOL_PAUSED"
459,775
!IMapleGlobalsLike(mapleGlobals).protocolPaused()
"MPF:DUP:FAILED"
// SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity 0.8.7; import { ProxyFactory } from "../modules/proxy-factory/contracts/ProxyFactory.sol"; import { IMapleGlobalsLike } from "./interfaces/Interfaces.sol"; import { IMapleProxied } from "./interfaces/IMapleProxied.sol"; import { IMapleProxyFactory } from "./interfaces/IMapleProxyFactory.sol"; /// @title A Maple factory for Proxy contracts that proxy MapleProxied implementations. contract MapleProxyFactory is IMapleProxyFactory, ProxyFactory { address public override mapleGlobals; uint256 public override defaultVersion; mapping(address => bool) public override isInstance; mapping(uint256 => mapping(uint256 => bool)) public override upgradeEnabledForPath; constructor(address mapleGlobals_) { } modifier onlyGovernor() { } modifier whenProtocolNotPaused() { } /******************************************************************************************************************************/ /*** Admin Functions ***/ /******************************************************************************************************************************/ function disableUpgradePath(uint256 fromVersion_, uint256 toVersion_) public override virtual onlyGovernor { require(fromVersion_ != toVersion_, "MPF:DUP:OVERWRITING_INITIALIZER"); require(<FILL_ME>) emit UpgradePathDisabled(fromVersion_, toVersion_); upgradeEnabledForPath[fromVersion_][toVersion_] = false; } function enableUpgradePath(uint256 fromVersion_, uint256 toVersion_, address migrator_) public override virtual onlyGovernor { } function registerImplementation(uint256 version_, address implementationAddress_, address initializer_) public override virtual onlyGovernor { } function setDefaultVersion(uint256 version_) public override virtual onlyGovernor { } function setGlobals(address mapleGlobals_) public override virtual onlyGovernor { } /******************************************************************************************************************************/ /*** Instance Functions ***/ /******************************************************************************************************************************/ function createInstance(bytes calldata arguments_, bytes32 salt_) public override virtual whenProtocolNotPaused returns (address instance_) { } // NOTE: The implementation proxied by the instance defines the access control logic for its own upgrade. function upgradeInstance(uint256 toVersion_, bytes calldata arguments_) public override virtual whenProtocolNotPaused { } /******************************************************************************************************************************/ /*** View Functions ***/ /******************************************************************************************************************************/ function getInstanceAddress(bytes calldata arguments_, bytes32 salt_) public view override virtual returns (address instanceAddress_) { } function implementationOf(uint256 version_) public view override virtual returns (address implementation_) { } function defaultImplementation() external view override returns (address defaultImplementation_) { } function migratorForPath(uint256 oldVersion_, uint256 newVersion_) public view override virtual returns (address migrator_) { } function versionOf(address implementation_) public view override virtual returns (uint256 version_) { } }
_registerMigrator(fromVersion_,toVersion_,address(0)),"MPF:DUP:FAILED"
459,775
_registerMigrator(fromVersion_,toVersion_,address(0))
"MPF:EUP:FAILED"
// SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity 0.8.7; import { ProxyFactory } from "../modules/proxy-factory/contracts/ProxyFactory.sol"; import { IMapleGlobalsLike } from "./interfaces/Interfaces.sol"; import { IMapleProxied } from "./interfaces/IMapleProxied.sol"; import { IMapleProxyFactory } from "./interfaces/IMapleProxyFactory.sol"; /// @title A Maple factory for Proxy contracts that proxy MapleProxied implementations. contract MapleProxyFactory is IMapleProxyFactory, ProxyFactory { address public override mapleGlobals; uint256 public override defaultVersion; mapping(address => bool) public override isInstance; mapping(uint256 => mapping(uint256 => bool)) public override upgradeEnabledForPath; constructor(address mapleGlobals_) { } modifier onlyGovernor() { } modifier whenProtocolNotPaused() { } /******************************************************************************************************************************/ /*** Admin Functions ***/ /******************************************************************************************************************************/ function disableUpgradePath(uint256 fromVersion_, uint256 toVersion_) public override virtual onlyGovernor { } function enableUpgradePath(uint256 fromVersion_, uint256 toVersion_, address migrator_) public override virtual onlyGovernor { require(fromVersion_ != toVersion_, "MPF:EUP:OVERWRITING_INITIALIZER"); require(<FILL_ME>) emit UpgradePathEnabled(fromVersion_, toVersion_, migrator_); upgradeEnabledForPath[fromVersion_][toVersion_] = true; } function registerImplementation(uint256 version_, address implementationAddress_, address initializer_) public override virtual onlyGovernor { } function setDefaultVersion(uint256 version_) public override virtual onlyGovernor { } function setGlobals(address mapleGlobals_) public override virtual onlyGovernor { } /******************************************************************************************************************************/ /*** Instance Functions ***/ /******************************************************************************************************************************/ function createInstance(bytes calldata arguments_, bytes32 salt_) public override virtual whenProtocolNotPaused returns (address instance_) { } // NOTE: The implementation proxied by the instance defines the access control logic for its own upgrade. function upgradeInstance(uint256 toVersion_, bytes calldata arguments_) public override virtual whenProtocolNotPaused { } /******************************************************************************************************************************/ /*** View Functions ***/ /******************************************************************************************************************************/ function getInstanceAddress(bytes calldata arguments_, bytes32 salt_) public view override virtual returns (address instanceAddress_) { } function implementationOf(uint256 version_) public view override virtual returns (address implementation_) { } function defaultImplementation() external view override returns (address defaultImplementation_) { } function migratorForPath(uint256 oldVersion_, uint256 newVersion_) public view override virtual returns (address migrator_) { } function versionOf(address implementation_) public view override virtual returns (uint256 version_) { } }
_registerMigrator(fromVersion_,toVersion_,migrator_),"MPF:EUP:FAILED"
459,775
_registerMigrator(fromVersion_,toVersion_,migrator_)
"MPF:RI:FAIL_FOR_IMPLEMENTATION"
// SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity 0.8.7; import { ProxyFactory } from "../modules/proxy-factory/contracts/ProxyFactory.sol"; import { IMapleGlobalsLike } from "./interfaces/Interfaces.sol"; import { IMapleProxied } from "./interfaces/IMapleProxied.sol"; import { IMapleProxyFactory } from "./interfaces/IMapleProxyFactory.sol"; /// @title A Maple factory for Proxy contracts that proxy MapleProxied implementations. contract MapleProxyFactory is IMapleProxyFactory, ProxyFactory { address public override mapleGlobals; uint256 public override defaultVersion; mapping(address => bool) public override isInstance; mapping(uint256 => mapping(uint256 => bool)) public override upgradeEnabledForPath; constructor(address mapleGlobals_) { } modifier onlyGovernor() { } modifier whenProtocolNotPaused() { } /******************************************************************************************************************************/ /*** Admin Functions ***/ /******************************************************************************************************************************/ function disableUpgradePath(uint256 fromVersion_, uint256 toVersion_) public override virtual onlyGovernor { } function enableUpgradePath(uint256 fromVersion_, uint256 toVersion_, address migrator_) public override virtual onlyGovernor { } function registerImplementation(uint256 version_, address implementationAddress_, address initializer_) public override virtual onlyGovernor { // Version 0 reserved as "no version" since default `defaultVersion` is 0. require(version_ != uint256(0), "MPF:RI:INVALID_VERSION"); emit ImplementationRegistered(version_, implementationAddress_, initializer_); require(<FILL_ME>) // Set migrator for initialization, which understood as fromVersion == toVersion. require(_registerMigrator(version_, version_, initializer_), "MPF:RI:FAIL_FOR_MIGRATOR"); } function setDefaultVersion(uint256 version_) public override virtual onlyGovernor { } function setGlobals(address mapleGlobals_) public override virtual onlyGovernor { } /******************************************************************************************************************************/ /*** Instance Functions ***/ /******************************************************************************************************************************/ function createInstance(bytes calldata arguments_, bytes32 salt_) public override virtual whenProtocolNotPaused returns (address instance_) { } // NOTE: The implementation proxied by the instance defines the access control logic for its own upgrade. function upgradeInstance(uint256 toVersion_, bytes calldata arguments_) public override virtual whenProtocolNotPaused { } /******************************************************************************************************************************/ /*** View Functions ***/ /******************************************************************************************************************************/ function getInstanceAddress(bytes calldata arguments_, bytes32 salt_) public view override virtual returns (address instanceAddress_) { } function implementationOf(uint256 version_) public view override virtual returns (address implementation_) { } function defaultImplementation() external view override returns (address defaultImplementation_) { } function migratorForPath(uint256 oldVersion_, uint256 newVersion_) public view override virtual returns (address migrator_) { } function versionOf(address implementation_) public view override virtual returns (uint256 version_) { } }
_registerImplementation(version_,implementationAddress_),"MPF:RI:FAIL_FOR_IMPLEMENTATION"
459,775
_registerImplementation(version_,implementationAddress_)
"MPF:RI:FAIL_FOR_MIGRATOR"
// SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity 0.8.7; import { ProxyFactory } from "../modules/proxy-factory/contracts/ProxyFactory.sol"; import { IMapleGlobalsLike } from "./interfaces/Interfaces.sol"; import { IMapleProxied } from "./interfaces/IMapleProxied.sol"; import { IMapleProxyFactory } from "./interfaces/IMapleProxyFactory.sol"; /// @title A Maple factory for Proxy contracts that proxy MapleProxied implementations. contract MapleProxyFactory is IMapleProxyFactory, ProxyFactory { address public override mapleGlobals; uint256 public override defaultVersion; mapping(address => bool) public override isInstance; mapping(uint256 => mapping(uint256 => bool)) public override upgradeEnabledForPath; constructor(address mapleGlobals_) { } modifier onlyGovernor() { } modifier whenProtocolNotPaused() { } /******************************************************************************************************************************/ /*** Admin Functions ***/ /******************************************************************************************************************************/ function disableUpgradePath(uint256 fromVersion_, uint256 toVersion_) public override virtual onlyGovernor { } function enableUpgradePath(uint256 fromVersion_, uint256 toVersion_, address migrator_) public override virtual onlyGovernor { } function registerImplementation(uint256 version_, address implementationAddress_, address initializer_) public override virtual onlyGovernor { // Version 0 reserved as "no version" since default `defaultVersion` is 0. require(version_ != uint256(0), "MPF:RI:INVALID_VERSION"); emit ImplementationRegistered(version_, implementationAddress_, initializer_); require(_registerImplementation(version_, implementationAddress_), "MPF:RI:FAIL_FOR_IMPLEMENTATION"); // Set migrator for initialization, which understood as fromVersion == toVersion. require(<FILL_ME>) } function setDefaultVersion(uint256 version_) public override virtual onlyGovernor { } function setGlobals(address mapleGlobals_) public override virtual onlyGovernor { } /******************************************************************************************************************************/ /*** Instance Functions ***/ /******************************************************************************************************************************/ function createInstance(bytes calldata arguments_, bytes32 salt_) public override virtual whenProtocolNotPaused returns (address instance_) { } // NOTE: The implementation proxied by the instance defines the access control logic for its own upgrade. function upgradeInstance(uint256 toVersion_, bytes calldata arguments_) public override virtual whenProtocolNotPaused { } /******************************************************************************************************************************/ /*** View Functions ***/ /******************************************************************************************************************************/ function getInstanceAddress(bytes calldata arguments_, bytes32 salt_) public view override virtual returns (address instanceAddress_) { } function implementationOf(uint256 version_) public view override virtual returns (address implementation_) { } function defaultImplementation() external view override returns (address defaultImplementation_) { } function migratorForPath(uint256 oldVersion_, uint256 newVersion_) public view override virtual returns (address migrator_) { } function versionOf(address implementation_) public view override virtual returns (uint256 version_) { } }
_registerMigrator(version_,version_,initializer_),"MPF:RI:FAIL_FOR_MIGRATOR"
459,775
_registerMigrator(version_,version_,initializer_)
"MPF:SG:INVALID_GLOBALS"
// SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity 0.8.7; import { ProxyFactory } from "../modules/proxy-factory/contracts/ProxyFactory.sol"; import { IMapleGlobalsLike } from "./interfaces/Interfaces.sol"; import { IMapleProxied } from "./interfaces/IMapleProxied.sol"; import { IMapleProxyFactory } from "./interfaces/IMapleProxyFactory.sol"; /// @title A Maple factory for Proxy contracts that proxy MapleProxied implementations. contract MapleProxyFactory is IMapleProxyFactory, ProxyFactory { address public override mapleGlobals; uint256 public override defaultVersion; mapping(address => bool) public override isInstance; mapping(uint256 => mapping(uint256 => bool)) public override upgradeEnabledForPath; constructor(address mapleGlobals_) { } modifier onlyGovernor() { } modifier whenProtocolNotPaused() { } /******************************************************************************************************************************/ /*** Admin Functions ***/ /******************************************************************************************************************************/ function disableUpgradePath(uint256 fromVersion_, uint256 toVersion_) public override virtual onlyGovernor { } function enableUpgradePath(uint256 fromVersion_, uint256 toVersion_, address migrator_) public override virtual onlyGovernor { } function registerImplementation(uint256 version_, address implementationAddress_, address initializer_) public override virtual onlyGovernor { } function setDefaultVersion(uint256 version_) public override virtual onlyGovernor { } function setGlobals(address mapleGlobals_) public override virtual onlyGovernor { require(<FILL_ME>) emit MapleGlobalsSet(mapleGlobals = mapleGlobals_); } /******************************************************************************************************************************/ /*** Instance Functions ***/ /******************************************************************************************************************************/ function createInstance(bytes calldata arguments_, bytes32 salt_) public override virtual whenProtocolNotPaused returns (address instance_) { } // NOTE: The implementation proxied by the instance defines the access control logic for its own upgrade. function upgradeInstance(uint256 toVersion_, bytes calldata arguments_) public override virtual whenProtocolNotPaused { } /******************************************************************************************************************************/ /*** View Functions ***/ /******************************************************************************************************************************/ function getInstanceAddress(bytes calldata arguments_, bytes32 salt_) public view override virtual returns (address instanceAddress_) { } function implementationOf(uint256 version_) public view override virtual returns (address implementation_) { } function defaultImplementation() external view override returns (address defaultImplementation_) { } function migratorForPath(uint256 oldVersion_, uint256 newVersion_) public view override virtual returns (address migrator_) { } function versionOf(address implementation_) public view override virtual returns (uint256 version_) { } }
IMapleGlobalsLike(mapleGlobals_).governor()!=address(0),"MPF:SG:INVALID_GLOBALS"
459,775
IMapleGlobalsLike(mapleGlobals_).governor()!=address(0)
"MPF:UI:NOT_ALLOWED"
// SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity 0.8.7; import { ProxyFactory } from "../modules/proxy-factory/contracts/ProxyFactory.sol"; import { IMapleGlobalsLike } from "./interfaces/Interfaces.sol"; import { IMapleProxied } from "./interfaces/IMapleProxied.sol"; import { IMapleProxyFactory } from "./interfaces/IMapleProxyFactory.sol"; /// @title A Maple factory for Proxy contracts that proxy MapleProxied implementations. contract MapleProxyFactory is IMapleProxyFactory, ProxyFactory { address public override mapleGlobals; uint256 public override defaultVersion; mapping(address => bool) public override isInstance; mapping(uint256 => mapping(uint256 => bool)) public override upgradeEnabledForPath; constructor(address mapleGlobals_) { } modifier onlyGovernor() { } modifier whenProtocolNotPaused() { } /******************************************************************************************************************************/ /*** Admin Functions ***/ /******************************************************************************************************************************/ function disableUpgradePath(uint256 fromVersion_, uint256 toVersion_) public override virtual onlyGovernor { } function enableUpgradePath(uint256 fromVersion_, uint256 toVersion_, address migrator_) public override virtual onlyGovernor { } function registerImplementation(uint256 version_, address implementationAddress_, address initializer_) public override virtual onlyGovernor { } function setDefaultVersion(uint256 version_) public override virtual onlyGovernor { } function setGlobals(address mapleGlobals_) public override virtual onlyGovernor { } /******************************************************************************************************************************/ /*** Instance Functions ***/ /******************************************************************************************************************************/ function createInstance(bytes calldata arguments_, bytes32 salt_) public override virtual whenProtocolNotPaused returns (address instance_) { } // NOTE: The implementation proxied by the instance defines the access control logic for its own upgrade. function upgradeInstance(uint256 toVersion_, bytes calldata arguments_) public override virtual whenProtocolNotPaused { uint256 fromVersion = _versionOf[IMapleProxied(msg.sender).implementation()]; require(<FILL_ME>) emit InstanceUpgraded(msg.sender, fromVersion, toVersion_, arguments_); require(_upgradeInstance(msg.sender, toVersion_, arguments_), "MPF:UI:FAILED"); } /******************************************************************************************************************************/ /*** View Functions ***/ /******************************************************************************************************************************/ function getInstanceAddress(bytes calldata arguments_, bytes32 salt_) public view override virtual returns (address instanceAddress_) { } function implementationOf(uint256 version_) public view override virtual returns (address implementation_) { } function defaultImplementation() external view override returns (address defaultImplementation_) { } function migratorForPath(uint256 oldVersion_, uint256 newVersion_) public view override virtual returns (address migrator_) { } function versionOf(address implementation_) public view override virtual returns (uint256 version_) { } }
upgradeEnabledForPath[fromVersion][toVersion_],"MPF:UI:NOT_ALLOWED"
459,775
upgradeEnabledForPath[fromVersion][toVersion_]
"MPF:UI:FAILED"
// SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity 0.8.7; import { ProxyFactory } from "../modules/proxy-factory/contracts/ProxyFactory.sol"; import { IMapleGlobalsLike } from "./interfaces/Interfaces.sol"; import { IMapleProxied } from "./interfaces/IMapleProxied.sol"; import { IMapleProxyFactory } from "./interfaces/IMapleProxyFactory.sol"; /// @title A Maple factory for Proxy contracts that proxy MapleProxied implementations. contract MapleProxyFactory is IMapleProxyFactory, ProxyFactory { address public override mapleGlobals; uint256 public override defaultVersion; mapping(address => bool) public override isInstance; mapping(uint256 => mapping(uint256 => bool)) public override upgradeEnabledForPath; constructor(address mapleGlobals_) { } modifier onlyGovernor() { } modifier whenProtocolNotPaused() { } /******************************************************************************************************************************/ /*** Admin Functions ***/ /******************************************************************************************************************************/ function disableUpgradePath(uint256 fromVersion_, uint256 toVersion_) public override virtual onlyGovernor { } function enableUpgradePath(uint256 fromVersion_, uint256 toVersion_, address migrator_) public override virtual onlyGovernor { } function registerImplementation(uint256 version_, address implementationAddress_, address initializer_) public override virtual onlyGovernor { } function setDefaultVersion(uint256 version_) public override virtual onlyGovernor { } function setGlobals(address mapleGlobals_) public override virtual onlyGovernor { } /******************************************************************************************************************************/ /*** Instance Functions ***/ /******************************************************************************************************************************/ function createInstance(bytes calldata arguments_, bytes32 salt_) public override virtual whenProtocolNotPaused returns (address instance_) { } // NOTE: The implementation proxied by the instance defines the access control logic for its own upgrade. function upgradeInstance(uint256 toVersion_, bytes calldata arguments_) public override virtual whenProtocolNotPaused { uint256 fromVersion = _versionOf[IMapleProxied(msg.sender).implementation()]; require(upgradeEnabledForPath[fromVersion][toVersion_], "MPF:UI:NOT_ALLOWED"); emit InstanceUpgraded(msg.sender, fromVersion, toVersion_, arguments_); require(<FILL_ME>) } /******************************************************************************************************************************/ /*** View Functions ***/ /******************************************************************************************************************************/ function getInstanceAddress(bytes calldata arguments_, bytes32 salt_) public view override virtual returns (address instanceAddress_) { } function implementationOf(uint256 version_) public view override virtual returns (address implementation_) { } function defaultImplementation() external view override returns (address defaultImplementation_) { } function migratorForPath(uint256 oldVersion_, uint256 newVersion_) public view override virtual returns (address migrator_) { } function versionOf(address implementation_) public view override virtual returns (uint256 version_) { } }
_upgradeInstance(msg.sender,toVersion_,arguments_),"MPF:UI:FAILED"
459,775
_upgradeInstance(msg.sender,toVersion_,arguments_)