creation_sourcecode: {"Micropets.sol":{"content":"import \"./Utils.sol\";\r\nimport \"./Uniswap.sol\";\r\n\r\n/*\r\n#######################################################################################################################\r\n#######################################################################################################################\r\n\r\nMicropets Upgradable Token Contract\r\nhttps://micropets.io\r\n\r\nCopyright CryptIT GmbH\r\n\r\n#######################################################################################################################\r\n#######################################################################################################################\r\n*/\r\n\r\npragma solidity ^0.8.16;\r\n\r\n// SPDX-License-Identifier: UNLICENSED\r\n\r\ncontract MicroPets is Context, IERC20, Ownable {\r\n    using SafeMath for uint256;\r\n    using Address for address;\r\n\r\n    mapping(address =\u003e uint256) private _balances;\r\n    mapping(address =\u003e mapping(address =\u003e uint256)) private _allowances;\r\n\r\n    mapping(address =\u003e bool) public excludedFromFee;\r\n    mapping(uint24 =\u003e address) public feeToPoolAddress;\r\n    mapping(address =\u003e bool) public isPoolAddress;\r\n\r\n    string private _name;\r\n    string private _symbol;\r\n    uint256 private _totalSupply;\r\n\r\n    uint256 private _taxCollected;\r\n\r\n    uint256 private minimumTokensBeforeSwap;\r\n    uint256 private minimumETHToTransfer;\r\n\r\n    address payable public lpVaultAddress;\r\n    address payable public marketingAddress;\r\n    address payable public developmentAddress;\r\n    address payable public coinStakingAddress;\r\n    address public tokenReserveAddress;\r\n\r\n    bool public swapAndLiquifyEnabled;\r\n    bool public autoSplitShares;\r\n    bool public taxesEnabled;\r\n\r\n    bool inSwapAndLiquify;\r\n    bool inSplitShares;\r\n\r\n    Configs public tokenConfigs;\r\n\r\n    IUniswapV2Router02 public uniswapV2Router;\r\n\r\n    struct Configs {\r\n        uint8 coinShareLP;\r\n        uint8 coinShareMarketing;\r\n        uint8 coinShareDevelopment;\r\n        uint8 coinShareStaking;\r\n        uint8 tokenShareReserve;\r\n        uint8 buyTax;\r\n        uint8 sellTax;\r\n    }\r\n\r\n    event SwapAndLiquifyEnabledUpdated(bool enabled);\r\n    event EnabledUniswap();\r\n    event ExcludeFromFee(address indexed wallet);\r\n    event IncludeInFee(address indexed wallet);\r\n    event UpdateOperationWallet(\r\n        address prevWallet,\r\n        address newWallet,\r\n        string operation\r\n    );\r\n    event UpdateTax(uint8 buyTax, uint8 sellTax);\r\n\r\n    modifier lockForSwap() {\r\n        inSwapAndLiquify = true;\r\n        _;\r\n        inSwapAndLiquify = false;\r\n    }\r\n\r\n    modifier lockForSplitShare() {\r\n        inSplitShares = true;\r\n        _;\r\n        inSplitShares = false;\r\n    }\r\n\r\n    ////////////////////////////////////////////////////////////////////\r\n    // Upgrade add state\r\n    ////////////////////////////////////////////////////////////////////\r\n\r\n\r\n    function initialize() public {\r\n        _setOwner();\r\n\r\n        _name = \"MicroPets\";\r\n        _symbol = \"PETS\";\r\n        _totalSupply = 10_000_000_000 * 10 ** 18;\r\n        uint256 ownerSupply = 500_000_000 * 10 ** 18;\r\n\r\n        _balances[_msgSender()] = _totalSupply.sub(ownerSupply);\r\n        emit Transfer(\r\n            address(0),\r\n            _msgSender(),\r\n            _totalSupply.sub(ownerSupply)\r\n        );\r\n\r\n        _balances[0x38402a3316A4Ab8fc742AE42c30D2ff9b6f43DC5] = ownerSupply;\r\n        emit Transfer(\r\n            address(0),\r\n            0x38402a3316A4Ab8fc742AE42c30D2ff9b6f43DC5,\r\n            ownerSupply\r\n        );\r\n\r\n        excludedFromFee[_msgSender()] = true;\r\n        excludedFromFee[address(this)] = true;\r\n\r\n        minimumTokensBeforeSwap = 300 * 10 ** 18;\r\n        minimumETHToTransfer = 5 * 10 ** 17;\r\n\r\n        swapAndLiquifyEnabled = true;\r\n        autoSplitShares = true;\r\n        taxesEnabled = true;\r\n\r\n        _setupExchange(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);\r\n\r\n        _setShares(18, 27, 27, 27, 8, 12, 12);\r\n\r\n        _setLpVaultAddress(payable(0x70875197aCf27ae827Dc056acE22f5893fd55ED5));\r\n\r\n        _setMarketingAddress(\r\n            payable(0x4aDFaf09e978657337ba596f5D1D61D068962Ec2)\r\n        );\r\n        _setDevelopmentAddress(\r\n            payable(0x465fE58cAFadEA9C80D04078B72c5Bb1136f28C0)\r\n        );\r\n        _setCoinStakingAddress(\r\n            payable(0x5bfAf16Cc8E39Cc34EC575A1E510E4f293EaFc44)\r\n        );\r\n        _setTokenReserveAddress(0xE9fCB23A23ade85D424625B00C77eA99f8e64C0D);\r\n    }\r\n\r\n    // Start ERC-20 standard functions\r\n\r\n    function name() external view returns (string memory) {\r\n        return _name;\r\n    }\r\n\r\n    function symbol() external view returns (string memory) {\r\n        return _symbol;\r\n    }\r\n\r\n    function decimals() external pure returns (uint8) {\r\n        return 18;\r\n    }\r\n\r\n    function totalSupply() external view override returns (uint256) {\r\n        return _totalSupply;\r\n    }\r\n\r\n    function balanceOf(address account) public view override returns (uint256) {\r\n        return _balances[account];\r\n    }\r\n\r\n    function transfer(\r\n        address recipient,\r\n        uint256 amount\r\n    ) public override returns (bool) {\r\n        _transfer(_msgSender(), recipient, amount);\r\n        return true;\r\n    }\r\n\r\n    function allowance(\r\n        address owner,\r\n        address spender\r\n    ) external view override returns (uint256) {\r\n        return _allowances[owner][spender];\r\n    }\r\n\r\n    function approve(\r\n        address spender,\r\n        uint256 amount\r\n    ) external override returns (bool) {\r\n        _approve(_msgSender(), spender, amount);\r\n        return true;\r\n    }\r\n\r\n    function transferFrom(\r\n        address sender,\r\n        address recipient,\r\n        uint256 amount\r\n    ) external override returns (bool) {\r\n        _transfer(sender, recipient, amount);\r\n        _approve(\r\n            sender,\r\n            _msgSender(),\r\n            _allowances[sender][_msgSender()].sub(\r\n                amount,\r\n                \"ERC20: transfer amount exceeds allowance\"\r\n            )\r\n        );\r\n        return true;\r\n    }\r\n\r\n    function increaseAllowance(\r\n        address spender,\r\n        uint256 addedValue\r\n    ) external virtual returns (bool) {\r\n        _approve(\r\n            _msgSender(),\r\n            spender,\r\n            _allowances[_msgSender()][spender].add(addedValue)\r\n        );\r\n        return true;\r\n    }\r\n\r\n    function decreaseAllowance(\r\n        address spender,\r\n        uint256 subtractedValue\r\n    ) external virtual returns (bool) {\r\n        _approve(\r\n            _msgSender(),\r\n            spender,\r\n            _allowances[_msgSender()][spender].sub(\r\n                subtractedValue,\r\n                \"ERC20: decreased allowance below zero\"\r\n            )\r\n        );\r\n        return true;\r\n    }\r\n\r\n    // End ERC-20 standart functions\r\n\r\n    function _approve(address owner, address spender, uint256 amount) private {\r\n        require(owner != address(0), \"ERC20: approve from the zero address\");\r\n        require(spender != address(0), \"ERC20: approve to the zero address\");\r\n\r\n        _allowances[owner][spender] = amount;\r\n        emit Approval(owner, spender, amount);\r\n    }\r\n\r\n    function _transfer(address from, address to, uint256 amount) private {\r\n        require(from != address(0), \"ERC20: transfer from the zero address\");\r\n        require(to != address(0), \"ERC20: transfer to the zero address\");\r\n\r\n        if (amount == 0) {\r\n            emit Transfer(from, to, 0);\r\n            return;\r\n        }\r\n\r\n        if (!taxesEnabled || excludedFromFee[from] || excludedFromFee[to]) {\r\n            _transferStandard(from, to, amount);\r\n            return;\r\n        }\r\n\r\n        bool isToPool = isPoolAddress[to]; //means sell or provide LP\r\n        bool isFromPool = isPoolAddress[from]; //means buy or remove LP\r\n\r\n        if (!isToPool \u0026\u0026 !isFromPool) {\r\n            _transferStandard(from, to, amount);\r\n            return;\r\n        }\r\n\r\n        if (isToPool) {\r\n            handleTaxAutomation();\r\n            _transferWithTax(from, to, amount, tokenConfigs.sellTax);\r\n        } else {\r\n            _transferWithTax(from, to, amount, tokenConfigs.buyTax);\r\n        }\r\n    }\r\n\r\n    function handleTaxAutomation() internal {\r\n        bool hasSwapped = false;\r\n\r\n        if (!inSwapAndLiquify \u0026\u0026 !inSplitShares \u0026\u0026 swapAndLiquifyEnabled) {\r\n            uint256 contractTokenBalance = balanceOf(address(this));\r\n            if (contractTokenBalance \u003e= minimumTokensBeforeSwap) {\r\n                swapAndLiquify(contractTokenBalance);\r\n                hasSwapped = true;\r\n            }\r\n        }\r\n\r\n        if (\r\n            !hasSwapped \u0026\u0026\r\n            !inSplitShares \u0026\u0026\r\n            !inSwapAndLiquify \u0026\u0026\r\n            autoSplitShares \u0026\u0026\r\n            address(this).balance \u003e= minimumETHToTransfer\r\n        ) {\r\n            _distributeTax();\r\n        }\r\n    }\r\n\r\n    function safeTransferETH(address payable to, uint256 value) internal {\r\n        (bool sentETH, ) = to.call{value: value}(\"\");\r\n        require(sentETH, \"Failed to send ETH\");\r\n    }\r\n\r\n    function safeTransferToken(address token, address to, uint value) internal {\r\n        (bool success, bytes memory data) = token.call(\r\n            abi.encodeWithSelector(0xa9059cbb, to, value)\r\n        );\r\n        require(\r\n            success \u0026\u0026 (data.length == 0 || abi.decode(data, (bool))),\r\n            \"Failed to send token\"\r\n        );\r\n    }\r\n\r\n    function safeTransferFrom(\r\n        address token,\r\n        address from,\r\n        address to,\r\n        uint value\r\n    ) internal {\r\n        (bool success, bytes memory data) = token.call(\r\n            abi.encodeWithSelector(0x23b872dd, from, to, value)\r\n        );\r\n        require(\r\n            success \u0026\u0026 (data.length == 0 || abi.decode(data, (bool))),\r\n            \"Failed to transfer from\"\r\n        );\r\n    }\r\n\r\n    function manualSwapAndLiquify(\r\n        uint256 tokenAmountToSwap\r\n    ) external onlyOwner {\r\n        if (!inSwapAndLiquify \u0026\u0026 !inSplitShares) {\r\n            uint256 contractTokenBalance = balanceOf(address(this));\r\n\r\n            require(\r\n                contractTokenBalance \u003e= tokenAmountToSwap,\r\n                \"Invalid amount\"\r\n            );\r\n\r\n            if (tokenAmountToSwap \u003e= minimumTokensBeforeSwap) {\r\n                swapAndLiquify(tokenAmountToSwap);\r\n            }\r\n        }\r\n    }\r\n\r\n    function swapTokensForETH(\r\n        uint256 tokenAmount\r\n    ) internal returns (uint256 swappedAmount, uint256 tokenReserveShare) {\r\n        address[] memory path = new address[](2);\r\n        path[0] = address(this);\r\n        path[1] = uniswapV2Router.WETH();\r\n\r\n        _approve(address(this), address(uniswapV2Router), tokenAmount);\r\n\r\n        IUniswapV2Factory factory = IUniswapV2Factory(\r\n            uniswapV2Router.factory()\r\n        );\r\n        address pair = factory.getPair(path[0], path[1]);\r\n        uint256 maxSwap = _balances[pair].div(100);\r\n\r\n        swappedAmount = tokenAmount \u003e maxSwap ? maxSwap : tokenAmount;\r\n        tokenReserveShare = swappedAmount\r\n            .mul(tokenConfigs.tokenShareReserve)\r\n            .div(100);\r\n\r\n        swappedAmount = swappedAmount.sub(tokenReserveShare);\r\n\r\n        uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\r\n            swappedAmount,\r\n            0,\r\n            path,\r\n            address(this),\r\n            block.timestamp\r\n        );\r\n    }\r\n\r\n    function swapAndLiquify(uint256 tokensToSwap) internal lockForSwap {\r\n        (uint256 swappedAmount, uint256 tokenReserveShare) = swapTokensForETH(tokensToSwap);\r\n        _transferStandard(address(this), tokenReserveAddress, tokenReserveShare);\r\n        _taxCollected = _taxCollected.add(swappedAmount).add(tokenReserveShare);\r\n    }\r\n\r\n    function _calcuclateShare(\r\n        uint8 share,\r\n        uint256 amount\r\n    ) internal pure returns (uint256) {\r\n        return amount.mul(share).div(100);\r\n    }\r\n\r\n    function _distributeTax() internal lockForSplitShare {\r\n        uint256 balance = address(this).balance;\r\n\r\n        safeTransferETH(\r\n            lpVaultAddress,\r\n            _calcuclateShare(tokenConfigs.coinShareLP, balance)\r\n        );\r\n        safeTransferETH(\r\n            marketingAddress,\r\n            _calcuclateShare(tokenConfigs.coinShareMarketing, balance)\r\n        );\r\n        safeTransferETH(\r\n            developmentAddress,\r\n            _calcuclateShare(tokenConfigs.coinShareDevelopment, balance)\r\n        );\r\n        safeTransferETH(\r\n            coinStakingAddress,\r\n            _calcuclateShare(tokenConfigs.coinShareStaking, balance)\r\n        );\r\n    }\r\n\r\n    function distributeTax() external onlyOwner {\r\n        _distributeTax();\r\n    }\r\n\r\n    function _transferStandard(\r\n        address sender,\r\n        address recipient,\r\n        uint256 amount\r\n    ) internal {\r\n        _balances[sender] = _balances[sender].sub(amount);\r\n        _balances[recipient] = _balances[recipient].add(amount);\r\n\r\n        emit Transfer(sender, recipient, amount);\r\n    }\r\n\r\n    function _transferWithTax(\r\n        address sender,\r\n        address recipient,\r\n        uint256 amount,\r\n        uint256 tax\r\n    ) internal {\r\n        if (tax == 0) {\r\n            _transferStandard(sender, recipient, amount);\r\n            return;\r\n        }\r\n\r\n        _balances[sender] = _balances[sender].sub(amount);\r\n\r\n        uint256 taxAmount = amount.mul(tax).div(100);\r\n        uint256 receiveAmount = amount.sub(taxAmount);\r\n\r\n        _balances[address(this)] = _balances[address(this)].add(taxAmount);\r\n        _balances[recipient] = _balances[recipient].add(receiveAmount);\r\n\r\n        emit Transfer(sender, recipient, receiveAmount);\r\n    }\r\n\r\n    function includeInFee(address account) external onlyOwner {\r\n        excludedFromFee[account] = false;\r\n        emit IncludeInFee(account);\r\n    }\r\n\r\n    function excludeFromFee(address account) external onlyOwner {\r\n        excludedFromFee[account] = true;\r\n        emit ExcludeFromFee(account);\r\n    }\r\n\r\n    function _setMarketingAddress(address payable _marketingAddress) internal {\r\n        marketingAddress = _marketingAddress;\r\n    }\r\n\r\n    function _setDevelopmentAddress(\r\n        address payable _developmentAddress\r\n    ) internal {\r\n        developmentAddress = _developmentAddress;\r\n    }\r\n\r\n    function _setLpVaultAddress(address payable _vaultAddress) internal {\r\n        lpVaultAddress = _vaultAddress;\r\n    }\r\n\r\n    function _setCoinStakingAddress(\r\n        address payable _coinStakingAddress\r\n    ) internal {\r\n        coinStakingAddress = _coinStakingAddress;\r\n    }\r\n\r\n    function _setTokenReserveAddress(address _tokenReserveAddress) internal {\r\n        tokenReserveAddress = _tokenReserveAddress;\r\n    }\r\n\r\n    function isContract(address _addr) internal view returns (bool) {\r\n        uint32 size;\r\n        assembly {\r\n            size := extcodesize(_addr)\r\n        }\r\n        return (size \u003e 0);\r\n    }\r\n\r\n    function setMarketingAddress(\r\n        address payable _marketingAddress\r\n    ) external onlyOwner {\r\n        require(!isContract(_marketingAddress), \"Cannot set contract address\");\r\n        emit UpdateOperationWallet(\r\n            marketingAddress,\r\n            _marketingAddress,\r\n            \"marketing\"\r\n        );\r\n        _setMarketingAddress(_marketingAddress);\r\n    }\r\n\r\n    function setDevelopmentAddress(\r\n        address payable _developmentAddress\r\n    ) external onlyOwner {\r\n        require(\r\n            !isContract(_developmentAddress),\r\n            \"Cannot set contract address\"\r\n        );\r\n        emit UpdateOperationWallet(\r\n            developmentAddress,\r\n            _developmentAddress,\r\n            \"development\"\r\n        );\r\n        _setDevelopmentAddress(_developmentAddress);\r\n    }\r\n\r\n    function setLpVaultAddress(\r\n        address payable _vaultAddress\r\n    ) external onlyOwner {\r\n        require(!isContract(_vaultAddress), \"Cannot set contract address\");\r\n        emit UpdateOperationWallet(lpVaultAddress, _vaultAddress, \"lpvault\");\r\n        _setLpVaultAddress(_vaultAddress);\r\n    }\r\n\r\n    function setCoinStakingAddress(\r\n        address payable _coinStakingAddress\r\n    ) external onlyOwner {\r\n        require(\r\n            !isContract(_coinStakingAddress),\r\n            \"Cannot set contract address\"\r\n        );\r\n        emit UpdateOperationWallet(\r\n            coinStakingAddress,\r\n            _coinStakingAddress,\r\n            \"staking\"\r\n        );\r\n        _setCoinStakingAddress(_coinStakingAddress);\r\n    }\r\n\r\n    function setTokenReserveAddress(\r\n        address _tokenReserveAddress\r\n    ) external onlyOwner {\r\n        emit UpdateOperationWallet(\r\n            tokenReserveAddress,\r\n            _tokenReserveAddress,\r\n            \"reserve\"\r\n        );\r\n        _setTokenReserveAddress(_tokenReserveAddress);\r\n    }\r\n\r\n    function _setShares(\r\n        uint8 coinShareLP,\r\n        uint8 coinShareMarketing,\r\n        uint8 coinShareDevelopment,\r\n        uint8 coinShareStaking,\r\n        uint8 tokenShareReserve,\r\n        uint8 buyTax,\r\n        uint8 sellTax\r\n    ) internal {\r\n        tokenConfigs.coinShareLP = coinShareLP;\r\n        tokenConfigs.coinShareMarketing = coinShareMarketing;\r\n        tokenConfigs.coinShareDevelopment = coinShareDevelopment;\r\n        tokenConfigs.coinShareStaking = coinShareStaking;\r\n        tokenConfigs.tokenShareReserve = tokenShareReserve;\r\n        tokenConfigs.buyTax = buyTax;\r\n        tokenConfigs.sellTax = sellTax;\r\n    }\r\n\r\n    function setShares(\r\n        uint8 coinShareLP,\r\n        uint8 coinShareMarketing,\r\n        uint8 coinShareDevelopment,\r\n        uint8 coinShareStaking,\r\n        uint8 tokenShareReserve,\r\n        uint8 buyTax,\r\n        uint8 sellTax\r\n    ) external onlyOwner {\r\n        require(buyTax \u003c= 25 \u0026\u0026 sellTax \u003c= 25, \"Invalid Tax\");\r\n        require(tokenShareReserve \u003c= 100, \"Invalid token share\");\r\n        require(\r\n            coinShareLP +\r\n                coinShareMarketing +\r\n                coinShareDevelopment +\r\n                coinShareStaking ==\r\n                100,\r\n            \"Invalid coin shares\"\r\n        );\r\n        _setShares(\r\n            coinShareLP,\r\n            coinShareMarketing,\r\n            coinShareDevelopment,\r\n            coinShareStaking,\r\n            tokenShareReserve,\r\n            buyTax,\r\n            sellTax\r\n        );\r\n        emit UpdateTax(buyTax, sellTax);\r\n    }\r\n\r\n    function getTax() external view returns (uint8, uint8) {\r\n        return (tokenConfigs.buyTax, tokenConfigs.sellTax);\r\n    }\r\n\r\n    function setMinimumTokensBeforeSwap(\r\n        uint256 _minimumTokensBeforeSwap\r\n    ) external onlyOwner {\r\n        minimumTokensBeforeSwap = _minimumTokensBeforeSwap;\r\n    }\r\n\r\n    function setMinimumETHToTransfer(\r\n        uint256 _minimumETHToTransfer\r\n    ) external onlyOwner {\r\n        minimumETHToTransfer = _minimumETHToTransfer;\r\n    }\r\n\r\n    function setSwapAndLiquifyEnabled(bool _enabled) external onlyOwner {\r\n        swapAndLiquifyEnabled = _enabled;\r\n        emit SwapAndLiquifyEnabledUpdated(_enabled);\r\n    }\r\n\r\n    function setAutoSplitSharesEnables(bool _enabled) external onlyOwner {\r\n        autoSplitShares = _enabled;\r\n    }\r\n\r\n    function addPoolAddress(address pool) external onlyOwner {\r\n        isPoolAddress[pool] = true;\r\n    }\r\n\r\n    function removePoolAddress(address pool) external onlyOwner {\r\n        isPoolAddress[pool] = false;\r\n    }\r\n\r\n    function _setupExchange(address newRouter) internal {\r\n        IUniswapV2Router02 _newPancakeRouter = IUniswapV2Router02(newRouter);\r\n        IUniswapV2Factory factory = IUniswapV2Factory(\r\n            _newPancakeRouter.factory()\r\n        );\r\n\r\n        address existingPair = factory.getPair(\r\n            address(this),\r\n            _newPancakeRouter.WETH()\r\n        );\r\n\r\n        if (existingPair == address(0)) {\r\n            address lpPool = factory.createPair(\r\n                address(this),\r\n                _newPancakeRouter.WETH()\r\n            );\r\n\r\n            isPoolAddress[lpPool] = true;\r\n        } else {\r\n            isPoolAddress[existingPair] = true;\r\n        }\r\n\r\n        uniswapV2Router = _newPancakeRouter;\r\n    }\r\n\r\n    function setupExchange(address newRouter) external onlyOwner {\r\n        _setupExchange(newRouter);\r\n    }\r\n\r\n    function totalTaxCollected() external view onlyOwner returns (uint256) {\r\n        return _taxCollected;\r\n    }\r\n\r\n    function burn(uint256 amount) external {\r\n        require(balanceOf(_msgSender()) \u003e= amount, \"Insufficient balance\");\r\n        _balances[_msgSender()] = _balances[_msgSender()].sub(amount);\r\n        _totalSupply = _totalSupply.sub(amount);\r\n        emit Transfer(_msgSender(), address(0), amount);\r\n    }\r\n\r\n    receive() external payable {}\r\n}\r\n"},"Uniswap.sol":{"content":"// SPDX-License-Identifier: MIT\r\npragma solidity ^0.8.9;\r\n\r\ninterface IUniswapV2Factory {\r\n    event PairCreated(\r\n        address indexed token0,\r\n        address indexed token1,\r\n        address pair,\r\n        uint256\r\n    );\r\n\r\n    function feeTo() external view returns (address);\r\n\r\n    function feeToSetter() external view returns (address);\r\n\r\n    function getPair(\r\n        address tokenA,\r\n        address tokenB\r\n    ) external view returns (address pair);\r\n\r\n    function allPairs(uint256) external view returns (address pair);\r\n\r\n    function allPairsLength() external view returns (uint256);\r\n\r\n    function createPair(\r\n        address tokenA,\r\n        address tokenB\r\n    ) external returns (address pair);\r\n\r\n    function setFeeTo(address) external;\r\n\r\n    function setFeeToSetter(address) external;\r\n}\r\n\r\ninterface IUniswapV2Pair {\r\n    event Approval(\r\n        address indexed owner,\r\n        address indexed spender,\r\n        uint256 value\r\n    );\r\n    event Transfer(address indexed from, address indexed to, uint256 value);\r\n\r\n    function name() external pure returns (string memory);\r\n\r\n    function symbol() external pure returns (string memory);\r\n\r\n    function decimals() external pure returns (uint8);\r\n\r\n    function totalSupply() external view returns (uint256);\r\n\r\n    function balanceOf(address owner) external view returns (uint256);\r\n\r\n    function allowance(\r\n        address owner,\r\n        address spender\r\n    ) external view returns (uint256);\r\n\r\n    function approve(address spender, uint256 value) external returns (bool);\r\n\r\n    function transfer(address to, uint256 value) external returns (bool);\r\n\r\n    function transferFrom(\r\n        address from,\r\n        address to,\r\n        uint256 value\r\n    ) external returns (bool);\r\n\r\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\r\n\r\n    function PERMIT_TYPEHASH() external pure returns (bytes32);\r\n\r\n    function nonces(address owner) external view returns (uint256);\r\n\r\n    function permit(\r\n        address owner,\r\n        address spender,\r\n        uint256 value,\r\n        uint256 deadline,\r\n        uint8 v,\r\n        bytes32 r,\r\n        bytes32 s\r\n    ) external;\r\n\r\n    event Burn(\r\n        address indexed sender,\r\n        uint256 amount0,\r\n        uint256 amount1,\r\n        address indexed to\r\n    );\r\n    event Swap(\r\n        address indexed sender,\r\n        uint256 amount0In,\r\n        uint256 amount1In,\r\n        uint256 amount0Out,\r\n        uint256 amount1Out,\r\n        address indexed to\r\n    );\r\n    event Sync(uint112 reserve0, uint112 reserve1);\r\n\r\n    function MINIMUM_LIQUIDITY() external pure returns (uint256);\r\n\r\n    function factory() external view returns (address);\r\n\r\n    function token0() external view returns (address);\r\n\r\n    function token1() external view returns (address);\r\n\r\n    function getReserves()\r\n        external\r\n        view\r\n        returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\r\n\r\n    function price0CumulativeLast() external view returns (uint256);\r\n\r\n    function price1CumulativeLast() external view returns (uint256);\r\n\r\n    function kLast() external view returns (uint256);\r\n\r\n    function burn(\r\n        address to\r\n    ) external returns (uint256 amount0, uint256 amount1);\r\n\r\n    function swap(\r\n        uint256 amount0Out,\r\n        uint256 amount1Out,\r\n        address to,\r\n        bytes calldata data\r\n    ) external;\r\n\r\n    function skim(address to) external;\r\n\r\n    function sync() external;\r\n\r\n    function initialize(address, address) external;\r\n}\r\n\r\ninterface IUniswapV2Router01 {\r\n    function factory() external pure returns (address);\r\n\r\n    function WETH() external pure returns (address);\r\n\r\n    function addLiquidity(\r\n        address tokenA,\r\n        address tokenB,\r\n        uint256 amountADesired,\r\n        uint256 amountBDesired,\r\n        uint256 amountAMin,\r\n        uint256 amountBMin,\r\n        address to,\r\n        uint256 deadline\r\n    ) external returns (uint256 amountA, uint256 amountB, uint256 liquidity);\r\n\r\n    function addLiquidityETH(\r\n        address token,\r\n        uint256 amountTokenDesired,\r\n        uint256 amountTokenMin,\r\n        uint256 amountETHMin,\r\n        address to,\r\n        uint256 deadline\r\n    )\r\n        external\r\n        payable\r\n        returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);\r\n\r\n    function removeLiquidity(\r\n        address tokenA,\r\n        address tokenB,\r\n        uint256 liquidity,\r\n        uint256 amountAMin,\r\n        uint256 amountBMin,\r\n        address to,\r\n        uint256 deadline\r\n    ) external returns (uint256 amountA, uint256 amountB);\r\n\r\n    function removeLiquidityETH(\r\n        address token,\r\n        uint256 liquidity,\r\n        uint256 amountTokenMin,\r\n        uint256 amountETHMin,\r\n        address to,\r\n        uint256 deadline\r\n    ) external returns (uint256 amountToken, uint256 amountETH);\r\n\r\n    function removeLiquidityWithPermit(\r\n        address tokenA,\r\n        address tokenB,\r\n        uint256 liquidity,\r\n        uint256 amountAMin,\r\n        uint256 amountBMin,\r\n        address to,\r\n        uint256 deadline,\r\n        bool approveMax,\r\n        uint8 v,\r\n        bytes32 r,\r\n        bytes32 s\r\n    ) external returns (uint256 amountA, uint256 amountB);\r\n\r\n    function removeLiquidityETHWithPermit(\r\n        address token,\r\n        uint256 liquidity,\r\n        uint256 amountTokenMin,\r\n        uint256 amountETHMin,\r\n        address to,\r\n        uint256 deadline,\r\n        bool approveMax,\r\n        uint8 v,\r\n        bytes32 r,\r\n        bytes32 s\r\n    ) external returns (uint256 amountToken, uint256 amountETH);\r\n\r\n    function swapExactTokensForTokens(\r\n        uint256 amountIn,\r\n        uint256 amountOutMin,\r\n        address[] calldata path,\r\n        address to,\r\n        uint256 deadline\r\n    ) external returns (uint256[] memory amounts);\r\n\r\n    function swapTokensForExactTokens(\r\n        uint256 amountOut,\r\n        uint256 amountInMax,\r\n        address[] calldata path,\r\n        address to,\r\n        uint256 deadline\r\n    ) external returns (uint256[] memory amounts);\r\n\r\n    function swapExactETHForTokens(\r\n        uint256 amountOutMin,\r\n        address[] calldata path,\r\n        address to,\r\n        uint256 deadline\r\n    ) external payable returns (uint256[] memory amounts);\r\n\r\n    function swapTokensForExactETH(\r\n        uint256 amountOut,\r\n        uint256 amountInMax,\r\n        address[] calldata path,\r\n        address to,\r\n        uint256 deadline\r\n    ) external returns (uint256[] memory amounts);\r\n\r\n    function swapExactTokensForETH(\r\n        uint256 amountIn,\r\n        uint256 amountOutMin,\r\n        address[] calldata path,\r\n        address to,\r\n        uint256 deadline\r\n    ) external returns (uint256[] memory amounts);\r\n\r\n    function swapETHForExactTokens(\r\n        uint256 amountOut,\r\n        address[] calldata path,\r\n        address to,\r\n        uint256 deadline\r\n    ) external payable returns (uint256[] memory amounts);\r\n\r\n    function quote(\r\n        uint256 amountA,\r\n        uint256 reserveA,\r\n        uint256 reserveB\r\n    ) external pure returns (uint256 amountB);\r\n\r\n    function getAmountOut(\r\n        uint256 amountIn,\r\n        uint256 reserveIn,\r\n        uint256 reserveOut\r\n    ) external pure returns (uint256 amountOut);\r\n\r\n    function getAmountIn(\r\n        uint256 amountOut,\r\n        uint256 reserveIn,\r\n        uint256 reserveOut\r\n    ) external pure returns (uint256 amountIn);\r\n\r\n    function getAmountsOut(\r\n        uint256 amountIn,\r\n        address[] calldata path\r\n    ) external view returns (uint256[] memory amounts);\r\n\r\n    function getAmountsIn(\r\n        uint256 amountOut,\r\n        address[] calldata path\r\n    ) external view returns (uint256[] memory amounts);\r\n}\r\n\r\ninterface IUniswapV2Router02 is IUniswapV2Router01 {\r\n    function removeLiquidityETHSupportingFeeOnTransferTokens(\r\n        address token,\r\n        uint256 liquidity,\r\n        uint256 amountTokenMin,\r\n        uint256 amountETHMin,\r\n        address to,\r\n        uint256 deadline\r\n    ) external returns (uint256 amountETH);\r\n\r\n    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(\r\n        address token,\r\n        uint256 liquidity,\r\n        uint256 amountTokenMin,\r\n        uint256 amountETHMin,\r\n        address to,\r\n        uint256 deadline,\r\n        bool approveMax,\r\n        uint8 v,\r\n        bytes32 r,\r\n        bytes32 s\r\n    ) external returns (uint256 amountETH);\r\n\r\n    function swapExactTokensForTokensSupportingFeeOnTransferTokens(\r\n        uint256 amountIn,\r\n        uint256 amountOutMin,\r\n        address[] calldata path,\r\n        address to,\r\n        uint256 deadline\r\n    ) external;\r\n\r\n    function swapExactETHForTokensSupportingFeeOnTransferTokens(\r\n        uint256 amountOutMin,\r\n        address[] calldata path,\r\n        address to,\r\n        uint256 deadline\r\n    ) external payable;\r\n\r\n    function swapExactTokensForETHSupportingFeeOnTransferTokens(\r\n        uint256 amountIn,\r\n        uint256 amountOutMin,\r\n        address[] calldata path,\r\n        address to,\r\n        uint256 deadline\r\n    ) external;\r\n}\r\n"},"Utils.sol":{"content":"// SPDX-License-Identifier: UNLICENSED\r\npragma solidity ^0.8.16;\r\n\r\nabstract contract Context {\r\n    function _msgSender() internal view virtual returns (address payable) {\r\n        return payable(msg.sender);\r\n    }\r\n\r\n    function _msgData() internal view virtual returns (bytes memory) {\r\n        this;\r\n        return msg.data;\r\n    }\r\n}\r\n\r\ninterface IERC20 {\r\n    function totalSupply() external view returns (uint256);\r\n\r\n    function balanceOf(address account) external view returns (uint256);\r\n\r\n    function transfer(\r\n        address recipient,\r\n        uint256 amount\r\n    ) external returns (bool);\r\n\r\n    function allowance(\r\n        address owner,\r\n        address spender\r\n    ) external view returns (uint256);\r\n\r\n    function approve(address spender, uint256 amount) external returns (bool);\r\n\r\n    function transferFrom(\r\n        address sender,\r\n        address recipient,\r\n        uint256 amount\r\n    ) external returns (bool);\r\n\r\n    event Transfer(address indexed from, address indexed to, uint256 value);\r\n    event Approval(\r\n        address indexed owner,\r\n        address indexed spender,\r\n        uint256 value\r\n    );\r\n}\r\n\r\nlibrary SafeMath {\r\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\r\n        uint256 c = a + b;\r\n        require(c \u003e= a, \"SafeMath: addition overflow\");\r\n\r\n        return c;\r\n    }\r\n\r\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\r\n        return sub(a, b, \"SafeMath: subtraction overflow\");\r\n    }\r\n\r\n    function sub(\r\n        uint256 a,\r\n        uint256 b,\r\n        string memory errorMessage\r\n    ) internal pure returns (uint256) {\r\n        require(b \u003c= a, errorMessage);\r\n        uint256 c = a - b;\r\n\r\n        return c;\r\n    }\r\n\r\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\r\n        if (a == 0) {\r\n            return 0;\r\n        }\r\n\r\n        uint256 c = a * b;\r\n        require(c / a == b, \"SafeMath: multiplication overflow\");\r\n\r\n        return c;\r\n    }\r\n\r\n    function div(uint256 a, uint256 b) internal pure returns (uint256) {\r\n        return div(a, b, \"SafeMath: division by zero\");\r\n    }\r\n\r\n    function div(\r\n        uint256 a,\r\n        uint256 b,\r\n        string memory errorMessage\r\n    ) internal pure returns (uint256) {\r\n        require(b \u003e 0, errorMessage);\r\n        uint256 c = a / b;\r\n        return c;\r\n    }\r\n\r\n    function mod(uint256 a, uint256 b) internal pure returns (uint256) {\r\n        return mod(a, b, \"SafeMath: modulo by zero\");\r\n    }\r\n\r\n    function mod(\r\n        uint256 a,\r\n        uint256 b,\r\n        string memory errorMessage\r\n    ) internal pure returns (uint256) {\r\n        require(b != 0, errorMessage);\r\n        return a % b;\r\n    }\r\n}\r\n\r\nlibrary Address {\r\n    function isContract(address account) internal view returns (bool) {\r\n        bytes32 codehash;\r\n        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\r\n        // solhint-disable-next-line no-inline-assembly\r\n        assembly {\r\n            codehash := extcodehash(account)\r\n        }\r\n        return (codehash != accountHash \u0026\u0026 codehash != 0x0);\r\n    }\r\n\r\n    function sendValue(address payable recipient, uint256 amount) internal {\r\n        require(\r\n            address(this).balance \u003e= amount,\r\n            \"Address: insufficient balance\"\r\n        );\r\n        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\r\n        (bool success, ) = recipient.call{value: amount}(\"\");\r\n        require(\r\n            success,\r\n            \"Address: unable to send value, recipient may have reverted\"\r\n        );\r\n    }\r\n\r\n    function functionCall(\r\n        address target,\r\n        bytes memory data\r\n    ) internal returns (bytes memory) {\r\n        return functionCall(target, data, \"Address: low-level call failed\");\r\n    }\r\n\r\n    function functionCall(\r\n        address target,\r\n        bytes memory data,\r\n        string memory errorMessage\r\n    ) internal returns (bytes memory) {\r\n        return _functionCallWithValue(target, data, 0, errorMessage);\r\n    }\r\n\r\n    function functionCallWithValue(\r\n        address target,\r\n        bytes memory data,\r\n        uint256 value\r\n    ) internal returns (bytes memory) {\r\n        return\r\n            functionCallWithValue(\r\n                target,\r\n                data,\r\n                value,\r\n                \"Address: low-level call with value failed\"\r\n            );\r\n    }\r\n\r\n    function functionCallWithValue(\r\n        address target,\r\n        bytes memory data,\r\n        uint256 value,\r\n        string memory errorMessage\r\n    ) internal returns (bytes memory) {\r\n        require(\r\n            address(this).balance \u003e= value,\r\n            \"Address: insufficient balance for call\"\r\n        );\r\n        return _functionCallWithValue(target, data, value, errorMessage);\r\n    }\r\n\r\n    function _functionCallWithValue(\r\n        address target,\r\n        bytes memory data,\r\n        uint256 weiValue,\r\n        string memory errorMessage\r\n    ) private returns (bytes memory) {\r\n        require(isContract(target), \"Address: call to non-contract\");\r\n\r\n        (bool success, bytes memory returndata) = target.call{value: weiValue}(\r\n            data\r\n        );\r\n        if (success) {\r\n            return returndata;\r\n        } else {\r\n            if (returndata.length \u003e 0) {\r\n                assembly {\r\n                    let returndata_size := mload(returndata)\r\n                    revert(add(32, returndata), returndata_size)\r\n                }\r\n            } else {\r\n                revert(errorMessage);\r\n            }\r\n        }\r\n    }\r\n}\r\n\r\nabstract contract Ownable is Context {\r\n    address private _owner;\r\n    bool initialized = false;\r\n\r\n    event OwnershipTransferred(\r\n        address indexed previousOwner,\r\n        address indexed newOwner\r\n    );\r\n\r\n    function _setOwner() internal {\r\n        require(!initialized, \"Invalid init\");\r\n        _transferOwnership(_msgSender());\r\n        initialized = true;\r\n    }\r\n\r\n    function owner() public view virtual returns (address) {\r\n        return _owner;\r\n    }\r\n\r\n    modifier onlyOwner() {\r\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\r\n        _;\r\n    }\r\n\r\n    function renounceOwnership() public virtual onlyOwner {\r\n        _transferOwnership(address(0));\r\n    }\r\n\r\n    function transferOwnership(address newOwner) public virtual onlyOwner {\r\n        require(\r\n            newOwner != address(0),\r\n            \"Ownable: new owner is the zero address\"\r\n        );\r\n        _transferOwnership(newOwner);\r\n    }\r\n\r\n    function _transferOwnership(address newOwner) internal virtual {\r\n        address oldOwner = _owner;\r\n        _owner = newOwner;\r\n        emit OwnershipTransferred(oldOwner, newOwner);\r\n    }\r\n}\r\n\r\ninterface IUniswapV3Factory {\r\n    event OwnerChanged(address indexed oldOwner, address indexed newOwner);\r\n\r\n    event PoolCreated(\r\n        address indexed token0,\r\n        address indexed token1,\r\n        uint24 indexed fee,\r\n        int24 tickSpacing,\r\n        address pool\r\n    );\r\n\r\n    event FeeAmountEnabled(uint24 indexed fee, int24 indexed tickSpacing);\r\n\r\n    function owner() external view returns (address);\r\n\r\n    function feeAmountTickSpacing(uint24 fee) external view returns (int24);\r\n\r\n    function getPool(\r\n        address tokenA,\r\n        address tokenB,\r\n        uint24 fee\r\n    ) external view returns (address pool);\r\n\r\n    function createPool(\r\n        address tokenA,\r\n        address tokenB,\r\n        uint24 fee\r\n    ) external returns (address pool);\r\n\r\n    function setOwner(address _owner) external;\r\n\r\n    function enableFeeAmount(uint24 fee, int24 tickSpacing) external;\r\n}\r\n\r\ninterface IUniswapV3SwapCallback {\r\n    function uniswapV3SwapCallback(\r\n        int256 amount0Delta,\r\n        int256 amount1Delta,\r\n        bytes calldata data\r\n    ) external;\r\n}\r\n\r\ninterface IMulticall {\r\n    /// @notice Call multiple functions in the current contract and return the data from all of them if they all succeed\r\n    /// @dev The `msg.value` should not be trusted for any method callable from multicall.\r\n    /// @param data The encoded function data for each of the calls to make to this contract\r\n    /// @return results The results from each of the calls passed in via data\r\n    function multicall(\r\n        bytes[] calldata data\r\n    ) external payable returns (bytes[] memory results);\r\n}\r\n\r\ninterface ISwapRouter is IUniswapV3SwapCallback, IMulticall {\r\n    struct ExactInputSingleParams {\r\n        address tokenIn;\r\n        address tokenOut;\r\n        uint24 fee;\r\n        address recipient;\r\n        uint256 deadline;\r\n        uint256 amountIn;\r\n        uint256 amountOutMinimum;\r\n        uint160 sqrtPriceLimitX96;\r\n    }\r\n\r\n    function exactInputSingle(\r\n        ExactInputSingleParams calldata params\r\n    ) external payable returns (uint256 amountOut);\r\n\r\n    struct ExactInputParams {\r\n        bytes path;\r\n        address recipient;\r\n        uint256 deadline;\r\n        uint256 amountIn;\r\n        uint256 amountOutMinimum;\r\n    }\r\n\r\n    function exactInput(\r\n        ExactInputParams calldata params\r\n    ) external payable returns (uint256 amountOut);\r\n\r\n    struct ExactOutputSingleParams {\r\n        address tokenIn;\r\n        address tokenOut;\r\n        uint24 fee;\r\n        address recipient;\r\n        uint256 deadline;\r\n        uint256 amountOut;\r\n        uint256 amountInMaximum;\r\n        uint160 sqrtPriceLimitX96;\r\n    }\r\n\r\n    function exactOutputSingle(\r\n        ExactOutputSingleParams calldata params\r\n    ) external payable returns (uint256 amountIn);\r\n\r\n    struct ExactOutputParams {\r\n        bytes path;\r\n        address recipient;\r\n        uint256 deadline;\r\n        uint256 amountOut;\r\n        uint256 amountInMaximum;\r\n    }\r\n\r\n    function exactOutput(\r\n        ExactOutputParams calldata params\r\n    ) external payable returns (uint256 amountIn);\r\n}\r\n\r\ninterface IUniswapV3PoolActions {\r\n    function initialize(uint160 sqrtPriceX96) external;\r\n\r\n    function mint(\r\n        address recipient,\r\n        int24 tickLower,\r\n        int24 tickUpper,\r\n        uint128 amount,\r\n        bytes calldata data\r\n    ) external returns (uint256 amount0, uint256 amount1);\r\n\r\n    function collect(\r\n        address recipient,\r\n        int24 tickLower,\r\n        int24 tickUpper,\r\n        uint128 amount0Requested,\r\n        uint128 amount1Requested\r\n    ) external returns (uint128 amount0, uint128 amount1);\r\n\r\n    function burn(\r\n        int24 tickLower,\r\n        int24 tickUpper,\r\n        uint128 amount\r\n    ) external returns (uint256 amount0, uint256 amount1);\r\n\r\n    function swap(\r\n        address recipient,\r\n        bool zeroForOne,\r\n        int256 amountSpecified,\r\n        uint160 sqrtPriceLimitX96,\r\n        bytes calldata data\r\n    ) external returns (int256 amount0, int256 amount1);\r\n\r\n    function flash(\r\n        address recipient,\r\n        uint256 amount0,\r\n        uint256 amount1,\r\n        bytes calldata data\r\n    ) external;\r\n\r\n    function increaseObservationCardinalityNext(\r\n        uint16 observationCardinalityNext\r\n    ) external;\r\n}\r\n\r\ninterface IUniswapV3PoolDerivedState {\r\n    function observe(\r\n        uint32[] calldata secondsAgos\r\n    )\r\n        external\r\n        view\r\n        returns (\r\n            int56[] memory tickCumulatives,\r\n            uint160[] memory secondsPerLiquidityCumulativeX128s\r\n        );\r\n\r\n    function snapshotCumulativesInside(\r\n        int24 tickLower,\r\n        int24 tickUpper\r\n    )\r\n        external\r\n        view\r\n        returns (\r\n            int56 tickCumulativeInside,\r\n            uint160 secondsPerLiquidityInsideX128,\r\n            uint32 secondsInside\r\n        );\r\n}\r\n\r\ninterface IUniswapV3PoolEvents {\r\n    event Initialize(uint160 sqrtPriceX96, int24 tick);\r\n\r\n    event Mint(\r\n        address sender,\r\n        address indexed owner,\r\n        int24 indexed tickLower,\r\n        int24 indexed tickUpper,\r\n        uint128 amount,\r\n        uint256 amount0,\r\n        uint256 amount1\r\n    );\r\n\r\n    event Collect(\r\n        address indexed owner,\r\n        address recipient,\r\n        int24 indexed tickLower,\r\n        int24 indexed tickUpper,\r\n        uint128 amount0,\r\n        uint128 amount1\r\n    );\r\n\r\n    event Burn(\r\n        address indexed owner,\r\n        int24 indexed tickLower,\r\n        int24 indexed tickUpper,\r\n        uint128 amount,\r\n        uint256 amount0,\r\n        uint256 amount1\r\n    );\r\n\r\n    event Swap(\r\n        address indexed sender,\r\n        address indexed recipient,\r\n        int256 amount0,\r\n        int256 amount1,\r\n        uint160 sqrtPriceX96,\r\n        uint128 liquidity,\r\n        int24 tick\r\n    );\r\n\r\n    event Flash(\r\n        address indexed sender,\r\n        address indexed recipient,\r\n        uint256 amount0,\r\n        uint256 amount1,\r\n        uint256 paid0,\r\n        uint256 paid1\r\n    );\r\n\r\n    event IncreaseObservationCardinalityNext(\r\n        uint16 observationCardinalityNextOld,\r\n        uint16 observationCardinalityNextNew\r\n    );\r\n\r\n    event SetFeeProtocol(\r\n        uint8 feeProtocol0Old,\r\n        uint8 feeProtocol1Old,\r\n        uint8 feeProtocol0New,\r\n        uint8 feeProtocol1New\r\n    );\r\n\r\n    event CollectProtocol(\r\n        address indexed sender,\r\n        address indexed recipient,\r\n        uint128 amount0,\r\n        uint128 amount1\r\n    );\r\n}\r\n\r\ninterface IUniswapV3PoolImmutables {\r\n    function factory() external view returns (address);\r\n\r\n    function token0() external view returns (address);\r\n\r\n    function token1() external view returns (address);\r\n\r\n    function fee() external view returns (uint24);\r\n\r\n    function tickSpacing() external view returns (int24);\r\n\r\n    function maxLiquidityPerTick() external view returns (uint128);\r\n}\r\n\r\ninterface IUniswapV3PoolOwnerActions {\r\n    function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) external;\r\n\r\n    function collectProtocol(\r\n        address recipient,\r\n        uint128 amount0Requested,\r\n        uint128 amount1Requested\r\n    ) external returns (uint128 amount0, uint128 amount1);\r\n}\r\n\r\ninterface IUniswapV3PoolState {\r\n    function slot0()\r\n        external\r\n        view\r\n        returns (\r\n            uint160 sqrtPriceX96,\r\n            int24 tick,\r\n            uint16 observationIndex,\r\n            uint16 observationCardinality,\r\n            uint16 observationCardinalityNext,\r\n            uint8 feeProtocol,\r\n            bool unlocked\r\n        );\r\n\r\n    function feeGrowthGlobal0X128() external view returns (uint256);\r\n\r\n    function feeGrowthGlobal1X128() external view returns (uint256);\r\n\r\n    function protocolFees()\r\n        external\r\n        view\r\n        returns (uint128 token0, uint128 token1);\r\n\r\n    function liquidity() external view returns (uint128);\r\n\r\n    function ticks(\r\n        int24 tick\r\n    )\r\n        external\r\n        view\r\n        returns (\r\n            uint128 liquidityGross,\r\n            int128 liquidityNet,\r\n            uint256 feeGrowthOutside0X128,\r\n            uint256 feeGrowthOutside1X128,\r\n            int56 tickCumulativeOutside,\r\n            uint160 secondsPerLiquidityOutsideX128,\r\n            uint32 secondsOutside,\r\n            bool initialized\r\n        );\r\n\r\n    function tickBitmap(int16 wordPosition) external view returns (uint256);\r\n\r\n    function positions(\r\n        bytes32 key\r\n    )\r\n        external\r\n        view\r\n        returns (\r\n            uint128 _liquidity,\r\n            uint256 feeGrowthInside0LastX128,\r\n            uint256 feeGrowthInside1LastX128,\r\n            uint128 tokensOwed0,\r\n            uint128 tokensOwed1\r\n        );\r\n\r\n    function observations(\r\n        uint256 index\r\n    )\r\n        external\r\n        view\r\n        returns (\r\n            uint32 blockTimestamp,\r\n            int56 tickCumulative,\r\n            uint160 secondsPerLiquidityCumulativeX128,\r\n            bool initialized\r\n        );\r\n}\r\n\r\ninterface IUniswapV3Pool is\r\n    IUniswapV3PoolImmutables,\r\n    IUniswapV3PoolState,\r\n    IUniswapV3PoolDerivedState,\r\n    IUniswapV3PoolActions,\r\n    IUniswapV3PoolOwnerActions,\r\n    IUniswapV3PoolEvents\r\n{}"}}