ETH Price: $2,644.51 (-0.91%)

Contract

0x0040C940dA65592fFe7219b4652b33aD332f4937
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw Token154599082022-09-02 15:20:27758 days ago1662132027IN
0x0040C940...D332f4937
0 ETH0.0012813726.77728598
Withdraw ETH154599022022-09-02 15:18:34758 days ago1662131914IN
0x0040C940...D332f4937
0 ETH0.000566716.25800611
Swap V2To V3154579622022-09-02 7:53:07758 days ago1662105187IN
0x0040C940...D332f4937
0 ETH0.001807198.81165037
Swap V2To V3154579622022-09-02 7:53:07758 days ago1662105187IN
0x0040C940...D332f4937
0 ETH0.002998118.81165037
Swap V2To V3154579622022-09-02 7:53:07758 days ago1662105187IN
0x0040C940...D332f4937
0 ETH0.00172948.81165037
Swap V2To V3154579622022-09-02 7:53:07758 days ago1662105187IN
0x0040C940...D332f4937
0 ETH0.002998118.81165037
Swap V2To V3154579622022-09-02 7:53:07758 days ago1662105187IN
0x0040C940...D332f4937
0 ETH0.002998118.81165037
Swap V2To V3154579622022-09-02 7:53:07758 days ago1662105187IN
0x0040C940...D332f4937
0 ETH0.002998118.81165037
Swap V2To V3154539362022-09-01 16:38:37759 days ago1662050317IN
0x0040C940...D332f4937
0 ETH0.0068048820
Swap V2To V3154539362022-09-01 16:38:37759 days ago1662050317IN
0x0040C940...D332f4937
0 ETH0.0041023820
Swap V2To V3154539362022-09-01 16:38:37759 days ago1662050317IN
0x0040C940...D332f4937
0 ETH0.0039120620
Swap V2To V3154539362022-09-01 16:38:37759 days ago1662050317IN
0x0040C940...D332f4937
0 ETH0.003895520
Swap V2To V3154539362022-09-01 16:38:37759 days ago1662050317IN
0x0040C940...D332f4937
0 ETH0.0039120620
Swap V2To V3154539362022-09-01 16:38:37759 days ago1662050317IN
0x0040C940...D332f4937
0 ETH0.0068048820
Swap V2To V3154539242022-09-01 16:35:59759 days ago1662050159IN
0x0040C940...D332f4937
0 ETH0.0037775119.89959111
Swap V2To V3154539232022-09-01 16:35:55759 days ago1662050155IN
0x0040C940...D332f4937
0 ETH0.0039120620
Swap V2To V3154538902022-09-01 16:28:23759 days ago1662049703IN
0x0040C940...D332f4937
0 ETH0.0037430420
Swap V2To V3154456722022-08-31 8:58:29760 days ago1661936309IN
0x0040C940...D332f4937
0 ETH0.0038054114.14650903
Swap V3To V2154446892022-08-31 5:08:10760 days ago1661922490IN
0x0040C940...D332f4937
0 ETH0.002555813.79242569
Swap V3To V2154446582022-08-31 5:01:36760 days ago1661922096IN
0x0040C940...D332f4937
0 ETH0.0052077930
Swap V3To V2154446322022-08-31 4:55:40760 days ago1661921740IN
0x0040C940...D332f4937
0 ETH0.0055298430
Swap V3To V2154416942022-08-30 17:38:48761 days ago1661881128IN
0x0040C940...D332f4937
0 ETH0.0046176824.62424285
Swap V3To Sushi154263232022-08-28 6:49:29763 days ago1661669369IN
0x0040C940...D332f4937
0 ETH0.000823014.38684264
Swap V3To V2154258202022-08-28 4:50:39763 days ago1661662239IN
0x0040C940...D332f4937
0 ETH0.000900574.72228794
Swap V2To V3154241452022-08-27 22:18:22764 days ago1661638702IN
0x0040C940...D332f4937
0 ETH0.001678728.59489259
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
154599022022-09-02 15:18:34758 days ago1662131914
0x0040C940...D332f4937
0.02246163 ETH
154416942022-08-30 17:38:48761 days ago1661881128
0x0040C940...D332f4937
0.00647122 ETH
154263232022-08-28 6:49:29763 days ago1661669369
0x0040C940...D332f4937
0.00334224 ETH
154258202022-08-28 4:50:39763 days ago1661662239
0x0040C940...D332f4937
0.00336473 ETH
154241452022-08-27 22:18:22764 days ago1661638702
0x0040C940...D332f4937
0.00340831 ETH
154236592022-08-27 20:22:46764 days ago1661631766
0x0040C940...D332f4937
0.00338524 ETH
154234412022-08-27 19:32:09764 days ago1661628729
0x0040C940...D332f4937
0.00338753 ETH
154217682022-08-27 13:13:40764 days ago1661606020
0x0040C940...D332f4937
0.00333555 ETH
154214402022-08-27 11:56:08764 days ago1661601368
0x0040C940...D332f4937
0.00331564 ETH
154210512022-08-27 10:29:21764 days ago1661596161
0x0040C940...D332f4937
0.00331564 ETH
154205822022-08-27 8:43:59764 days ago1661589839
0x0040C940...D332f4937
0.00331345 ETH
154201402022-08-27 7:01:21764 days ago1661583681
0x0040C940...D332f4937
0.00334001 ETH
154196602022-08-27 5:02:24764 days ago1661576544
0x0040C940...D332f4937
0.00334896 ETH
154196332022-08-27 4:56:28764 days ago1661576188
0x0040C940...D332f4937
0.00334896 ETH
154164962022-08-26 16:46:58765 days ago1661532418
0x0040C940...D332f4937
0.00317863 ETH
154163072022-08-26 15:59:01765 days ago1661529541
0x0040C940...D332f4937
0.00313676 ETH
154153332022-08-26 12:26:32765 days ago1661516792
0x0040C940...D332f4937
0.00306372 ETH
154145342022-08-26 9:21:19765 days ago1661505679
0x0040C940...D332f4937
0.00301386 ETH
154137452022-08-26 6:17:50765 days ago1661494670
0x0040C940...D332f4937
0.00300842 ETH
154127782022-08-26 2:40:25765 days ago1661481625
0x0040C940...D332f4937
0.00296959 ETH
154056372022-08-24 22:50:21767 days ago1661381421
0x0040C940...D332f4937
0.00339108 ETH
154044522022-08-24 18:24:20767 days ago1661365460
0x0040C940...D332f4937
0.0028983 ETH
153946712022-08-23 5:08:55768 days ago1661231335
0x0040C940...D332f4937
0.00197957 ETH
153925032022-08-22 21:00:06769 days ago1661202006
0x0040C940...D332f4937
0.00636643 ETH
153901462022-08-22 12:10:53769 days ago1661170253
0x0040C940...D332f4937
0.00338321 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
AppRouter

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 34 : App.router.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma abicoder v2;

import "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol";
import "../interfaces/IUniswapV2Callee.sol";
import "../base/Withdraw.sol";
import "./SwapSushiAndV2.sol";
import "./SwapSushiAndV3.sol";
import "./SwapV2AndV3.sol";

contract AppRouter is
    IUniswapV2Callee,
    IUniswapV3SwapCallback,
    SwapSushiAndV2Router,
    SwapSushiAndV3Router,
    SwapV2AndV3Router,
    Withdraw
{
    event AccountLog(uint256 amount);

    function uniswapV2Call(
        address sender,
        uint256 amount0,
        uint256 amount1,
        bytes calldata data
    ) external override {
        (
            uint256 amountIn,
            uint8 swapType,
            uint24 fee,
            uint256 payETHToCoinbase
        ) = abi.decode(data, (uint256, uint8, uint24, uint256));
        // swapType枚举值
        // 1: uniswapV2 -> sushi的回调
        // 2: sushi -> uniswapV2的回调
        // 3: uniswapV2 -> uniswapV3的回调
        // 4: sushi -> uniswapV3的回调
        if (swapType == 1) {
            uniswapV2ForSushiCallback(
                amountIn,
                amount0,
                amount1,
                payETHToCoinbase
            );
        }
        if (swapType == 2) {
            sushiForUniswapV2CallBack(
                amountIn,
                amount0,
                amount1,
                payETHToCoinbase
            );
        }
        if (swapType == 3) {
            sushiForUniswapV3Callback(
                amountIn,
                amount0,
                amount1,
                payETHToCoinbase,
                fee
            );
        }
        if (swapType == 4) {
            uniswapV2ForUniswapV3Callback(
                amountIn,
                amount0,
                amount1,
                payETHToCoinbase,
                fee
            );
        }
    }

    function uniswapV3SwapCallback(
        int256 amount0Delta,
        int256 amount1Delta,
        bytes calldata data
    ) external override {
        (
            uint256 amountIn,
            address token,
            uint8 swapType,
            uint256 payETHToCoinbase
        ) = abi.decode(data, (uint256, address, uint8, uint256));

        if (swapType == 5) {
            uniswapV3ForSushiCallback(
                amount0Delta,
                amount1Delta,
                token,
                amountIn,
                payETHToCoinbase
            );
        }
        if (swapType == 6) {
            uniswapV3ForV2Callback(
                amount0Delta,
                amount1Delta,
                token,
                amountIn,
                payETHToCoinbase
            );
        }
    }

    // 回调函数,避免被重入攻击
    receive() external payable {
        emit AccountLog(msg.value);
    }
}

File 2 of 34 : ISwapRouter.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.7.5;
pragma abicoder v2;

import '@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol';

/// @title Router token swapping functionality
/// @notice Functions for swapping tokens via Uniswap V3
interface ISwapRouter is IUniswapV3SwapCallback {
    struct ExactInputSingleParams {
        address tokenIn;
        address tokenOut;
        uint24 fee;
        address recipient;
        uint256 deadline;
        uint256 amountIn;
        uint256 amountOutMinimum;
        uint160 sqrtPriceLimitX96;
    }

    /// @notice Swaps `amountIn` of one token for as much as possible of another token
    /// @param params The parameters necessary for the swap, encoded as `ExactInputSingleParams` in calldata
    /// @return amountOut The amount of the received token
    function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut);

    struct ExactInputParams {
        bytes path;
        address recipient;
        uint256 deadline;
        uint256 amountIn;
        uint256 amountOutMinimum;
    }

    /// @notice Swaps `amountIn` of one token for as much as possible of another along the specified path
    /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactInputParams` in calldata
    /// @return amountOut The amount of the received token
    function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut);

    struct ExactOutputSingleParams {
        address tokenIn;
        address tokenOut;
        uint24 fee;
        address recipient;
        uint256 deadline;
        uint256 amountOut;
        uint256 amountInMaximum;
        uint160 sqrtPriceLimitX96;
    }

    /// @notice Swaps as little as possible of one token for `amountOut` of another token
    /// @param params The parameters necessary for the swap, encoded as `ExactOutputSingleParams` in calldata
    /// @return amountIn The amount of the input token
    function exactOutputSingle(ExactOutputSingleParams calldata params) external payable returns (uint256 amountIn);

    struct ExactOutputParams {
        bytes path;
        address recipient;
        uint256 deadline;
        uint256 amountOut;
        uint256 amountInMaximum;
    }

    /// @notice Swaps as little as possible of one token for `amountOut` of another along the specified path (reversed)
    /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactOutputParams` in calldata
    /// @return amountIn The amount of the input token
    function exactOutput(ExactOutputParams calldata params) external payable returns (uint256 amountIn);
}

File 3 of 34 : IUniswapV2Callee.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IUniswapV2Callee {
    function uniswapV2Call(
        address sender,
        uint256 amount0,
        uint256 amount1,
        bytes calldata data
    ) external;
}

File 4 of 34 : Withdraw.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "../utils/SafeERC20.sol";

contract Withdraw is Ownable, ReentrancyGuard {
    event Withdrawal(address indexed sender, uint256 amount);
    event WithdrawETH(address indexed sender, uint256 amount);

    function withdrawToken(
        IERC20 token,
        address _to,
        uint256 _value
    ) public onlyOwner nonReentrant {
        require(token.balanceOf(address(this)) >= _value, "Not enough token");
        SafeERC20.safeTransfer(token, _to, _value);
        emit Withdrawal(_to, _value);
    }

    function getEthBalance() public view returns (uint256 amount) {
        return address(this).balance;
    }

    function withdrawETH(uint256 amount) public onlyOwner nonReentrant {
        require(amount <= getEthBalance(), "Not enough ETH");
        payable(msg.sender).transfer(amount);
        emit WithdrawETH(msg.sender, amount);
    }
}

File 5 of 34 : SwapSushiAndV2.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma abicoder v2;

import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "../libs/UniswapV2Library.sol";
import "../libs/SushiSwapLibrary.sol";
import "../libs/CommonLibrary.sol";
import "../constants/Constants.sol";

import "../interfaces/IERC20.sol";
import "../interfaces/WETH.sol";

contract SwapSushiAndV2Router {
    event SushiLog(uint256 amountEth, uint256 amonutOut);

    function swapSushiToV2(
        uint256 amountIn,
        address token,
        uint256 payETHToCoinbase
    ) public payable {
        // token address < ETHAddress
        bool zeroForOne = token < Constants.WETH;
        (uint256 reserveIn, uint256 reserveOut) = SushiSwapLibrary.getReserves(
            Constants.SUSHI_FACTORY,
            Constants.WETH,
            token
        );
        uint256 amountOut = SushiSwapLibrary.getAmountOut(
            amountIn,
            reserveIn,
            reserveOut
        );
        useFlashSwapExactTokenBySushi(
            amountOut,
            amountIn,
            zeroForOne,
            token,
            payETHToCoinbase
        );
    }

    function useFlashSwapExactTokenBySushi(
        uint256 amountToken,
        uint256 amountOutMin,
        bool zeroForOne, // token address > ETHAddress
        address token,
        uint256 payETHToCoinbase
    ) public {
        uint8 swapType = 2;
        bytes memory data = abi.encode(
            amountOutMin,
            swapType,
            0,
            payETHToCoinbase
        );
        // 提前获得token,这个地方就是uniswapV2 swap获取token,路径ETH -> token
        if (zeroForOne) {
            IUniswapV2Pair(
                SushiSwapLibrary.pairFor(
                    Constants.SUSHI_FACTORY,
                    token,
                    Constants.WETH
                )
            ).swap(amountToken, 0, address(this), data);
        } else {
            IUniswapV2Pair(
                SushiSwapLibrary.pairFor(
                    Constants.SUSHI_FACTORY,
                    Constants.WETH,
                    token
                )
            ).swap(0, amountToken, address(this), data);
        }
    }

    // 使用swapv2ToSushi
    // 1. 输入ETH amountIn的数据量,获得对应的Token amountOut
    // 2. 使用Token的amountOut数量输入,然后通过flashswap提前获得token
    // 3. 把发送的token卖到sushi上,获得ETH,然后还给uniswap v2
    function swapV2ToSushi(
        uint256 amountIn,
        address token,
        uint256 payETHToCoinbase
    ) public payable {
        // token address < ETHAddress
        bool zeroForOne = token < Constants.WETH;
        (uint256 reserveIn, uint256 reserveOut) = UniswapV2Library.getReserves(
            Constants.UNISWAP_V2_FACTORY,
            Constants.WETH,
            token
        );
        uint256 amountOut = UniswapV2Library.getAmountOut(
            amountIn,
            reserveIn,
            reserveOut
        );
        useFlashSwapExactTokenByV2(
            amountOut,
            amountIn,
            zeroForOne,
            token,
            payETHToCoinbase
        );
    }

    function useFlashSwapExactTokenByV2(
        uint256 amountToken,
        uint256 amountOutMin,
        bool zeroForOne, // token address > ETHAddress
        address token,
        uint256 payETHToCoinbase
    ) public {
        uint8 swapType = 1;
        bytes memory data = abi.encode(
            amountOutMin,
            swapType,
            0,
            payETHToCoinbase
        );
        // 提前获得token,这个地方就是uniswapV2 swap获取token,路径ETH -> token
        if (zeroForOne) {
            IUniswapV2Pair(
                UniswapV2Library.pairFor(
                    Constants.UNISWAP_V2_FACTORY,
                    token,
                    Constants.WETH
                )
            ).swap(amountToken, 0, address(this), data);
        } else {
            IUniswapV2Pair(
                UniswapV2Library.pairFor(
                    Constants.UNISWAP_V2_FACTORY,
                    Constants.WETH,
                    token
                )
            ).swap(0, amountToken, address(this), data);
        }
    }

    function sushiForUniswapV2CallBack(
        uint256 amountIn,
        uint256 amount0,
        uint256 amount1,
        uint256 payETHToCoinbase
    ) internal {
        address token0 = IUniswapV2Pair(msg.sender).token0();
        address token1 = IUniswapV2Pair(msg.sender).token1();
        if (amount0 > 0) {
            IWETH WETH = IWETH(Constants.WETH);
            IERC20 token = IERC20(token0);
            token.approve(Constants.UNISWAP_V2_ROUTER, amount0);
            uint256 amountOut = CommonLibrary.swapExactTokenByV2(
                amount0,
                token0,
                token1
            );
            require(amountOut >= amountIn, "amount less min");
            // WETH.deposit{value: amountIn}();
            WETH.transfer(msg.sender, amountIn);
        } else {
            IWETH WETH = IWETH(Constants.WETH);
            IERC20 token = IERC20(token1);
            token.approve(Constants.UNISWAP_V2_ROUTER, amount1);
            uint256 amountOut = CommonLibrary.swapExactTokenByV2(
                amount1,
                token1,
                token0
            );
            require(amountOut >= amountIn, "amount less min");
            // WETH.deposit{value: amountIn}();
            WETH.transfer(msg.sender, amountIn);
        }
        block.coinbase.transfer(payETHToCoinbase);
    }

    function uniswapV2ForSushiCallback(
        uint256 amountIn,
        uint256 amount0,
        uint256 amount1,
        uint256 payETHToCoinbase
    ) internal {
        address token0 = IUniswapV2Pair(msg.sender).token0();
        address token1 = IUniswapV2Pair(msg.sender).token1();
        if (amount0 > 0) {
            // 实际上就是WETH
            IWETH WETH = IWETH(Constants.WETH);
            IERC20 token = IERC20(token0);
            token.approve(Constants.SUSHI_ROUTER, amount0);
            uint256 amountOut = CommonLibrary.swapExactTokenBySushi(
                amount0,
                token0,
                token1
            );
            require(amountOut >= amountIn, "amount less min");
            // WETH.deposit{value: amountIn}();
            WETH.transfer(msg.sender, amountIn);
        } else {
            IWETH WETH = IWETH(Constants.WETH);
            IERC20 token = IERC20(token1);
            token.approve(Constants.SUSHI_ROUTER, amount1);
            uint256 amountOut = CommonLibrary.swapExactTokenBySushi(
                amount1,
                token1,
                token0
            );
            require(amountOut >= amountIn, "amount less min");
            // WETH.deposit{value: amountIn}();
            WETH.transfer(msg.sender, amountIn);
        }
        block.coinbase.transfer(payETHToCoinbase);
    }
}

File 6 of 34 : SwapSushiAndV3.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma abicoder v2;

import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol";
import "@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol";
import "../libs/PoolAddress.sol";
import "../constants/Constants.sol";
import "../libs/TickMath.sol";
import "../libs/SushiSwapLibrary.sol";
import "../interfaces/IERC20.sol";
import "../interfaces/WETH.sol";
import "../libs/CommonLibrary.sol";

contract SwapSushiAndV3Router {
    function swapSushiToV3(
        uint256 amountIn,
        address token,
        uint24 fee,
        uint256 payETHToCoinbase
    ) public payable {
        // token address < ETHAddress
        bool zeroForOne = token < Constants.WETH;
        (uint256 reserveIn, uint256 reserveOut) = SushiSwapLibrary.getReserves(
            Constants.SUSHI_FACTORY,
            Constants.WETH,
            token
        );
        uint256 amountOut = SushiSwapLibrary.getAmountOut(
            amountIn,
            reserveIn,
            reserveOut
        );
        useFlashSwapExactTokenBySushi(
            amountOut,
            amountIn,
            zeroForOne,
            token,
            fee,
            payETHToCoinbase
        );
    }

    function useFlashSwapExactTokenBySushi(
        uint256 amountToken,
        uint256 amountOutMin,
        bool zeroForOne, // token address > ETHAddress
        address token,
        uint24 fee,
        uint256 payETHToCoinbase
    ) internal {
        // 表示sushi和v3的swap router
        uint8 swapType = 3;
        bytes memory data = abi.encode(
            amountOutMin,
            swapType,
            fee,
            payETHToCoinbase
        );
        if (zeroForOne) {
            ISushiSwapPair(
                SushiSwapLibrary.pairFor(
                    Constants.SUSHI_FACTORY,
                    token,
                    Constants.WETH
                )
            ).swap(amountToken, 0, address(this), data);
        } else {
            ISushiSwapPair(
                SushiSwapLibrary.pairFor(
                    Constants.SUSHI_FACTORY,
                    Constants.WETH,
                    token
                )
            ).swap(0, amountToken, address(this), data);
        }
    }

    function sushiForUniswapV3Callback(
        uint256 amountOutMin,
        uint256 amount0,
        uint256 amount1,
        uint256 payETHToCoinbase,
        uint24 fee
    ) internal {
        address token0 = ISushiSwapPair(msg.sender).token0();
        address token1 = ISushiSwapPair(msg.sender).token1();

        if (amount0 > 0) {
            IWETH WETH = IWETH(token1);
            IERC20 token = IERC20(token0);
            token.approve(Constants.UNISWAP_V3_ROUTER, amount0);
            uint256 amountOut = CommonLibrary.swapExactTokenByV3(
                token0,
                token1,
                amount0,
                amountOutMin,
                fee
            );
            require(amountOut >= amountOutMin, "amount less min");
            // WETH.deposit{value: amountOutMin}();
            WETH.transfer(msg.sender, amountOutMin);
        } else {
            IWETH WETH = IWETH(token0);
            IERC20 token = IERC20(token1);
            token.approve(Constants.UNISWAP_V3_ROUTER, amount1);
            uint256 amountOut = CommonLibrary.swapExactTokenByV3(
                token1,
                token0,
                amount1,
                amountOutMin,
                fee
            );
            require(amountOut >= amountOutMin, "amount less min");
            // WETH.deposit{value: amountOutMin}();
            WETH.transfer(msg.sender, amountOutMin);
        }
        block.coinbase.transfer(payETHToCoinbase);
    }

    function getPool(
        address tokenA,
        address tokenB,
        uint24 fee
    ) internal pure returns (IUniswapV3Pool) {
        return
            IUniswapV3Pool(
                PoolAddress.computeAddress(
                    Constants.UNISWAP_V3_FACTORY,
                    PoolAddress.getPoolKey(tokenA, tokenB, fee)
                )
            );
    }

    function swapV3ToSushi(
        uint256 amountIn,
        address token,
        uint24 fee,
        uint256 payETHToCoinbase
    ) external payable {
        // true的时候,买大的,false的时候,买小的
        // 这个地方是要买token
        bool zeroForOne = Constants.WETH < token;
        uint8 swapType = 5;
        getPool(Constants.WETH, token, fee).swap(
            address(this), // address(0) might cause issues with some tokens
            zeroForOne,
            int256(amountIn),
            zeroForOne
                ? TickMath.MIN_SQRT_RATIO + 1
                : TickMath.MAX_SQRT_RATIO - 1,
            abi.encode(amountIn, token, swapType, payETHToCoinbase)
        );
    }

    function uniswapV3ForSushiCallback(
        int256 amount0Delta,
        int256 amount1Delta,
        address token,
        uint256 amountOutMin,
        uint256 payETHToCoinbase
    ) internal {
        IWETH WETH = IWETH(Constants.WETH);
        IERC20 token20 = IERC20(token);
        uint256 amountPay = amount0Delta > 0
            ? uint256(amount0Delta)
            : uint256(amount1Delta);
        uint256 amountTokenOut = amount0Delta > 0
            ? uint256(-amount1Delta)
            : uint256(-amount0Delta);
        token20.approve(Constants.SUSHI_ROUTER, amountTokenOut);
        uint256 amountEth = CommonLibrary.swapExactTokenBySushi(
            amountTokenOut,
            token,
            Constants.WETH
        );
        require(amountEth > amountOutMin, "amount eth overflow");
        require(amountEth > amountPay, "amount eth overflow");
        // WETH.deposit{value: amountPay}();
        WETH.transfer(msg.sender, amountPay);
        block.coinbase.transfer(payETHToCoinbase);
    }
}

File 7 of 34 : SwapV2AndV3.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma abicoder v2;

import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol";
import "@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol";
import "../libs//TickMath.sol";
import "../libs/UniswapV2Library.sol";
import "../interfaces/IERC20.sol";
import "../interfaces/WETH.sol";
import "../libs/CommonLibrary.sol";
import "../constants/Constants.sol";
import "../libs/UniswapV3Library.sol";

contract SwapV2AndV3Router {
    function swapV2ToV3(
        uint256 amountIn,
        address token,
        uint24 fee,
        uint256 payETHToCoinbase
    ) public payable {
        // token address < ETHAddress
        bool zeroForOne = token < Constants.WETH;
        (uint256 reserveToken, uint256 reserveETH) = UniswapV2Library
            .getReserves(Constants.UNISWAP_V2_FACTORY, Constants.WETH, token);
        uint256 amountOut = UniswapV2Library.getAmountOut(
            amountIn,
            reserveToken,
            reserveETH
        );
        useFlashSwapExactTokenByV2(
            amountOut,
            amountIn,
            zeroForOne,
            token,
            fee,
            payETHToCoinbase
        );
    }

    function useFlashSwapExactTokenByV2(
        uint256 amountToken,
        uint256 amountOutMin,
        bool zeroForOne, // token address > ETHAddress
        address token,
        uint24 fee,
        uint256 payETHToCoinbase
    ) internal {
        // 表示v2和v3的swap router
        uint8 swapType = 4;
        bytes memory data = abi.encode(
            amountOutMin,
            swapType,
            fee,
            payETHToCoinbase
        );
        if (zeroForOne) {
            IUniswapV2Pair(
                UniswapV2Library.pairFor(
                    Constants.UNISWAP_V2_FACTORY,
                    token,
                    Constants.WETH
                )
            ).swap(amountToken, 0, address(this), data);
        } else {
            IUniswapV2Pair(
                UniswapV2Library.pairFor(
                    Constants.UNISWAP_V2_FACTORY,
                    Constants.WETH,
                    token
                )
            ).swap(0, amountToken, address(this), data);
        }
    }

    function uniswapV2ForUniswapV3Callback(
        uint256 amountOutMin,
        uint256 amount0,
        uint256 amount1,
        uint256 payETHToCoinbase,
        uint24 fee
    ) internal {
        address token0 = IUniswapV2Pair(msg.sender).token0();
        address token1 = IUniswapV2Pair(msg.sender).token1();
        if (amount0 > 0) {
            IWETH WETH = IWETH(token1);
            IERC20 token = IERC20(token0);
            token.approve(Constants.UNISWAP_V3_ROUTER, amount0);
            uint256 amountOut = CommonLibrary.swapExactTokenByV3(
                token0,
                token1,
                amount0,
                amountOutMin,
                fee
            );
            require(amountOut >= amountOutMin, "amount less min");
            // WETH.deposit{value: amountOutMin}();
            WETH.transfer(msg.sender, amountOutMin);
        } else {
            IWETH WETH = IWETH(token0);
            IERC20 token = IERC20(token1);
            token.approve(Constants.UNISWAP_V3_ROUTER, amount1);
            uint256 amountOut = CommonLibrary.swapExactTokenByV3(
                token1,
                token0,
                amount1,
                amountOutMin,
                fee
            );
            require(amountOut >= amountOutMin, "amount less min");
            // WETH.deposit{value: amountOutMin}();
            WETH.transfer(msg.sender, amountOutMin);
        }
        // 贿赂矿工
        block.coinbase.transfer(payETHToCoinbase);
    }

    function swapV3ToV2(
        uint256 amountIn,
        address token,
        uint24 fee,
        uint256 payETHToCoinbase
    ) public payable {
        // true的时候,买大的,false的时候,买小的
        // 这个地方是要买token
        bool zeroForOne = Constants.WETH < token;
        uint8 swapType = 6;

        UniswapV3Library.getPool(Constants.WETH, token, fee).swap(
            address(this), // address(0) might cause issues with some tokens
            zeroForOne,
            int256(amountIn),
            zeroForOne
                ? TickMath.MIN_SQRT_RATIO + 1
                : TickMath.MAX_SQRT_RATIO - 1,
            abi.encode(amountIn, token, swapType, payETHToCoinbase)
        );
    }

    function uniswapV3ForV2Callback(
        int256 amount0Delta,
        int256 amount1Delta,
        address token,
        uint256 amountOutMin,
        uint256 payETHToCoinbase
    ) internal {
        IWETH WETH = IWETH(Constants.WETH);
        IERC20 token20 = IERC20(token);

        uint256 amountPay = amount0Delta > 0
            ? uint256(amount0Delta)
            : uint256(amount1Delta);
        uint256 amountTokenOut = amount0Delta > 0
            ? uint256(-amount1Delta)
            : uint256(-amount0Delta);
        token20.approve(Constants.UNISWAP_V2_ROUTER, amountTokenOut);

        uint256 amountEth = CommonLibrary.swapExactTokenByV2(
            amountTokenOut,
            token,
            Constants.WETH
        );
        require(amountEth > amountOutMin, "amount eth overflow");
        require(amountEth > amountPay, "amount eth overflow");
        // WETH.deposit{value: amountPay}();
        WETH.transfer(msg.sender, amountPay);
        block.coinbase.transfer(payETHToCoinbase);
    }
}

File 8 of 34 : IUniswapV3SwapCallback.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Callback for IUniswapV3PoolActions#swap
/// @notice Any contract that calls IUniswapV3PoolActions#swap must implement this interface
interface IUniswapV3SwapCallback {
    /// @notice Called to `msg.sender` after executing a swap via IUniswapV3Pool#swap.
    /// @dev In the implementation you must pay the pool tokens owed for the swap.
    /// The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory.
    /// amount0Delta and amount1Delta can both be 0 if no tokens were swapped.
    /// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by
    /// the end of the swap. If positive, the callback must send that amount of token0 to the pool.
    /// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by
    /// the end of the swap. If positive, the callback must send that amount of token1 to the pool.
    /// @param data Any data passed through by the caller via the IUniswapV3PoolActions#swap call
    function uniswapV3SwapCallback(
        int256 amount0Delta,
        int256 amount1Delta,
        bytes calldata data
    ) external;
}

File 9 of 34 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 10 of 34 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 11 of 34 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../interfaces/IERC20.sol";
import "@openzeppelin/contracts/utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(
            token,
            abi.encodeWithSelector(token.transfer.selector, to, value)
        );
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(
            token,
            abi.encodeWithSelector(token.transferFrom.selector, from, to, value)
        );
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(
            token,
            abi.encodeWithSelector(token.approve.selector, spender, value)
        );
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(
            token,
            abi.encodeWithSelector(
                token.approve.selector,
                spender,
                newAllowance
            )
        );
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(
                oldAllowance >= value,
                "SafeERC20: decreased allowance below zero"
            );
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(
                token,
                abi.encodeWithSelector(
                    token.approve.selector,
                    spender,
                    newAllowance
                )
            );
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(
            data,
            "SafeERC20: low-level call failed"
        );
        if (returndata.length > 0) {
            // Return data is optional
            require(
                abi.decode(returndata, (bool)),
                "SafeERC20: ERC20 operation did not succeed"
            );
        }
    }
}

File 12 of 34 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 13 of 34 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);

    /**
     * @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
    );

    /**
     * @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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from,
        address to,
        uint256 amount
    ) external returns (bool);
}

File 14 of 34 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 15 of 34 : IUniswapV2Router02.sol
pragma solidity >=0.6.2;

import './IUniswapV2Router01.sol';

interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}

File 16 of 34 : UniswapV2Library.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "../interfaces/IUniswapV2Pair.sol";
import "@uniswap/v3-core/contracts/libraries/LowGasSafeMath.sol";

library UniswapV2Library {
    using LowGasSafeMath for uint256;

    // returns sorted token addresses, used to handle return values from pairs sorted in this order
    function sortTokens(address tokenA, address tokenB)
        internal
        pure
        returns (address token0, address token1)
    {
        require(tokenA != tokenB);
        (token0, token1) = tokenA < tokenB
            ? (tokenA, tokenB)
            : (tokenB, tokenA);
        require(token0 != address(0));
    }

    // calculates the CREATE2 address for a pair without making any external calls
    function pairFor(
        address factory,
        address tokenA,
        address tokenB
    ) internal pure returns (address pair) {
        (address token0, address token1) = sortTokens(tokenA, tokenB);
        pair = address(
            uint160(
                uint256(
                    keccak256(
                        abi.encodePacked(
                            hex"ff",
                            factory,
                            keccak256(abi.encodePacked(token0, token1)),
                            hex"96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f" // init code hash
                        )
                    )
                )
            )
        );
    }

    // fetches and sorts the reserves for a pair
    function getReserves(
        address factory,
        address tokenA,
        address tokenB
    ) internal view returns (uint256 reserveToken, uint256 reserveETH) {
        (address token0, ) = sortTokens(tokenA, tokenB);
        (uint256 reserve0, uint256 reserve1, ) = IUniswapV2Pair(
            pairFor(factory, tokenA, tokenB)
        ).getReserves();
        // 如果token < tokenETH的判断
        (reserveToken, reserveETH) = tokenA == token0
            ? (reserve0, reserve1)
            : (reserve1, reserve0);
    }

    // given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset
    function getAmountOut(
        uint256 amountIn,
        uint256 reserveIn,
        uint256 reserveOut
    ) internal pure returns (uint256 amountOut) {
        require(amountIn > 0, "INSUFFICIENT_INPUT_AMOUNT");
        require(reserveIn > 0 && reserveOut > 0);
        uint256 amountInWithFee = amountIn.mul(997);
        uint256 numerator = amountInWithFee.mul(reserveOut);
        uint256 denominator = reserveIn.mul(1000).add(amountInWithFee);
        amountOut = numerator / denominator;
    }
}

File 17 of 34 : SushiSwapLibrary.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.8.0;

import "../interfaces/ISushiSwapPair.sol";
import "@uniswap/v3-core/contracts/libraries/LowGasSafeMath.sol";

library SushiSwapLibrary {
    using LowGasSafeMath for uint256;

    // returns sorted token addresses, used to handle return values from pairs sorted in this order
    function sortTokens(address tokenA, address tokenB)
        internal
        pure
        returns (address token0, address token1)
    {
        require(tokenA != tokenB, "UniswapV2Library: IDENTICAL_ADDRESSES");
        (token0, token1) = tokenA < tokenB
            ? (tokenA, tokenB)
            : (tokenB, tokenA);
        require(token0 != address(0), "UniswapV2Library: ZERO_ADDRESS");
    }

    // calculates the CREATE2 address for a pair without making any external calls
    function pairFor(
        address factory,
        address tokenA,
        address tokenB
    ) internal pure returns (address pair) {
        (address token0, address token1) = sortTokens(tokenA, tokenB);
        pair = address(
            uint160(
                uint256(
                    keccak256(
                        abi.encodePacked(
                            hex"ff",
                            factory,
                            keccak256(abi.encodePacked(token0, token1)),
                            hex"e18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303" // init code hash
                        )
                    )
                )
            )
        );
    }

    // fetches and sorts the reserves for a pair
    function getReserves(
        address factory,
        address tokenA,
        address tokenB
    ) internal view returns (uint256 reserveToken, uint256 reserveETH) {
        (address token0, ) = sortTokens(tokenA, tokenB);
        (uint256 reserve0, uint256 reserve1, ) = ISushiSwapPair(
            pairFor(factory, tokenA, tokenB)
        ).getReserves();
        (reserveToken, reserveETH) = token0 == tokenA
            ? (reserve0, reserve1)
            : (reserve1, reserve0);
    }

    // given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset
    function getAmountOut(
        uint256 amountIn,
        uint256 reserveIn,
        uint256 reserveOut
    ) internal pure returns (uint256 amountOut) {
        require(amountIn > 0, "UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT");
        require(
            reserveIn > 0 && reserveOut > 0,
            "UniswapV2Library: INSUFFICIENT_LIQUIDITY"
        );
        uint256 amountInWithFee = amountIn.mul(997);
        uint256 numerator = amountInWithFee.mul(reserveOut);
        uint256 denominator = reserveIn.mul(1000).add(amountInWithFee);
        amountOut = numerator / denominator;
    }
}

File 18 of 34 : CommonLibrary.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol";
import "../constants/Constants.sol";

library CommonLibrary {
    function swapExactTokenBySushi(
        uint256 amountIn,
        address tokenA,
        address tokenB
    ) internal returns (uint256 amountToken) {
        address[] memory path = new address[](2);
        path[0] = tokenA;
        path[1] = tokenB;
        uint256[] memory amounts = IUniswapV2Router02(Constants.SUSHI_ROUTER)
            .swapExactTokensForTokens(
                amountIn,
                uint256(0),
                path,
                address(this),
                block.timestamp
            );
        amountToken = amounts[amounts.length - 1];
    }

    function swapExactTokenByV2(
        uint256 amountIn,
        address tokenA,
        address tokenB
    ) public returns (uint256 amountToken) {
        address[] memory path = new address[](2);
        path[0] = tokenA;
        path[1] = tokenB;
        uint256[] memory amounts = IUniswapV2Router02(
            Constants.UNISWAP_V2_ROUTER
        ).swapExactTokensForTokens(
                amountIn,
                uint256(0),
                path,
                address(this),
                block.timestamp
            );
        amountToken = amounts[amounts.length - 1];
    }

    function swapExactTokenByV3(
        address tokenIn,
        address tokenOut,
        uint256 amountIn,
        uint256 amountOutMin,
        uint24 fee
    ) internal returns (uint256 amountToken) {
        ISwapRouter swapRouter = ISwapRouter(Constants.UNISWAP_V3_ROUTER);
        amountToken = swapRouter.exactInputSingle(
            ISwapRouter.ExactInputSingleParams({
                tokenIn: tokenIn,
                tokenOut: tokenOut,
                fee: fee,
                recipient: address(this),
                deadline: block.timestamp,
                amountIn: amountIn,
                amountOutMinimum: amountOutMin,
                sqrtPriceLimitX96: 0
            })
        );
    }
}

File 19 of 34 : Constants.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/// @notice Constant state used by the swap router
library Constants {
    address internal constant SUSHI_FACTORY =
        0xC0AEe478e3658e2610c5F7A4A2E1777cE9e4f2Ac;
    address internal constant SUSHI_ROUTER =
        0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F;

    address internal constant UNISWAP_V2_FACTORY =
        0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f;
    address internal constant UNISWAP_V2_ROUTER =
        0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;

    address internal constant UNISWAP_V3_FACTORY =
        0x1F98431c8aD98523631AE4a59f267346ea31F984;
    address internal constant UNISWAP_V3_ROUTER =
        0xE592427A0AEce92De3Edee1F18E0157C05861564;

    address internal constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
}

File 20 of 34 : WETH.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IWETH {
    function deposit() external payable;

    function transfer(address to, uint256 value) external returns (bool);

    function withdraw(uint256) external;
}

File 21 of 34 : IUniswapV2Router01.sol
pragma solidity >=0.6.2;

interface IUniswapV2Router01 {
    function factory() external pure returns (address);
    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountETH);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}

File 22 of 34 : IUniswapV2Pair.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma abicoder v2;

interface IUniswapV2Pair {
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );
    event Transfer(address indexed from, address indexed to, uint256 value);

    function name() external pure returns (string memory);

    function symbol() external pure returns (string memory);

    function decimals() external pure returns (uint8);

    function totalSupply() external view returns (uint256);

    function balanceOf(address owner) external view returns (uint256);

    function allowance(address owner, address spender)
        external
        view
        returns (uint256);

    function approve(address spender, uint256 value) external returns (bool);

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);

    function PERMIT_TYPEHASH() external pure returns (bytes32);

    function nonces(address owner) external view returns (uint256);

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    event Mint(address indexed sender, uint256 amount0, uint256 amount1);
    event Burn(
        address indexed sender,
        uint256 amount0,
        uint256 amount1,
        address indexed to
    );
    event Swap(
        address indexed sender,
        uint256 amount0In,
        uint256 amount1In,
        uint256 amount0Out,
        uint256 amount1Out,
        address indexed to
    );
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint256);

    function factory() external view returns (address);

    function token0() external view returns (address);

    function token1() external view returns (address);

    function getReserves()
        external
        view
        returns (
            uint112 reserve0,
            uint112 reserve1,
            uint32 blockTimestampLast
        );

    function price0CumulativeLast() external view returns (uint256);

    function price1CumulativeLast() external view returns (uint256);

    function kLast() external view returns (uint256);

    function mint(address to) external returns (uint256 liquidity);

    function burn(address to)
        external
        returns (uint256 amount0, uint256 amount1);

    function swap(
        uint256 amount0Out,
        uint256 amount1Out,
        address to,
        bytes calldata data
    ) external;

    function skim(address to) external;

    function sync() external;

    function initialize(address, address) external;
}

File 23 of 34 : LowGasSafeMath.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.7.0;

/// @title Optimized overflow and underflow safe math operations
/// @notice Contains methods for doing math operations that revert on overflow or underflow for minimal gas cost
library LowGasSafeMath {
    /// @notice Returns x + y, reverts if sum overflows uint256
    /// @param x The augend
    /// @param y The addend
    /// @return z The sum of x and y
    function add(uint256 x, uint256 y) internal pure returns (uint256 z) {
        require((z = x + y) >= x);
    }

    /// @notice Returns x - y, reverts if underflows
    /// @param x The minuend
    /// @param y The subtrahend
    /// @return z The difference of x and y
    function sub(uint256 x, uint256 y) internal pure returns (uint256 z) {
        require((z = x - y) <= x);
    }

    /// @notice Returns x * y, reverts if overflows
    /// @param x The multiplicand
    /// @param y The multiplier
    /// @return z The product of x and y
    function mul(uint256 x, uint256 y) internal pure returns (uint256 z) {
        require(x == 0 || (z = x * y) / x == y);
    }

    /// @notice Returns x + y, reverts if overflows or underflows
    /// @param x The augend
    /// @param y The addend
    /// @return z The sum of x and y
    function add(int256 x, int256 y) internal pure returns (int256 z) {
        require((z = x + y) >= x == (y >= 0));
    }

    /// @notice Returns x - y, reverts if overflows or underflows
    /// @param x The minuend
    /// @param y The subtrahend
    /// @return z The difference of x and y
    function sub(int256 x, int256 y) internal pure returns (int256 z) {
        require((z = x - y) <= x == (y >= 0));
    }
}

File 24 of 34 : ISushiSwapPair.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.8.0;

interface ISushiSwapPair {
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );
    event Transfer(address indexed from, address indexed to, uint256 value);

    function name() external pure returns (string memory);

    function symbol() external pure returns (string memory);

    function decimals() external pure returns (uint8);

    function totalSupply() external view returns (uint256);

    function balanceOf(address owner) external view returns (uint256);

    function allowance(address owner, address spender)
        external
        view
        returns (uint256);

    function approve(address spender, uint256 value) external returns (bool);

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);

    function PERMIT_TYPEHASH() external pure returns (bytes32);

    function nonces(address owner) external view returns (uint256);

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    event Mint(address indexed sender, uint256 amount0, uint256 amount1);
    event Burn(
        address indexed sender,
        uint256 amount0,
        uint256 amount1,
        address indexed to
    );
    event Swap(
        address indexed sender,
        uint256 amount0In,
        uint256 amount1In,
        uint256 amount0Out,
        uint256 amount1Out,
        address indexed to
    );
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint256);

    function factory() external view returns (address);

    function token0() external view returns (address);

    function token1() external view returns (address);

    function getReserves()
        external
        view
        returns (
            uint112 reserve0,
            uint112 reserve1,
            uint32 blockTimestampLast
        );

    function price0CumulativeLast() external view returns (uint256);

    function price1CumulativeLast() external view returns (uint256);

    function kLast() external view returns (uint256);

    function mint(address to) external returns (uint256 liquidity);

    function burn(address to)
        external
        returns (uint256 amount0, uint256 amount1);

    function swap(
        uint256 amount0Out,
        uint256 amount1Out,
        address to,
        bytes calldata data
    ) external;

    function skim(address to) external;

    function sync() external;

    function initialize(address, address) external;
}

File 25 of 34 : IUniswapV3Pool.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

import './pool/IUniswapV3PoolImmutables.sol';
import './pool/IUniswapV3PoolState.sol';
import './pool/IUniswapV3PoolDerivedState.sol';
import './pool/IUniswapV3PoolActions.sol';
import './pool/IUniswapV3PoolOwnerActions.sol';
import './pool/IUniswapV3PoolEvents.sol';

/// @title The interface for a Uniswap V3 Pool
/// @notice A Uniswap pool facilitates swapping and automated market making between any two assets that strictly conform
/// to the ERC20 specification
/// @dev The pool interface is broken up into many smaller pieces
interface IUniswapV3Pool is
    IUniswapV3PoolImmutables,
    IUniswapV3PoolState,
    IUniswapV3PoolDerivedState,
    IUniswapV3PoolActions,
    IUniswapV3PoolOwnerActions,
    IUniswapV3PoolEvents
{

}

File 26 of 34 : PoolAddress.sol
// SPDX-License-Identifier: MIT-License
pragma solidity ^0.8.0;

/// @title Provides functions for deriving a pool address from the factory, tokens, and the fee
library PoolAddress {
    bytes32 internal constant POOL_INIT_CODE_HASH =
        0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54;

    /// @notice The identifying key of the pool
    struct PoolKey {
        address token0;
        address token1;
        uint24 fee;
    }

    /// @notice Returns PoolKey: the ordered tokens with the matched fee levels
    /// @param tokenA The first token of a pool, unsorted
    /// @param tokenB The second token of a pool, unsorted
    /// @param fee The fee level of the pool
    /// @return Poolkey The pool details with ordered token0 and token1 assignments
    function getPoolKey(
        address tokenA,
        address tokenB,
        uint24 fee
    ) internal pure returns (PoolKey memory) {
        if (tokenA > tokenB) (tokenA, tokenB) = (tokenB, tokenA);
        return PoolKey({token0: tokenA, token1: tokenB, fee: fee});
    }

    /// @notice Deterministically computes the pool address given the factory and PoolKey
    /// @param factory The Uniswap V3 factory contract address
    /// @param key The PoolKey
    /// @return pool The contract address of the V3 pool
    function computeAddress(address factory, PoolKey memory key)
        internal
        pure
        returns (address pool)
    {
        require(key.token0 < key.token1);
        pool = address(
            uint160(
                uint256(
                    keccak256(
                        abi.encodePacked(
                            hex"ff",
                            factory,
                            keccak256(
                                abi.encode(key.token0, key.token1, key.fee)
                            ),
                            POOL_INIT_CODE_HASH
                        )
                    )
                )
            )
        );
    }
}

File 27 of 34 : TickMath.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/// @title Math library for computing sqrt prices from ticks and vice versa
/// @notice Computes sqrt price for ticks of size 1.0001, i.e. sqrt(1.0001^tick) as fixed point Q64.96 numbers. Supports
/// prices between 2**-128 and 2**128
library TickMath {
    /// @dev The minimum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MIN_TICK)
    uint160 internal constant MIN_SQRT_RATIO = 4295128739;
    /// @dev The maximum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MAX_TICK)
    uint160 internal constant MAX_SQRT_RATIO =
        1461446703485210103287273052203988822378723970342;
}

File 28 of 34 : IUniswapV3PoolImmutables.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Pool state that never changes
/// @notice These parameters are fixed for a pool forever, i.e., the methods will always return the same values
interface IUniswapV3PoolImmutables {
    /// @notice The contract that deployed the pool, which must adhere to the IUniswapV3Factory interface
    /// @return The contract address
    function factory() external view returns (address);

    /// @notice The first of the two tokens of the pool, sorted by address
    /// @return The token contract address
    function token0() external view returns (address);

    /// @notice The second of the two tokens of the pool, sorted by address
    /// @return The token contract address
    function token1() external view returns (address);

    /// @notice The pool's fee in hundredths of a bip, i.e. 1e-6
    /// @return The fee
    function fee() external view returns (uint24);

    /// @notice The pool tick spacing
    /// @dev Ticks can only be used at multiples of this value, minimum of 1 and always positive
    /// e.g.: a tickSpacing of 3 means ticks can be initialized every 3rd tick, i.e., ..., -6, -3, 0, 3, 6, ...
    /// This value is an int24 to avoid casting even though it is always positive.
    /// @return The tick spacing
    function tickSpacing() external view returns (int24);

    /// @notice The maximum amount of position liquidity that can use any tick in the range
    /// @dev This parameter is enforced per tick to prevent liquidity from overflowing a uint128 at any point, and
    /// also prevents out-of-range liquidity from being used to prevent adding in-range liquidity to a pool
    /// @return The max amount of liquidity per tick
    function maxLiquidityPerTick() external view returns (uint128);
}

File 29 of 34 : IUniswapV3PoolState.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Pool state that can change
/// @notice These methods compose the pool's state, and can change with any frequency including multiple times
/// per transaction
interface IUniswapV3PoolState {
    /// @notice The 0th storage slot in the pool stores many values, and is exposed as a single method to save gas
    /// when accessed externally.
    /// @return sqrtPriceX96 The current price of the pool as a sqrt(token1/token0) Q64.96 value
    /// tick The current tick of the pool, i.e. according to the last tick transition that was run.
    /// This value may not always be equal to SqrtTickMath.getTickAtSqrtRatio(sqrtPriceX96) if the price is on a tick
    /// boundary.
    /// observationIndex The index of the last oracle observation that was written,
    /// observationCardinality The current maximum number of observations stored in the pool,
    /// observationCardinalityNext The next maximum number of observations, to be updated when the observation.
    /// feeProtocol The protocol fee for both tokens of the pool.
    /// Encoded as two 4 bit values, where the protocol fee of token1 is shifted 4 bits and the protocol fee of token0
    /// is the lower 4 bits. Used as the denominator of a fraction of the swap fee, e.g. 4 means 1/4th of the swap fee.
    /// unlocked Whether the pool is currently locked to reentrancy
    function slot0()
        external
        view
        returns (
            uint160 sqrtPriceX96,
            int24 tick,
            uint16 observationIndex,
            uint16 observationCardinality,
            uint16 observationCardinalityNext,
            uint8 feeProtocol,
            bool unlocked
        );

    /// @notice The fee growth as a Q128.128 fees of token0 collected per unit of liquidity for the entire life of the pool
    /// @dev This value can overflow the uint256
    function feeGrowthGlobal0X128() external view returns (uint256);

    /// @notice The fee growth as a Q128.128 fees of token1 collected per unit of liquidity for the entire life of the pool
    /// @dev This value can overflow the uint256
    function feeGrowthGlobal1X128() external view returns (uint256);

    /// @notice The amounts of token0 and token1 that are owed to the protocol
    /// @dev Protocol fees will never exceed uint128 max in either token
    function protocolFees() external view returns (uint128 token0, uint128 token1);

    /// @notice The currently in range liquidity available to the pool
    /// @dev This value has no relationship to the total liquidity across all ticks
    function liquidity() external view returns (uint128);

    /// @notice Look up information about a specific tick in the pool
    /// @param tick The tick to look up
    /// @return liquidityGross the total amount of position liquidity that uses the pool either as tick lower or
    /// tick upper,
    /// liquidityNet how much liquidity changes when the pool price crosses the tick,
    /// feeGrowthOutside0X128 the fee growth on the other side of the tick from the current tick in token0,
    /// feeGrowthOutside1X128 the fee growth on the other side of the tick from the current tick in token1,
    /// tickCumulativeOutside the cumulative tick value on the other side of the tick from the current tick
    /// secondsPerLiquidityOutsideX128 the seconds spent per liquidity on the other side of the tick from the current tick,
    /// secondsOutside the seconds spent on the other side of the tick from the current tick,
    /// initialized Set to true if the tick is initialized, i.e. liquidityGross is greater than 0, otherwise equal to false.
    /// Outside values can only be used if the tick is initialized, i.e. if liquidityGross is greater than 0.
    /// In addition, these values are only relative and must be used only in comparison to previous snapshots for
    /// a specific position.
    function ticks(int24 tick)
        external
        view
        returns (
            uint128 liquidityGross,
            int128 liquidityNet,
            uint256 feeGrowthOutside0X128,
            uint256 feeGrowthOutside1X128,
            int56 tickCumulativeOutside,
            uint160 secondsPerLiquidityOutsideX128,
            uint32 secondsOutside,
            bool initialized
        );

    /// @notice Returns 256 packed tick initialized boolean values. See TickBitmap for more information
    function tickBitmap(int16 wordPosition) external view returns (uint256);

    /// @notice Returns the information about a position by the position's key
    /// @param key The position's key is a hash of a preimage composed by the owner, tickLower and tickUpper
    /// @return _liquidity The amount of liquidity in the position,
    /// Returns feeGrowthInside0LastX128 fee growth of token0 inside the tick range as of the last mint/burn/poke,
    /// Returns feeGrowthInside1LastX128 fee growth of token1 inside the tick range as of the last mint/burn/poke,
    /// Returns tokensOwed0 the computed amount of token0 owed to the position as of the last mint/burn/poke,
    /// Returns tokensOwed1 the computed amount of token1 owed to the position as of the last mint/burn/poke
    function positions(bytes32 key)
        external
        view
        returns (
            uint128 _liquidity,
            uint256 feeGrowthInside0LastX128,
            uint256 feeGrowthInside1LastX128,
            uint128 tokensOwed0,
            uint128 tokensOwed1
        );

    /// @notice Returns data about a specific observation index
    /// @param index The element of the observations array to fetch
    /// @dev You most likely want to use #observe() instead of this method to get an observation as of some amount of time
    /// ago, rather than at a specific index in the array.
    /// @return blockTimestamp The timestamp of the observation,
    /// Returns tickCumulative the tick multiplied by seconds elapsed for the life of the pool as of the observation timestamp,
    /// Returns secondsPerLiquidityCumulativeX128 the seconds per in range liquidity for the life of the pool as of the observation timestamp,
    /// Returns initialized whether the observation has been initialized and the values are safe to use
    function observations(uint256 index)
        external
        view
        returns (
            uint32 blockTimestamp,
            int56 tickCumulative,
            uint160 secondsPerLiquidityCumulativeX128,
            bool initialized
        );
}

File 30 of 34 : IUniswapV3PoolDerivedState.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Pool state that is not stored
/// @notice Contains view functions to provide information about the pool that is computed rather than stored on the
/// blockchain. The functions here may have variable gas costs.
interface IUniswapV3PoolDerivedState {
    /// @notice Returns the cumulative tick and liquidity as of each timestamp `secondsAgo` from the current block timestamp
    /// @dev To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing
    /// the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick,
    /// you must call it with secondsAgos = [3600, 0].
    /// @dev The time weighted average tick represents the geometric time weighted average price of the pool, in
    /// log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio.
    /// @param secondsAgos From how long ago each cumulative tick and liquidity value should be returned
    /// @return tickCumulatives Cumulative tick values as of each `secondsAgos` from the current block timestamp
    /// @return secondsPerLiquidityCumulativeX128s Cumulative seconds per liquidity-in-range value as of each `secondsAgos` from the current block
    /// timestamp
    function observe(uint32[] calldata secondsAgos)
        external
        view
        returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s);

    /// @notice Returns a snapshot of the tick cumulative, seconds per liquidity and seconds inside a tick range
    /// @dev Snapshots must only be compared to other snapshots, taken over a period for which a position existed.
    /// I.e., snapshots cannot be compared if a position is not held for the entire period between when the first
    /// snapshot is taken and the second snapshot is taken.
    /// @param tickLower The lower tick of the range
    /// @param tickUpper The upper tick of the range
    /// @return tickCumulativeInside The snapshot of the tick accumulator for the range
    /// @return secondsPerLiquidityInsideX128 The snapshot of seconds per liquidity for the range
    /// @return secondsInside The snapshot of seconds per liquidity for the range
    function snapshotCumulativesInside(int24 tickLower, int24 tickUpper)
        external
        view
        returns (
            int56 tickCumulativeInside,
            uint160 secondsPerLiquidityInsideX128,
            uint32 secondsInside
        );
}

File 31 of 34 : IUniswapV3PoolActions.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Permissionless pool actions
/// @notice Contains pool methods that can be called by anyone
interface IUniswapV3PoolActions {
    /// @notice Sets the initial price for the pool
    /// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value
    /// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96
    function initialize(uint160 sqrtPriceX96) external;

    /// @notice Adds liquidity for the given recipient/tickLower/tickUpper position
    /// @dev The caller of this method receives a callback in the form of IUniswapV3MintCallback#uniswapV3MintCallback
    /// in which they must pay any token0 or token1 owed for the liquidity. The amount of token0/token1 due depends
    /// on tickLower, tickUpper, the amount of liquidity, and the current price.
    /// @param recipient The address for which the liquidity will be created
    /// @param tickLower The lower tick of the position in which to add liquidity
    /// @param tickUpper The upper tick of the position in which to add liquidity
    /// @param amount The amount of liquidity to mint
    /// @param data Any data that should be passed through to the callback
    /// @return amount0 The amount of token0 that was paid to mint the given amount of liquidity. Matches the value in the callback
    /// @return amount1 The amount of token1 that was paid to mint the given amount of liquidity. Matches the value in the callback
    function mint(
        address recipient,
        int24 tickLower,
        int24 tickUpper,
        uint128 amount,
        bytes calldata data
    ) external returns (uint256 amount0, uint256 amount1);

    /// @notice Collects tokens owed to a position
    /// @dev Does not recompute fees earned, which must be done either via mint or burn of any amount of liquidity.
    /// Collect must be called by the position owner. To withdraw only token0 or only token1, amount0Requested or
    /// amount1Requested may be set to zero. To withdraw all tokens owed, caller may pass any value greater than the
    /// actual tokens owed, e.g. type(uint128).max. Tokens owed may be from accumulated swap fees or burned liquidity.
    /// @param recipient The address which should receive the fees collected
    /// @param tickLower The lower tick of the position for which to collect fees
    /// @param tickUpper The upper tick of the position for which to collect fees
    /// @param amount0Requested How much token0 should be withdrawn from the fees owed
    /// @param amount1Requested How much token1 should be withdrawn from the fees owed
    /// @return amount0 The amount of fees collected in token0
    /// @return amount1 The amount of fees collected in token1
    function collect(
        address recipient,
        int24 tickLower,
        int24 tickUpper,
        uint128 amount0Requested,
        uint128 amount1Requested
    ) external returns (uint128 amount0, uint128 amount1);

    /// @notice Burn liquidity from the sender and account tokens owed for the liquidity to the position
    /// @dev Can be used to trigger a recalculation of fees owed to a position by calling with an amount of 0
    /// @dev Fees must be collected separately via a call to #collect
    /// @param tickLower The lower tick of the position for which to burn liquidity
    /// @param tickUpper The upper tick of the position for which to burn liquidity
    /// @param amount How much liquidity to burn
    /// @return amount0 The amount of token0 sent to the recipient
    /// @return amount1 The amount of token1 sent to the recipient
    function burn(
        int24 tickLower,
        int24 tickUpper,
        uint128 amount
    ) external returns (uint256 amount0, uint256 amount1);

    /// @notice Swap token0 for token1, or token1 for token0
    /// @dev The caller of this method receives a callback in the form of IUniswapV3SwapCallback#uniswapV3SwapCallback
    /// @param recipient The address to receive the output of the swap
    /// @param zeroForOne The direction of the swap, true for token0 to token1, false for token1 to token0
    /// @param amountSpecified The amount of the swap, which implicitly configures the swap as exact input (positive), or exact output (negative)
    /// @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this
    /// value after the swap. If one for zero, the price cannot be greater than this value after the swap
    /// @param data Any data to be passed through to the callback
    /// @return amount0 The delta of the balance of token0 of the pool, exact when negative, minimum when positive
    /// @return amount1 The delta of the balance of token1 of the pool, exact when negative, minimum when positive
    function swap(
        address recipient,
        bool zeroForOne,
        int256 amountSpecified,
        uint160 sqrtPriceLimitX96,
        bytes calldata data
    ) external returns (int256 amount0, int256 amount1);

    /// @notice Receive token0 and/or token1 and pay it back, plus a fee, in the callback
    /// @dev The caller of this method receives a callback in the form of IUniswapV3FlashCallback#uniswapV3FlashCallback
    /// @dev Can be used to donate underlying tokens pro-rata to currently in-range liquidity providers by calling
    /// with 0 amount{0,1} and sending the donation amount(s) from the callback
    /// @param recipient The address which will receive the token0 and token1 amounts
    /// @param amount0 The amount of token0 to send
    /// @param amount1 The amount of token1 to send
    /// @param data Any data to be passed through to the callback
    function flash(
        address recipient,
        uint256 amount0,
        uint256 amount1,
        bytes calldata data
    ) external;

    /// @notice Increase the maximum number of price and liquidity observations that this pool will store
    /// @dev This method is no-op if the pool already has an observationCardinalityNext greater than or equal to
    /// the input observationCardinalityNext.
    /// @param observationCardinalityNext The desired minimum number of observations for the pool to store
    function increaseObservationCardinalityNext(uint16 observationCardinalityNext) external;
}

File 32 of 34 : IUniswapV3PoolOwnerActions.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Permissioned pool actions
/// @notice Contains pool methods that may only be called by the factory owner
interface IUniswapV3PoolOwnerActions {
    /// @notice Set the denominator of the protocol's % share of the fees
    /// @param feeProtocol0 new protocol fee for token0 of the pool
    /// @param feeProtocol1 new protocol fee for token1 of the pool
    function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) external;

    /// @notice Collect the protocol fee accrued to the pool
    /// @param recipient The address to which collected protocol fees should be sent
    /// @param amount0Requested The maximum amount of token0 to send, can be 0 to collect fees in only token1
    /// @param amount1Requested The maximum amount of token1 to send, can be 0 to collect fees in only token0
    /// @return amount0 The protocol fee collected in token0
    /// @return amount1 The protocol fee collected in token1
    function collectProtocol(
        address recipient,
        uint128 amount0Requested,
        uint128 amount1Requested
    ) external returns (uint128 amount0, uint128 amount1);
}

File 33 of 34 : IUniswapV3PoolEvents.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Events emitted by a pool
/// @notice Contains all events emitted by the pool
interface IUniswapV3PoolEvents {
    /// @notice Emitted exactly once by a pool when #initialize is first called on the pool
    /// @dev Mint/Burn/Swap cannot be emitted by the pool before Initialize
    /// @param sqrtPriceX96 The initial sqrt price of the pool, as a Q64.96
    /// @param tick The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool
    event Initialize(uint160 sqrtPriceX96, int24 tick);

    /// @notice Emitted when liquidity is minted for a given position
    /// @param sender The address that minted the liquidity
    /// @param owner The owner of the position and recipient of any minted liquidity
    /// @param tickLower The lower tick of the position
    /// @param tickUpper The upper tick of the position
    /// @param amount The amount of liquidity minted to the position range
    /// @param amount0 How much token0 was required for the minted liquidity
    /// @param amount1 How much token1 was required for the minted liquidity
    event Mint(
        address sender,
        address indexed owner,
        int24 indexed tickLower,
        int24 indexed tickUpper,
        uint128 amount,
        uint256 amount0,
        uint256 amount1
    );

    /// @notice Emitted when fees are collected by the owner of a position
    /// @dev Collect events may be emitted with zero amount0 and amount1 when the caller chooses not to collect fees
    /// @param owner The owner of the position for which fees are collected
    /// @param tickLower The lower tick of the position
    /// @param tickUpper The upper tick of the position
    /// @param amount0 The amount of token0 fees collected
    /// @param amount1 The amount of token1 fees collected
    event Collect(
        address indexed owner,
        address recipient,
        int24 indexed tickLower,
        int24 indexed tickUpper,
        uint128 amount0,
        uint128 amount1
    );

    /// @notice Emitted when a position's liquidity is removed
    /// @dev Does not withdraw any fees earned by the liquidity position, which must be withdrawn via #collect
    /// @param owner The owner of the position for which liquidity is removed
    /// @param tickLower The lower tick of the position
    /// @param tickUpper The upper tick of the position
    /// @param amount The amount of liquidity to remove
    /// @param amount0 The amount of token0 withdrawn
    /// @param amount1 The amount of token1 withdrawn
    event Burn(
        address indexed owner,
        int24 indexed tickLower,
        int24 indexed tickUpper,
        uint128 amount,
        uint256 amount0,
        uint256 amount1
    );

    /// @notice Emitted by the pool for any swaps between token0 and token1
    /// @param sender The address that initiated the swap call, and that received the callback
    /// @param recipient The address that received the output of the swap
    /// @param amount0 The delta of the token0 balance of the pool
    /// @param amount1 The delta of the token1 balance of the pool
    /// @param sqrtPriceX96 The sqrt(price) of the pool after the swap, as a Q64.96
    /// @param liquidity The liquidity of the pool after the swap
    /// @param tick The log base 1.0001 of price of the pool after the swap
    event Swap(
        address indexed sender,
        address indexed recipient,
        int256 amount0,
        int256 amount1,
        uint160 sqrtPriceX96,
        uint128 liquidity,
        int24 tick
    );

    /// @notice Emitted by the pool for any flashes of token0/token1
    /// @param sender The address that initiated the swap call, and that received the callback
    /// @param recipient The address that received the tokens from flash
    /// @param amount0 The amount of token0 that was flashed
    /// @param amount1 The amount of token1 that was flashed
    /// @param paid0 The amount of token0 paid for the flash, which can exceed the amount0 plus the fee
    /// @param paid1 The amount of token1 paid for the flash, which can exceed the amount1 plus the fee
    event Flash(
        address indexed sender,
        address indexed recipient,
        uint256 amount0,
        uint256 amount1,
        uint256 paid0,
        uint256 paid1
    );

    /// @notice Emitted by the pool for increases to the number of observations that can be stored
    /// @dev observationCardinalityNext is not the observation cardinality until an observation is written at the index
    /// just before a mint/swap/burn.
    /// @param observationCardinalityNextOld The previous value of the next observation cardinality
    /// @param observationCardinalityNextNew The updated value of the next observation cardinality
    event IncreaseObservationCardinalityNext(
        uint16 observationCardinalityNextOld,
        uint16 observationCardinalityNextNew
    );

    /// @notice Emitted when the protocol fee is changed by the pool
    /// @param feeProtocol0Old The previous value of the token0 protocol fee
    /// @param feeProtocol1Old The previous value of the token1 protocol fee
    /// @param feeProtocol0New The updated value of the token0 protocol fee
    /// @param feeProtocol1New The updated value of the token1 protocol fee
    event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New);

    /// @notice Emitted when the collected protocol fees are withdrawn by the factory owner
    /// @param sender The address that collects the protocol fees
    /// @param recipient The address that receives the collected protocol fees
    /// @param amount0 The amount of token0 protocol fees that is withdrawn
    /// @param amount0 The amount of token1 protocol fees that is withdrawn
    event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1);
}

File 34 of 34 : UniswapV3Library.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./PoolAddress.sol";
import "@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol";
import "../constants/Constants.sol";

library UniswapV3Library {
    function getPool(
        address tokenA,
        address tokenB,
        uint24 fee
    ) internal pure returns (IUniswapV3Pool) {
        return
            IUniswapV3Pool(
                PoolAddress.computeAddress(
                    Constants.UNISWAP_V3_FACTORY,
                    PoolAddress.getPoolKey(tokenA, tokenB, fee)
                )
            );
    }
}

Settings
{
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {
    "contracts/libs/CommonLibrary.sol": {
      "CommonLibrary": "0x2725b420b8712f1102048b3b087ce0a9008bb281"
    }
  }
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"AccountLog","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amountEth","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amonutOut","type":"uint256"}],"name":"SushiLog","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawETH","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawal","type":"event"},{"inputs":[],"name":"getEthBalance","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"payETHToCoinbase","type":"uint256"}],"name":"swapSushiToV2","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"uint256","name":"payETHToCoinbase","type":"uint256"}],"name":"swapSushiToV3","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"payETHToCoinbase","type":"uint256"}],"name":"swapV2ToSushi","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"uint256","name":"payETHToCoinbase","type":"uint256"}],"name":"swapV2ToV3","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"uint256","name":"payETHToCoinbase","type":"uint256"}],"name":"swapV3ToSushi","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"uint256","name":"payETHToCoinbase","type":"uint256"}],"name":"swapV3ToV2","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"uniswapV2Call","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int256","name":"amount0Delta","type":"int256"},{"internalType":"int256","name":"amount1Delta","type":"int256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"uniswapV3SwapCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"bool","name":"zeroForOne","type":"bool"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"payETHToCoinbase","type":"uint256"}],"name":"useFlashSwapExactTokenBySushi","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"bool","name":"zeroForOne","type":"bool"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"payETHToCoinbase","type":"uint256"}],"name":"useFlashSwapExactTokenByV2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b5062000032620000266200003f60201b60201c565b6200004760201b60201c565b600180819055506200010b565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6158d2806200011b6000396000f3fe6080604052600436106100f75760003560e01c80637c946cbf1161008a578063d734fbbd11610059578063d734fbbd146102d7578063f14210a6146102f3578063f2fde38b1461031c578063fa461e331461034557610135565b80637c946cbf1461024b57806388bee550146102675780638da5cb5b14610283578063c2a11f1b146102ae57610135565b806356d0de5f116100c657806356d0de5f146101d157806370ed0ada146101ed578063715018a61461021857806376a6b8171461022f57610135565b806301e336671461013a57806310d1e85c14610163578063199b05961461018c5780632f0a4db2146101a857610135565b36610135577fb68e3ddd778f4ac57bb0ea89388354e7b87a251efb2e81b8f0682c0cc4eb7dab3460405161012b9190613c3c565b60405180910390a1005b600080fd5b34801561014657600080fd5b50610161600480360381019061015c9190613d33565b61036e565b005b34801561016f57600080fd5b5061018a60048036038101906101859190613deb565b610558565b005b6101a660048036038101906101a19190613eae565b6105e2565b005b3480156101b457600080fd5b506101cf60048036038101906101ca9190613f4d565b61068a565b005b6101eb60048036038101906101e69190613fc8565b610818565b005b3480156101f957600080fd5b506102026108be565b60405161020f9190613c3c565b60405180910390f35b34801561022457600080fd5b5061022d6108c6565b005b61024960048036038101906102449190613eae565b61094e565b005b61026560048036038101906102609190613eae565b6109f6565b005b610281600480360381019061027c9190613eae565b610b50565b005b34801561028f57600080fd5b50610298610caa565b6040516102a5919061402a565b60405180910390f35b3480156102ba57600080fd5b506102d560048036038101906102d09190613f4d565b610cd3565b005b6102f160048036038101906102ec9190613fc8565b610e61565b005b3480156102ff57600080fd5b5061031a60048036038101906103159190614045565b610f07565b005b34801561032857600080fd5b50610343600480360381019061033e9190614072565b6110b9565b005b34801561035157600080fd5b5061036c600480360381019061036791906140d5565b6111b0565b005b610376611209565b73ffffffffffffffffffffffffffffffffffffffff16610394610caa565b73ffffffffffffffffffffffffffffffffffffffff16146103ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103e1906141a6565b60405180910390fd5b60026001540361042f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161042690614212565b60405180910390fd5b6002600181905550808373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610471919061402a565b602060405180830381865afa15801561048e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b29190614247565b10156104f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104ea906142c0565b60405180910390fd5b6104fe838383611211565b8173ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65826040516105449190613c3c565b60405180910390a260018081905550505050565b600080600080858581019061056d9190614319565b935093509350935060018360ff160361058d5761058c84898984611297565b5b60028360ff16036105a5576105a4848989846116e5565b5b60038360ff16036105be576105bd8489898486611c15565b5b60048360ff16036105d7576105d68489898486612040565b5b505050505050505050565b600073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1610905060008061065f73c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28861246b565b91509150600061067088848461256e565b90506106808189868a8a8a612674565b5050505050505050565b600060019050600085826000856040516020016106aa94939291906143d4565b6040516020818303038152906040529050841561076a576106f4735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f8573c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2612802565b73ffffffffffffffffffffffffffffffffffffffff1663022c0d9f88600030856040518563ffffffff1660e01b815260040161073394939291906144e3565b600060405180830381600087803b15801561074d57600080fd5b505af1158015610761573d6000803e3d6000fd5b5050505061080f565b61079d735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc286612802565b73ffffffffffffffffffffffffffffffffffffffff1663022c0d9f60008930856040518563ffffffff1660e01b81526004016107dc949392919061452f565b600060405180830381600087803b1580156107f657600080fd5b505af115801561080a573d6000803e3d6000fd5b505050505b50505050505050565b600073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1610905060008061089573c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28761246b565b9150915060006108a687848461256e565b90506108b58188868989610cd3565b50505050505050565b600047905090565b6108ce611209565b73ffffffffffffffffffffffffffffffffffffffff166108ec610caa565b73ffffffffffffffffffffffffffffffffffffffff1614610942576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610939906141a6565b60405180910390fd5b61094c6000612874565b565b600073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161090506000806109cb735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc288612938565b9150915060006109dc888484612a3b565b90506109ec8189868a8a8a612b0b565b5050505050505050565b60008373ffffffffffffffffffffffffffffffffffffffff1673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff16109050600060059050610a6273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28686612c99565b73ffffffffffffffffffffffffffffffffffffffff1663128acb0830848986610aab57600173fffd8963efd1fc6a506488495d951d5263988d26610aa691906145aa565b610abe565b60016401000276a3610abd91906145de565b5b8b8b888b604051602001610ad59493929190614628565b6040516020818303038152906040526040518663ffffffff1660e01b8152600401610b0495949392919061469a565b60408051808303816000875af1158015610b22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b469190614709565b5050505050505050565b60008373ffffffffffffffffffffffffffffffffffffffff1673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff16109050600060069050610bbc73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28686612ccc565b73ffffffffffffffffffffffffffffffffffffffff1663128acb0830848986610c0557600173fffd8963efd1fc6a506488495d951d5263988d26610c0091906145aa565b610c18565b60016401000276a3610c1791906145de565b5b8b8b888b604051602001610c2f9493929190614628565b6040516020818303038152906040526040518663ffffffff1660e01b8152600401610c5e95949392919061469a565b60408051808303816000875af1158015610c7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca09190614709565b5050505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60006002905060008582600085604051602001610cf394939291906143d4565b60405160208183030381529060405290508415610db357610d3d73c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac8573c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2612cff565b73ffffffffffffffffffffffffffffffffffffffff1663022c0d9f88600030856040518563ffffffff1660e01b8152600401610d7c94939291906144e3565b600060405180830381600087803b158015610d9657600080fd5b505af1158015610daa573d6000803e3d6000fd5b50505050610e58565b610de673c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc286612cff565b73ffffffffffffffffffffffffffffffffffffffff1663022c0d9f60008930856040518563ffffffff1660e01b8152600401610e25949392919061452f565b600060405180830381600087803b158015610e3f57600080fd5b505af1158015610e53573d6000803e3d6000fd5b505050505b50505050505050565b600073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16109050600080610ede735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc287612938565b915091506000610eef878484612a3b565b9050610efe818886898961068a565b50505050505050565b610f0f611209565b73ffffffffffffffffffffffffffffffffffffffff16610f2d610caa565b73ffffffffffffffffffffffffffffffffffffffff1614610f83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f7a906141a6565b60405180910390fd5b600260015403610fc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fbf90614212565b60405180910390fd5b6002600181905550610fd86108be565b81111561101a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161101190614795565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611060573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff167f566e45b1c8057e725bf62796a7f1d37ae294393cab069725a09daddd1af98b79826040516110a79190613c3c565b60405180910390a26001808190555050565b6110c1611209565b73ffffffffffffffffffffffffffffffffffffffff166110df610caa565b73ffffffffffffffffffffffffffffffffffffffff1614611135576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161112c906141a6565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036111a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119b90614827565b60405180910390fd5b6111ad81612874565b50565b60008060008085858101906111c59190614885565b935093509350935060058260ff16036111e6576111e58888858785612d71565b5b60068260ff16036111ff576111fe8888858785612fd3565b5b5050505050505050565b600033905090565b6112928363a9059cbb60e01b84846040516024016112309291906148ec565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506132a6565b505050565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156112e4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611308919061492a565b905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611357573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061137b919061492a565b9050600085111561151057600073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2905060008390508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b373d9e1ce17f2641f24ae83637ab66a2cca9c378b9f896040518363ffffffff1660e01b81526004016113f39291906148ec565b6020604051808303816000875af1158015611412573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611436919061496c565b50600061144488868661336d565b905088811015611489576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611480906149e5565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb338b6040518363ffffffff1660e01b81526004016114c49291906148ec565b6020604051808303816000875af11580156114e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611507919061496c565b50505050611696565b600073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2905060008290508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b373d9e1ce17f2641f24ae83637ab66a2cca9c378b9f886040518363ffffffff1660e01b815260040161157d9291906148ec565b6020604051808303816000875af115801561159c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115c0919061496c565b5060006115ce87858761336d565b905088811015611613576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161160a906149e5565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb338b6040518363ffffffff1660e01b815260040161164e9291906148ec565b6020604051808303816000875af115801561166d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611691919061496c565b505050505b4173ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f193505050501580156116dc573d6000803e3d6000fd5b50505050505050565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611732573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611756919061492a565b905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117c9919061492a565b905060008511156119cf57600073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2905060008390508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3737a250d5630b4cf539739df2c5dacb4c659f2488d896040518363ffffffff1660e01b81526004016118419291906148ec565b6020604051808303816000875af1158015611860573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611884919061496c565b506000732725b420b8712f1102048b3b087ce0a9008bb281634d7cafdc8987876040518463ffffffff1660e01b81526004016118c293929190614a23565b602060405180830381865af41580156118df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119039190614247565b905088811015611948576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161193f906149e5565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb338b6040518363ffffffff1660e01b81526004016119839291906148ec565b6020604051808303816000875af11580156119a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119c6919061496c565b50505050611bc6565b600073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2905060008290508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3737a250d5630b4cf539739df2c5dacb4c659f2488d886040518363ffffffff1660e01b8152600401611a3c9291906148ec565b6020604051808303816000875af1158015611a5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a7f919061496c565b506000732725b420b8712f1102048b3b087ce0a9008bb281634d7cafdc8886886040518463ffffffff1660e01b8152600401611abd93929190614a23565b602060405180830381865af4158015611ada573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611afe9190614247565b905088811015611b43576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b3a906149e5565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb338b6040518363ffffffff1660e01b8152600401611b7e9291906148ec565b6020604051808303816000875af1158015611b9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bc1919061496c565b505050505b4173ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f19350505050158015611c0c573d6000803e3d6000fd5b50505050505050565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c86919061492a565b905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611cd5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf9919061492a565b90506000861115611e7c57600081905060008390508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b373e592427a0aece92de3edee1f18e0157c058615648a6040518363ffffffff1660e01b8152600401611d5d9291906148ec565b6020604051808303816000875af1158015611d7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611da0919061496c565b506000611db085858b8d8a61352f565b905089811015611df5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dec906149e5565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb338c6040518363ffffffff1660e01b8152600401611e309291906148ec565b6020604051808303816000875af1158015611e4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e73919061496c565b50505050611ff0565b600082905060008290508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b373e592427a0aece92de3edee1f18e0157c05861564896040518363ffffffff1660e01b8152600401611ed59291906148ec565b6020604051808303816000875af1158015611ef4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f18919061496c565b506000611f2884868a8d8a61352f565b905089811015611f6d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f64906149e5565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb338c6040518363ffffffff1660e01b8152600401611fa89291906148ec565b6020604051808303816000875af1158015611fc7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611feb919061496c565b505050505b4173ffffffffffffffffffffffffffffffffffffffff166108fc859081150290604051600060405180830381858888f19350505050158015612036573d6000803e3d6000fd5b5050505050505050565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa15801561208d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120b1919061492a565b905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015612100573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612124919061492a565b905060008611156122a757600081905060008390508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b373e592427a0aece92de3edee1f18e0157c058615648a6040518363ffffffff1660e01b81526004016121889291906148ec565b6020604051808303816000875af11580156121a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121cb919061496c565b5060006121db85858b8d8a61352f565b905089811015612220576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612217906149e5565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb338c6040518363ffffffff1660e01b815260040161225b9291906148ec565b6020604051808303816000875af115801561227a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061229e919061496c565b5050505061241b565b600082905060008290508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b373e592427a0aece92de3edee1f18e0157c05861564896040518363ffffffff1660e01b81526004016123009291906148ec565b6020604051808303816000875af115801561231f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612343919061496c565b50600061235384868a8d8a61352f565b905089811015612398576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161238f906149e5565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb338c6040518363ffffffff1660e01b81526004016123d39291906148ec565b6020604051808303816000875af11580156123f2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612416919061496c565b505050505b4173ffffffffffffffffffffffffffffffffffffffff166108fc859081150290604051600060405180830381858888f19350505050158015612461573d6000803e3d6000fd5b5050505050505050565b600080600061247a8585613668565b50905060008061248b888888612cff565b73ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156124d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124f99190614adc565b506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff1691508673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461255857808261255b565b81815b8095508196505050505050935093915050565b60008084116125b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125a990614ba1565b60405180910390fd5b6000831180156125c25750600082115b612601576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125f890614c33565b60405180910390fd5b60006126186103e58661379490919063ffffffff16565b9050600061262f848361379490919063ffffffff16565b9050600061265a8361264c6103e88961379490919063ffffffff16565b6137cb90919063ffffffff16565b905080826126689190614c82565b93505050509392505050565b6000600390506000868285856040516020016126939493929190614cc2565b60405160208183030381529060405290508515612753576126dd73c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac8673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2612cff565b73ffffffffffffffffffffffffffffffffffffffff1663022c0d9f89600030856040518563ffffffff1660e01b815260040161271c94939291906144e3565b600060405180830381600087803b15801561273657600080fd5b505af115801561274a573d6000803e3d6000fd5b505050506127f8565b61278673c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc287612cff565b73ffffffffffffffffffffffffffffffffffffffff1663022c0d9f60008a30856040518563ffffffff1660e01b81526004016127c5949392919061452f565b600060405180830381600087803b1580156127df57600080fd5b505af11580156127f3573d6000803e3d6000fd5b505050505b5050505050505050565b600080600061281185856137ee565b91509150858282604051602001612829929190614d4f565b60405160208183030381529060405280519060200120604051602001612850929190614e49565b6040516020818303038152906040528051906020012060001c925050509392505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080600061294785856137ee565b509050600080612958888888612802565b73ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156129a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129c69190614adc565b506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff1691508273ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614612a25578082612a28565b81815b8095508196505050505050935093915050565b6000808411612a7f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a7690614ed7565b60405180910390fd5b600083118015612a8f5750600082115b612a9857600080fd5b6000612aaf6103e58661379490919063ffffffff16565b90506000612ac6848361379490919063ffffffff16565b90506000612af183612ae36103e88961379490919063ffffffff16565b6137cb90919063ffffffff16565b90508082612aff9190614c82565b93505050509392505050565b600060049050600086828585604051602001612b2a9493929190614cc2565b60405160208183030381529060405290508515612bea57612b74735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f8673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2612802565b73ffffffffffffffffffffffffffffffffffffffff1663022c0d9f89600030856040518563ffffffff1660e01b8152600401612bb394939291906144e3565b600060405180830381600087803b158015612bcd57600080fd5b505af1158015612be1573d6000803e3d6000fd5b50505050612c8f565b612c1d735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc287612802565b73ffffffffffffffffffffffffffffffffffffffff1663022c0d9f60008a30856040518563ffffffff1660e01b8152600401612c5c949392919061452f565b600060405180830381600087803b158015612c7657600080fd5b505af1158015612c8a573d6000803e3d6000fd5b505050505b5050505050505050565b6000612cc3731f98431c8ad98523631ae4a59f267346ea31f984612cbe8686866138ae565b61394a565b90509392505050565b6000612cf6731f98431c8ad98523631ae4a59f267346ea31f984612cf18686866138ae565b61394a565b90509392505050565b6000806000612d0e8585613668565b91509150858282604051602001612d26929190614d4f565b60405160208183030381529060405280519060200120604051602001612d4d929190614f43565b6040516020818303038152906040528051906020012060001c925050509392505050565b600073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2905060008490506000808813612d9e5786612da0565b875b90506000808913612dba5788612db590614f85565b612dc5565b87612dc490614f85565b5b90508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b373d9e1ce17f2641f24ae83637ab66a2cca9c378b9f836040518363ffffffff1660e01b8152600401612e169291906148ec565b6020604051808303816000875af1158015612e35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e59919061496c565b506000612e7b828973c02aaa39b223fe8d0a0e5c4f27ead9083c756cc261336d565b9050868111612ebf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612eb690615019565b60405180910390fd5b828111612f01576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ef890615019565b60405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33856040518363ffffffff1660e01b8152600401612f3c9291906148ec565b6020604051808303816000875af1158015612f5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f7f919061496c565b504173ffffffffffffffffffffffffffffffffffffffff166108fc879081150290604051600060405180830381858888f19350505050158015612fc6573d6000803e3d6000fd5b5050505050505050505050565b600073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc29050600084905060008088136130005786613002565b875b9050600080891361301c578861301790614f85565b613027565b8761302690614f85565b5b90508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3737a250d5630b4cf539739df2c5dacb4c659f2488d836040518363ffffffff1660e01b81526004016130789291906148ec565b6020604051808303816000875af1158015613097573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130bb919061496c565b506000732725b420b8712f1102048b3b087ce0a9008bb281634d7cafdc838a73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26040518463ffffffff1660e01b815260040161310d93929190614a23565b602060405180830381865af415801561312a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061314e9190614247565b9050868111613192576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161318990615019565b60405180910390fd5b8281116131d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131cb90615019565b60405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33856040518363ffffffff1660e01b815260040161320f9291906148ec565b6020604051808303816000875af115801561322e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613252919061496c565b504173ffffffffffffffffffffffffffffffffffffffff166108fc879081150290604051600060405180830381858888f19350505050158015613299573d6000803e3d6000fd5b5050505050505050505050565b6000613308826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16613a1b9092919063ffffffff16565b90506000815111156133685780806020019051810190613328919061496c565b613367576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161335e906150ab565b60405180910390fd5b5b505050565b600080600267ffffffffffffffff81111561338b5761338a6150cb565b5b6040519080825280602002602001820160405280156133b95781602001602082028036833780820191505090505b50905083816000815181106133d1576133d06150fa565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505082816001815181106134205761341f6150fa565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600073d9e1ce17f2641f24ae83637ab66a2cca9c378b9f73ffffffffffffffffffffffffffffffffffffffff166338ed17398760008530426040518663ffffffff1660e01b81526004016134b29594939291906151e7565b6000604051808303816000875af11580156134d1573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906134fa9190615350565b9050806001825161350b9190615399565b8151811061351c5761351b6150fa565b5b6020026020010151925050509392505050565b60008073e592427a0aece92de3edee1f18e0157c0586156490508073ffffffffffffffffffffffffffffffffffffffff1663414bf3896040518061010001604052808a73ffffffffffffffffffffffffffffffffffffffff1681526020018973ffffffffffffffffffffffffffffffffffffffff1681526020018662ffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff168152602001428152602001888152602001878152602001600073ffffffffffffffffffffffffffffffffffffffff168152506040518263ffffffff1660e01b8152600401613619919061549c565b6020604051808303816000875af1158015613638573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061365c9190614247565b91505095945050505050565b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036136d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016136d09061552a565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1610613713578284613716565b83835b8092508193505050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361378d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161378490615596565b60405180910390fd5b9250929050565b6000808314806137bc5750818383856137ad91906155b6565b9250826137ba9190614c82565b145b6137c557600080fd5b92915050565b60008282846137da9190615610565b91508110156137e857600080fd5b92915050565b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff160361382957600080fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1610613863578284613866565b83835b8092508193505050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036138a757600080fd5b9250929050565b6138b6613bd1565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1611156138f557828480945081955050505b60405180606001604052808573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1681526020018362ffffff1681525090509392505050565b6000816020015173ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff161061398c57600080fd5b828260000151836020015184604001516040516020016139ae93929190615666565b604051602081830303815290604052805190602001207fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b5460001b6040516020016139fa9392919061569d565b6040516020818303038152906040528051906020012060001c905092915050565b6060613a2a8484600085613a33565b90509392505050565b606082471015613a78576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613a6f90615757565b60405180910390fd5b613a8185613b47565b613ac0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613ab7906157c3565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051613ae9919061581f565b60006040518083038185875af1925050503d8060008114613b26576040519150601f19603f3d011682016040523d82523d6000602084013e613b2b565b606091505b5091509150613b3b828286613b6a565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60608315613b7a57829050613bca565b600083511115613b8d5782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613bc1919061587a565b60405180910390fd5b9392505050565b6040518060600160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600062ffffff1681525090565b6000819050919050565b613c3681613c23565b82525050565b6000602082019050613c516000830184613c2d565b92915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613c9682613c6b565b9050919050565b6000613ca882613c8b565b9050919050565b613cb881613c9d565b8114613cc357600080fd5b50565b600081359050613cd581613caf565b92915050565b613ce481613c8b565b8114613cef57600080fd5b50565b600081359050613d0181613cdb565b92915050565b613d1081613c23565b8114613d1b57600080fd5b50565b600081359050613d2d81613d07565b92915050565b600080600060608486031215613d4c57613d4b613c61565b5b6000613d5a86828701613cc6565b9350506020613d6b86828701613cf2565b9250506040613d7c86828701613d1e565b9150509250925092565b600080fd5b600080fd5b600080fd5b60008083601f840112613dab57613daa613d86565b5b8235905067ffffffffffffffff811115613dc857613dc7613d8b565b5b602083019150836001820283011115613de457613de3613d90565b5b9250929050565b600080600080600060808688031215613e0757613e06613c61565b5b6000613e1588828901613cf2565b9550506020613e2688828901613d1e565b9450506040613e3788828901613d1e565b935050606086013567ffffffffffffffff811115613e5857613e57613c66565b5b613e6488828901613d95565b92509250509295509295909350565b600062ffffff82169050919050565b613e8b81613e73565b8114613e9657600080fd5b50565b600081359050613ea881613e82565b92915050565b60008060008060808587031215613ec857613ec7613c61565b5b6000613ed687828801613d1e565b9450506020613ee787828801613cf2565b9350506040613ef887828801613e99565b9250506060613f0987828801613d1e565b91505092959194509250565b60008115159050919050565b613f2a81613f15565b8114613f3557600080fd5b50565b600081359050613f4781613f21565b92915050565b600080600080600060a08688031215613f6957613f68613c61565b5b6000613f7788828901613d1e565b9550506020613f8888828901613d1e565b9450506040613f9988828901613f38565b9350506060613faa88828901613cf2565b9250506080613fbb88828901613d1e565b9150509295509295909350565b600080600060608486031215613fe157613fe0613c61565b5b6000613fef86828701613d1e565b935050602061400086828701613cf2565b925050604061401186828701613d1e565b9150509250925092565b61402481613c8b565b82525050565b600060208201905061403f600083018461401b565b92915050565b60006020828403121561405b5761405a613c61565b5b600061406984828501613d1e565b91505092915050565b60006020828403121561408857614087613c61565b5b600061409684828501613cf2565b91505092915050565b6000819050919050565b6140b28161409f565b81146140bd57600080fd5b50565b6000813590506140cf816140a9565b92915050565b600080600080606085870312156140ef576140ee613c61565b5b60006140fd878288016140c0565b945050602061410e878288016140c0565b935050604085013567ffffffffffffffff81111561412f5761412e613c66565b5b61413b87828801613d95565b925092505092959194509250565b600082825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000614190602083614149565b915061419b8261415a565b602082019050919050565b600060208201905081810360008301526141bf81614183565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b60006141fc601f83614149565b9150614207826141c6565b602082019050919050565b6000602082019050818103600083015261422b816141ef565b9050919050565b60008151905061424181613d07565b92915050565b60006020828403121561425d5761425c613c61565b5b600061426b84828501614232565b91505092915050565b7f4e6f7420656e6f75676820746f6b656e00000000000000000000000000000000600082015250565b60006142aa601083614149565b91506142b582614274565b602082019050919050565b600060208201905081810360008301526142d98161429d565b9050919050565b600060ff82169050919050565b6142f6816142e0565b811461430157600080fd5b50565b600081359050614313816142ed565b92915050565b6000806000806080858703121561433357614332613c61565b5b600061434187828801613d1e565b945050602061435287828801614304565b935050604061436387828801613e99565b925050606061437487828801613d1e565b91505092959194509250565b614389816142e0565b82525050565b6000819050919050565b6000819050919050565b60006143be6143b96143b48461438f565b614399565b6142e0565b9050919050565b6143ce816143a3565b82525050565b60006080820190506143e96000830187613c2d565b6143f66020830186614380565b61440360408301856143c5565b6144106060830184613c2d565b95945050505050565b600061443461442f61442a8461438f565b614399565b613c23565b9050919050565b61444481614419565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015614484578082015181840152602081019050614469565b83811115614493576000848401525b50505050565b6000601f19601f8301169050919050565b60006144b58261444a565b6144bf8185614455565b93506144cf818560208601614466565b6144d881614499565b840191505092915050565b60006080820190506144f86000830187613c2d565b614505602083018661443b565b614512604083018561401b565b818103606083015261452481846144aa565b905095945050505050565b6000608082019050614544600083018761443b565b6145516020830186613c2d565b61455e604083018561401b565b818103606083015261457081846144aa565b905095945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006145b582613c6b565b91506145c083613c6b565b9250828210156145d3576145d261457b565b5b828203905092915050565b60006145e982613c6b565b91506145f483613c6b565b92508273ffffffffffffffffffffffffffffffffffffffff0382111561461d5761461c61457b565b5b828201905092915050565b600060808201905061463d6000830187613c2d565b61464a602083018661401b565b6146576040830185614380565b6146646060830184613c2d565b95945050505050565b61467681613f15565b82525050565b6146858161409f565b82525050565b61469481613c6b565b82525050565b600060a0820190506146af600083018861401b565b6146bc602083018761466d565b6146c9604083018661467c565b6146d6606083018561468b565b81810360808301526146e881846144aa565b90509695505050505050565b600081519050614703816140a9565b92915050565b600080604083850312156147205761471f613c61565b5b600061472e858286016146f4565b925050602061473f858286016146f4565b9150509250929050565b7f4e6f7420656e6f75676820455448000000000000000000000000000000000000600082015250565b600061477f600e83614149565b915061478a82614749565b602082019050919050565b600060208201905081810360008301526147ae81614772565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000614811602683614149565b915061481c826147b5565b604082019050919050565b6000602082019050818103600083015261484081614804565b9050919050565b600061485282613c6b565b9050919050565b61486281614847565b811461486d57600080fd5b50565b60008135905061487f81614859565b92915050565b6000806000806080858703121561489f5761489e613c61565b5b60006148ad87828801613d1e565b94505060206148be87828801614870565b93505060406148cf87828801614304565b92505060606148e087828801613d1e565b91505092959194509250565b6000604082019050614901600083018561401b565b61490e6020830184613c2d565b9392505050565b60008151905061492481613cdb565b92915050565b6000602082840312156149405761493f613c61565b5b600061494e84828501614915565b91505092915050565b60008151905061496681613f21565b92915050565b60006020828403121561498257614981613c61565b5b600061499084828501614957565b91505092915050565b7f616d6f756e74206c657373206d696e0000000000000000000000000000000000600082015250565b60006149cf600f83614149565b91506149da82614999565b602082019050919050565b600060208201905081810360008301526149fe816149c2565b9050919050565b614a0e81613c23565b82525050565b614a1d81613c8b565b82525050565b6000606082019050614a386000830186614a05565b614a456020830185614a14565b614a526040830184614a14565b949350505050565b60006dffffffffffffffffffffffffffff82169050919050565b614a7d81614a5a565b8114614a8857600080fd5b50565b600081519050614a9a81614a74565b92915050565b600063ffffffff82169050919050565b614ab981614aa0565b8114614ac457600080fd5b50565b600081519050614ad681614ab0565b92915050565b600080600060608486031215614af557614af4613c61565b5b6000614b0386828701614a8b565b9350506020614b1486828701614a8b565b9250506040614b2586828701614ac7565b9150509250925092565b7f556e697377617056324c6962726172793a20494e53554646494349454e545f4960008201527f4e5055545f414d4f554e54000000000000000000000000000000000000000000602082015250565b6000614b8b602b83614149565b9150614b9682614b2f565b604082019050919050565b60006020820190508181036000830152614bba81614b7e565b9050919050565b7f556e697377617056324c6962726172793a20494e53554646494349454e545f4c60008201527f4951554944495459000000000000000000000000000000000000000000000000602082015250565b6000614c1d602883614149565b9150614c2882614bc1565b604082019050919050565b60006020820190508181036000830152614c4c81614c10565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000614c8d82613c23565b9150614c9883613c23565b925082614ca857614ca7614c53565b5b828204905092915050565b614cbc81613e73565b82525050565b6000608082019050614cd76000830187613c2d565b614ce46020830186614380565b614cf16040830185614cb3565b614cfe6060830184613c2d565b95945050505050565b60008160601b9050919050565b6000614d1f82614d07565b9050919050565b6000614d3182614d14565b9050919050565b614d49614d4482613c8b565b614d26565b82525050565b6000614d5b8285614d38565b601482019150614d6b8284614d38565b6014820191508190509392505050565b600081905092915050565b7fff00000000000000000000000000000000000000000000000000000000000000600082015250565b6000614dbc600183614d7b565b9150614dc782614d86565b600182019050919050565b6000819050919050565b6000819050919050565b614df7614df282614dd2565b614ddc565b82525050565b7f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f600082015250565b6000614e33602083614d7b565b9150614e3e82614dfd565b602082019050919050565b6000614e5482614daf565b9150614e608285614d38565b601482019150614e708284614de6565b602082019150614e7f82614e26565b91508190509392505050565b7f494e53554646494349454e545f494e5055545f414d4f554e5400000000000000600082015250565b6000614ec1601983614149565b9150614ecc82614e8b565b602082019050919050565b60006020820190508181036000830152614ef081614eb4565b9050919050565b7fe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303600082015250565b6000614f2d602083614d7b565b9150614f3882614ef7565b602082019050919050565b6000614f4e82614daf565b9150614f5a8285614d38565b601482019150614f6a8284614de6565b602082019150614f7982614f20565b91508190509392505050565b6000614f908261409f565b91507f80000000000000000000000000000000000000000000000000000000000000008203614fc257614fc161457b565b5b816000039050919050565b7f616d6f756e7420657468206f766572666c6f7700000000000000000000000000600082015250565b6000615003601383614149565b915061500e82614fcd565b602082019050919050565b6000602082019050818103600083015261503281614ff6565b9050919050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b6000615095602a83614149565b91506150a082615039565b604082019050919050565b600060208201905081810360008301526150c481615088565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61515e81613c8b565b82525050565b60006151708383615155565b60208301905092915050565b6000602082019050919050565b600061519482615129565b61519e8185615134565b93506151a983615145565b8060005b838110156151da5781516151c18882615164565b97506151cc8361517c565b9250506001810190506151ad565b5085935050505092915050565b600060a0820190506151fc6000830188613c2d565b6152096020830187613c2d565b818103604083015261521b8186615189565b905061522a606083018561401b565b6152376080830184613c2d565b9695505050505050565b61524a82614499565b810181811067ffffffffffffffff82111715615269576152686150cb565b5b80604052505050565b600061527c613c57565b90506152888282615241565b919050565b600067ffffffffffffffff8211156152a8576152a76150cb565b5b602082029050602081019050919050565b60006152cc6152c78461528d565b615272565b905080838252602082019050602084028301858111156152ef576152ee613d90565b5b835b8181101561531857806153048882614232565b8452602084019350506020810190506152f1565b5050509392505050565b600082601f83011261533757615336613d86565b5b81516153478482602086016152b9565b91505092915050565b60006020828403121561536657615365613c61565b5b600082015167ffffffffffffffff81111561538457615383613c66565b5b61539084828501615322565b91505092915050565b60006153a482613c23565b91506153af83613c23565b9250828210156153c2576153c161457b565b5b828203905092915050565b6153d681613e73565b82525050565b6153e581613c23565b82525050565b6153f481613c6b565b82525050565b610100820160008201516154116000850182615155565b5060208201516154246020850182615155565b50604082015161543760408501826153cd565b50606082015161544a6060850182615155565b50608082015161545d60808501826153dc565b5060a082015161547060a08501826153dc565b5060c082015161548360c08501826153dc565b5060e082015161549660e08501826153eb565b50505050565b6000610100820190506154b260008301846153fa565b92915050565b7f556e697377617056324c6962726172793a204944454e544943414c5f4144445260008201527f4553534553000000000000000000000000000000000000000000000000000000602082015250565b6000615514602583614149565b915061551f826154b8565b604082019050919050565b6000602082019050818103600083015261554381615507565b9050919050565b7f556e697377617056324c6962726172793a205a45524f5f414444524553530000600082015250565b6000615580601e83614149565b915061558b8261554a565b602082019050919050565b600060208201905081810360008301526155af81615573565b9050919050565b60006155c182613c23565b91506155cc83613c23565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156156055761560461457b565b5b828202905092915050565b600061561b82613c23565b915061562683613c23565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561565b5761565a61457b565b5b828201905092915050565b600060608201905061567b600083018661401b565b615688602083018561401b565b6156956040830184614cb3565b949350505050565b60006156a882614daf565b91506156b48286614d38565b6014820191506156c48285614de6565b6020820191506156d48284614de6565b602082019150819050949350505050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b6000615741602683614149565b915061574c826156e5565b604082019050919050565b6000602082019050818103600083015261577081615734565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b60006157ad601d83614149565b91506157b882615777565b602082019050919050565b600060208201905081810360008301526157dc816157a0565b9050919050565b600081905092915050565b60006157f98261444a565b61580381856157e3565b9350615813818560208601614466565b80840191505092915050565b600061582b82846157ee565b915081905092915050565b600081519050919050565b600061584c82615836565b6158568185614149565b9350615866818560208601614466565b61586f81614499565b840191505092915050565b600060208201905081810360008301526158948184615841565b90509291505056fea2646970667358221220ac18025e40aedd151d9630a036486ebd0cdd46244a0f89533ec8e58d801fb15164736f6c634300080d0033

Deployed Bytecode

0x6080604052600436106100f75760003560e01c80637c946cbf1161008a578063d734fbbd11610059578063d734fbbd146102d7578063f14210a6146102f3578063f2fde38b1461031c578063fa461e331461034557610135565b80637c946cbf1461024b57806388bee550146102675780638da5cb5b14610283578063c2a11f1b146102ae57610135565b806356d0de5f116100c657806356d0de5f146101d157806370ed0ada146101ed578063715018a61461021857806376a6b8171461022f57610135565b806301e336671461013a57806310d1e85c14610163578063199b05961461018c5780632f0a4db2146101a857610135565b36610135577fb68e3ddd778f4ac57bb0ea89388354e7b87a251efb2e81b8f0682c0cc4eb7dab3460405161012b9190613c3c565b60405180910390a1005b600080fd5b34801561014657600080fd5b50610161600480360381019061015c9190613d33565b61036e565b005b34801561016f57600080fd5b5061018a60048036038101906101859190613deb565b610558565b005b6101a660048036038101906101a19190613eae565b6105e2565b005b3480156101b457600080fd5b506101cf60048036038101906101ca9190613f4d565b61068a565b005b6101eb60048036038101906101e69190613fc8565b610818565b005b3480156101f957600080fd5b506102026108be565b60405161020f9190613c3c565b60405180910390f35b34801561022457600080fd5b5061022d6108c6565b005b61024960048036038101906102449190613eae565b61094e565b005b61026560048036038101906102609190613eae565b6109f6565b005b610281600480360381019061027c9190613eae565b610b50565b005b34801561028f57600080fd5b50610298610caa565b6040516102a5919061402a565b60405180910390f35b3480156102ba57600080fd5b506102d560048036038101906102d09190613f4d565b610cd3565b005b6102f160048036038101906102ec9190613fc8565b610e61565b005b3480156102ff57600080fd5b5061031a60048036038101906103159190614045565b610f07565b005b34801561032857600080fd5b50610343600480360381019061033e9190614072565b6110b9565b005b34801561035157600080fd5b5061036c600480360381019061036791906140d5565b6111b0565b005b610376611209565b73ffffffffffffffffffffffffffffffffffffffff16610394610caa565b73ffffffffffffffffffffffffffffffffffffffff16146103ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103e1906141a6565b60405180910390fd5b60026001540361042f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161042690614212565b60405180910390fd5b6002600181905550808373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610471919061402a565b602060405180830381865afa15801561048e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b29190614247565b10156104f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104ea906142c0565b60405180910390fd5b6104fe838383611211565b8173ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65826040516105449190613c3c565b60405180910390a260018081905550505050565b600080600080858581019061056d9190614319565b935093509350935060018360ff160361058d5761058c84898984611297565b5b60028360ff16036105a5576105a4848989846116e5565b5b60038360ff16036105be576105bd8489898486611c15565b5b60048360ff16036105d7576105d68489898486612040565b5b505050505050505050565b600073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1610905060008061065f73c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28861246b565b91509150600061067088848461256e565b90506106808189868a8a8a612674565b5050505050505050565b600060019050600085826000856040516020016106aa94939291906143d4565b6040516020818303038152906040529050841561076a576106f4735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f8573c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2612802565b73ffffffffffffffffffffffffffffffffffffffff1663022c0d9f88600030856040518563ffffffff1660e01b815260040161073394939291906144e3565b600060405180830381600087803b15801561074d57600080fd5b505af1158015610761573d6000803e3d6000fd5b5050505061080f565b61079d735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc286612802565b73ffffffffffffffffffffffffffffffffffffffff1663022c0d9f60008930856040518563ffffffff1660e01b81526004016107dc949392919061452f565b600060405180830381600087803b1580156107f657600080fd5b505af115801561080a573d6000803e3d6000fd5b505050505b50505050505050565b600073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1610905060008061089573c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28761246b565b9150915060006108a687848461256e565b90506108b58188868989610cd3565b50505050505050565b600047905090565b6108ce611209565b73ffffffffffffffffffffffffffffffffffffffff166108ec610caa565b73ffffffffffffffffffffffffffffffffffffffff1614610942576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610939906141a6565b60405180910390fd5b61094c6000612874565b565b600073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161090506000806109cb735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc288612938565b9150915060006109dc888484612a3b565b90506109ec8189868a8a8a612b0b565b5050505050505050565b60008373ffffffffffffffffffffffffffffffffffffffff1673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff16109050600060059050610a6273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28686612c99565b73ffffffffffffffffffffffffffffffffffffffff1663128acb0830848986610aab57600173fffd8963efd1fc6a506488495d951d5263988d26610aa691906145aa565b610abe565b60016401000276a3610abd91906145de565b5b8b8b888b604051602001610ad59493929190614628565b6040516020818303038152906040526040518663ffffffff1660e01b8152600401610b0495949392919061469a565b60408051808303816000875af1158015610b22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b469190614709565b5050505050505050565b60008373ffffffffffffffffffffffffffffffffffffffff1673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff16109050600060069050610bbc73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28686612ccc565b73ffffffffffffffffffffffffffffffffffffffff1663128acb0830848986610c0557600173fffd8963efd1fc6a506488495d951d5263988d26610c0091906145aa565b610c18565b60016401000276a3610c1791906145de565b5b8b8b888b604051602001610c2f9493929190614628565b6040516020818303038152906040526040518663ffffffff1660e01b8152600401610c5e95949392919061469a565b60408051808303816000875af1158015610c7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca09190614709565b5050505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60006002905060008582600085604051602001610cf394939291906143d4565b60405160208183030381529060405290508415610db357610d3d73c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac8573c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2612cff565b73ffffffffffffffffffffffffffffffffffffffff1663022c0d9f88600030856040518563ffffffff1660e01b8152600401610d7c94939291906144e3565b600060405180830381600087803b158015610d9657600080fd5b505af1158015610daa573d6000803e3d6000fd5b50505050610e58565b610de673c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc286612cff565b73ffffffffffffffffffffffffffffffffffffffff1663022c0d9f60008930856040518563ffffffff1660e01b8152600401610e25949392919061452f565b600060405180830381600087803b158015610e3f57600080fd5b505af1158015610e53573d6000803e3d6000fd5b505050505b50505050505050565b600073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16109050600080610ede735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc287612938565b915091506000610eef878484612a3b565b9050610efe818886898961068a565b50505050505050565b610f0f611209565b73ffffffffffffffffffffffffffffffffffffffff16610f2d610caa565b73ffffffffffffffffffffffffffffffffffffffff1614610f83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f7a906141a6565b60405180910390fd5b600260015403610fc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fbf90614212565b60405180910390fd5b6002600181905550610fd86108be565b81111561101a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161101190614795565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611060573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff167f566e45b1c8057e725bf62796a7f1d37ae294393cab069725a09daddd1af98b79826040516110a79190613c3c565b60405180910390a26001808190555050565b6110c1611209565b73ffffffffffffffffffffffffffffffffffffffff166110df610caa565b73ffffffffffffffffffffffffffffffffffffffff1614611135576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161112c906141a6565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036111a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119b90614827565b60405180910390fd5b6111ad81612874565b50565b60008060008085858101906111c59190614885565b935093509350935060058260ff16036111e6576111e58888858785612d71565b5b60068260ff16036111ff576111fe8888858785612fd3565b5b5050505050505050565b600033905090565b6112928363a9059cbb60e01b84846040516024016112309291906148ec565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506132a6565b505050565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156112e4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611308919061492a565b905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611357573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061137b919061492a565b9050600085111561151057600073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2905060008390508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b373d9e1ce17f2641f24ae83637ab66a2cca9c378b9f896040518363ffffffff1660e01b81526004016113f39291906148ec565b6020604051808303816000875af1158015611412573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611436919061496c565b50600061144488868661336d565b905088811015611489576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611480906149e5565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb338b6040518363ffffffff1660e01b81526004016114c49291906148ec565b6020604051808303816000875af11580156114e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611507919061496c565b50505050611696565b600073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2905060008290508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b373d9e1ce17f2641f24ae83637ab66a2cca9c378b9f886040518363ffffffff1660e01b815260040161157d9291906148ec565b6020604051808303816000875af115801561159c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115c0919061496c565b5060006115ce87858761336d565b905088811015611613576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161160a906149e5565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb338b6040518363ffffffff1660e01b815260040161164e9291906148ec565b6020604051808303816000875af115801561166d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611691919061496c565b505050505b4173ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f193505050501580156116dc573d6000803e3d6000fd5b50505050505050565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611732573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611756919061492a565b905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117c9919061492a565b905060008511156119cf57600073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2905060008390508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3737a250d5630b4cf539739df2c5dacb4c659f2488d896040518363ffffffff1660e01b81526004016118419291906148ec565b6020604051808303816000875af1158015611860573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611884919061496c565b506000732725b420b8712f1102048b3b087ce0a9008bb281634d7cafdc8987876040518463ffffffff1660e01b81526004016118c293929190614a23565b602060405180830381865af41580156118df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119039190614247565b905088811015611948576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161193f906149e5565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb338b6040518363ffffffff1660e01b81526004016119839291906148ec565b6020604051808303816000875af11580156119a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119c6919061496c565b50505050611bc6565b600073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2905060008290508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3737a250d5630b4cf539739df2c5dacb4c659f2488d886040518363ffffffff1660e01b8152600401611a3c9291906148ec565b6020604051808303816000875af1158015611a5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a7f919061496c565b506000732725b420b8712f1102048b3b087ce0a9008bb281634d7cafdc8886886040518463ffffffff1660e01b8152600401611abd93929190614a23565b602060405180830381865af4158015611ada573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611afe9190614247565b905088811015611b43576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b3a906149e5565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb338b6040518363ffffffff1660e01b8152600401611b7e9291906148ec565b6020604051808303816000875af1158015611b9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bc1919061496c565b505050505b4173ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f19350505050158015611c0c573d6000803e3d6000fd5b50505050505050565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c86919061492a565b905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611cd5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf9919061492a565b90506000861115611e7c57600081905060008390508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b373e592427a0aece92de3edee1f18e0157c058615648a6040518363ffffffff1660e01b8152600401611d5d9291906148ec565b6020604051808303816000875af1158015611d7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611da0919061496c565b506000611db085858b8d8a61352f565b905089811015611df5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dec906149e5565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb338c6040518363ffffffff1660e01b8152600401611e309291906148ec565b6020604051808303816000875af1158015611e4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e73919061496c565b50505050611ff0565b600082905060008290508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b373e592427a0aece92de3edee1f18e0157c05861564896040518363ffffffff1660e01b8152600401611ed59291906148ec565b6020604051808303816000875af1158015611ef4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f18919061496c565b506000611f2884868a8d8a61352f565b905089811015611f6d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f64906149e5565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb338c6040518363ffffffff1660e01b8152600401611fa89291906148ec565b6020604051808303816000875af1158015611fc7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611feb919061496c565b505050505b4173ffffffffffffffffffffffffffffffffffffffff166108fc859081150290604051600060405180830381858888f19350505050158015612036573d6000803e3d6000fd5b5050505050505050565b60003373ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa15801561208d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120b1919061492a565b905060003373ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015612100573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612124919061492a565b905060008611156122a757600081905060008390508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b373e592427a0aece92de3edee1f18e0157c058615648a6040518363ffffffff1660e01b81526004016121889291906148ec565b6020604051808303816000875af11580156121a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121cb919061496c565b5060006121db85858b8d8a61352f565b905089811015612220576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612217906149e5565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb338c6040518363ffffffff1660e01b815260040161225b9291906148ec565b6020604051808303816000875af115801561227a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061229e919061496c565b5050505061241b565b600082905060008290508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b373e592427a0aece92de3edee1f18e0157c05861564896040518363ffffffff1660e01b81526004016123009291906148ec565b6020604051808303816000875af115801561231f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612343919061496c565b50600061235384868a8d8a61352f565b905089811015612398576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161238f906149e5565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb338c6040518363ffffffff1660e01b81526004016123d39291906148ec565b6020604051808303816000875af11580156123f2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612416919061496c565b505050505b4173ffffffffffffffffffffffffffffffffffffffff166108fc859081150290604051600060405180830381858888f19350505050158015612461573d6000803e3d6000fd5b5050505050505050565b600080600061247a8585613668565b50905060008061248b888888612cff565b73ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156124d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124f99190614adc565b506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff1691508673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461255857808261255b565b81815b8095508196505050505050935093915050565b60008084116125b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125a990614ba1565b60405180910390fd5b6000831180156125c25750600082115b612601576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125f890614c33565b60405180910390fd5b60006126186103e58661379490919063ffffffff16565b9050600061262f848361379490919063ffffffff16565b9050600061265a8361264c6103e88961379490919063ffffffff16565b6137cb90919063ffffffff16565b905080826126689190614c82565b93505050509392505050565b6000600390506000868285856040516020016126939493929190614cc2565b60405160208183030381529060405290508515612753576126dd73c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac8673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2612cff565b73ffffffffffffffffffffffffffffffffffffffff1663022c0d9f89600030856040518563ffffffff1660e01b815260040161271c94939291906144e3565b600060405180830381600087803b15801561273657600080fd5b505af115801561274a573d6000803e3d6000fd5b505050506127f8565b61278673c0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc287612cff565b73ffffffffffffffffffffffffffffffffffffffff1663022c0d9f60008a30856040518563ffffffff1660e01b81526004016127c5949392919061452f565b600060405180830381600087803b1580156127df57600080fd5b505af11580156127f3573d6000803e3d6000fd5b505050505b5050505050505050565b600080600061281185856137ee565b91509150858282604051602001612829929190614d4f565b60405160208183030381529060405280519060200120604051602001612850929190614e49565b6040516020818303038152906040528051906020012060001c925050509392505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080600061294785856137ee565b509050600080612958888888612802565b73ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156129a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129c69190614adc565b506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff1691508273ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614612a25578082612a28565b81815b8095508196505050505050935093915050565b6000808411612a7f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a7690614ed7565b60405180910390fd5b600083118015612a8f5750600082115b612a9857600080fd5b6000612aaf6103e58661379490919063ffffffff16565b90506000612ac6848361379490919063ffffffff16565b90506000612af183612ae36103e88961379490919063ffffffff16565b6137cb90919063ffffffff16565b90508082612aff9190614c82565b93505050509392505050565b600060049050600086828585604051602001612b2a9493929190614cc2565b60405160208183030381529060405290508515612bea57612b74735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f8673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2612802565b73ffffffffffffffffffffffffffffffffffffffff1663022c0d9f89600030856040518563ffffffff1660e01b8152600401612bb394939291906144e3565b600060405180830381600087803b158015612bcd57600080fd5b505af1158015612be1573d6000803e3d6000fd5b50505050612c8f565b612c1d735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc287612802565b73ffffffffffffffffffffffffffffffffffffffff1663022c0d9f60008a30856040518563ffffffff1660e01b8152600401612c5c949392919061452f565b600060405180830381600087803b158015612c7657600080fd5b505af1158015612c8a573d6000803e3d6000fd5b505050505b5050505050505050565b6000612cc3731f98431c8ad98523631ae4a59f267346ea31f984612cbe8686866138ae565b61394a565b90509392505050565b6000612cf6731f98431c8ad98523631ae4a59f267346ea31f984612cf18686866138ae565b61394a565b90509392505050565b6000806000612d0e8585613668565b91509150858282604051602001612d26929190614d4f565b60405160208183030381529060405280519060200120604051602001612d4d929190614f43565b6040516020818303038152906040528051906020012060001c925050509392505050565b600073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2905060008490506000808813612d9e5786612da0565b875b90506000808913612dba5788612db590614f85565b612dc5565b87612dc490614f85565b5b90508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b373d9e1ce17f2641f24ae83637ab66a2cca9c378b9f836040518363ffffffff1660e01b8152600401612e169291906148ec565b6020604051808303816000875af1158015612e35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e59919061496c565b506000612e7b828973c02aaa39b223fe8d0a0e5c4f27ead9083c756cc261336d565b9050868111612ebf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612eb690615019565b60405180910390fd5b828111612f01576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ef890615019565b60405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33856040518363ffffffff1660e01b8152600401612f3c9291906148ec565b6020604051808303816000875af1158015612f5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f7f919061496c565b504173ffffffffffffffffffffffffffffffffffffffff166108fc879081150290604051600060405180830381858888f19350505050158015612fc6573d6000803e3d6000fd5b5050505050505050505050565b600073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc29050600084905060008088136130005786613002565b875b9050600080891361301c578861301790614f85565b613027565b8761302690614f85565b5b90508273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3737a250d5630b4cf539739df2c5dacb4c659f2488d836040518363ffffffff1660e01b81526004016130789291906148ec565b6020604051808303816000875af1158015613097573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130bb919061496c565b506000732725b420b8712f1102048b3b087ce0a9008bb281634d7cafdc838a73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26040518463ffffffff1660e01b815260040161310d93929190614a23565b602060405180830381865af415801561312a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061314e9190614247565b9050868111613192576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161318990615019565b60405180910390fd5b8281116131d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131cb90615019565b60405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33856040518363ffffffff1660e01b815260040161320f9291906148ec565b6020604051808303816000875af115801561322e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613252919061496c565b504173ffffffffffffffffffffffffffffffffffffffff166108fc879081150290604051600060405180830381858888f19350505050158015613299573d6000803e3d6000fd5b5050505050505050505050565b6000613308826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16613a1b9092919063ffffffff16565b90506000815111156133685780806020019051810190613328919061496c565b613367576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161335e906150ab565b60405180910390fd5b5b505050565b600080600267ffffffffffffffff81111561338b5761338a6150cb565b5b6040519080825280602002602001820160405280156133b95781602001602082028036833780820191505090505b50905083816000815181106133d1576133d06150fa565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505082816001815181106134205761341f6150fa565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600073d9e1ce17f2641f24ae83637ab66a2cca9c378b9f73ffffffffffffffffffffffffffffffffffffffff166338ed17398760008530426040518663ffffffff1660e01b81526004016134b29594939291906151e7565b6000604051808303816000875af11580156134d1573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906134fa9190615350565b9050806001825161350b9190615399565b8151811061351c5761351b6150fa565b5b6020026020010151925050509392505050565b60008073e592427a0aece92de3edee1f18e0157c0586156490508073ffffffffffffffffffffffffffffffffffffffff1663414bf3896040518061010001604052808a73ffffffffffffffffffffffffffffffffffffffff1681526020018973ffffffffffffffffffffffffffffffffffffffff1681526020018662ffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff168152602001428152602001888152602001878152602001600073ffffffffffffffffffffffffffffffffffffffff168152506040518263ffffffff1660e01b8152600401613619919061549c565b6020604051808303816000875af1158015613638573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061365c9190614247565b91505095945050505050565b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036136d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016136d09061552a565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1610613713578284613716565b83835b8092508193505050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361378d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161378490615596565b60405180910390fd5b9250929050565b6000808314806137bc5750818383856137ad91906155b6565b9250826137ba9190614c82565b145b6137c557600080fd5b92915050565b60008282846137da9190615610565b91508110156137e857600080fd5b92915050565b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff160361382957600080fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1610613863578284613866565b83835b8092508193505050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036138a757600080fd5b9250929050565b6138b6613bd1565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1611156138f557828480945081955050505b60405180606001604052808573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1681526020018362ffffff1681525090509392505050565b6000816020015173ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff161061398c57600080fd5b828260000151836020015184604001516040516020016139ae93929190615666565b604051602081830303815290604052805190602001207fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b5460001b6040516020016139fa9392919061569d565b6040516020818303038152906040528051906020012060001c905092915050565b6060613a2a8484600085613a33565b90509392505050565b606082471015613a78576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613a6f90615757565b60405180910390fd5b613a8185613b47565b613ac0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613ab7906157c3565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051613ae9919061581f565b60006040518083038185875af1925050503d8060008114613b26576040519150601f19603f3d011682016040523d82523d6000602084013e613b2b565b606091505b5091509150613b3b828286613b6a565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60608315613b7a57829050613bca565b600083511115613b8d5782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613bc1919061587a565b60405180910390fd5b9392505050565b6040518060600160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600062ffffff1681525090565b6000819050919050565b613c3681613c23565b82525050565b6000602082019050613c516000830184613c2d565b92915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613c9682613c6b565b9050919050565b6000613ca882613c8b565b9050919050565b613cb881613c9d565b8114613cc357600080fd5b50565b600081359050613cd581613caf565b92915050565b613ce481613c8b565b8114613cef57600080fd5b50565b600081359050613d0181613cdb565b92915050565b613d1081613c23565b8114613d1b57600080fd5b50565b600081359050613d2d81613d07565b92915050565b600080600060608486031215613d4c57613d4b613c61565b5b6000613d5a86828701613cc6565b9350506020613d6b86828701613cf2565b9250506040613d7c86828701613d1e565b9150509250925092565b600080fd5b600080fd5b600080fd5b60008083601f840112613dab57613daa613d86565b5b8235905067ffffffffffffffff811115613dc857613dc7613d8b565b5b602083019150836001820283011115613de457613de3613d90565b5b9250929050565b600080600080600060808688031215613e0757613e06613c61565b5b6000613e1588828901613cf2565b9550506020613e2688828901613d1e565b9450506040613e3788828901613d1e565b935050606086013567ffffffffffffffff811115613e5857613e57613c66565b5b613e6488828901613d95565b92509250509295509295909350565b600062ffffff82169050919050565b613e8b81613e73565b8114613e9657600080fd5b50565b600081359050613ea881613e82565b92915050565b60008060008060808587031215613ec857613ec7613c61565b5b6000613ed687828801613d1e565b9450506020613ee787828801613cf2565b9350506040613ef887828801613e99565b9250506060613f0987828801613d1e565b91505092959194509250565b60008115159050919050565b613f2a81613f15565b8114613f3557600080fd5b50565b600081359050613f4781613f21565b92915050565b600080600080600060a08688031215613f6957613f68613c61565b5b6000613f7788828901613d1e565b9550506020613f8888828901613d1e565b9450506040613f9988828901613f38565b9350506060613faa88828901613cf2565b9250506080613fbb88828901613d1e565b9150509295509295909350565b600080600060608486031215613fe157613fe0613c61565b5b6000613fef86828701613d1e565b935050602061400086828701613cf2565b925050604061401186828701613d1e565b9150509250925092565b61402481613c8b565b82525050565b600060208201905061403f600083018461401b565b92915050565b60006020828403121561405b5761405a613c61565b5b600061406984828501613d1e565b91505092915050565b60006020828403121561408857614087613c61565b5b600061409684828501613cf2565b91505092915050565b6000819050919050565b6140b28161409f565b81146140bd57600080fd5b50565b6000813590506140cf816140a9565b92915050565b600080600080606085870312156140ef576140ee613c61565b5b60006140fd878288016140c0565b945050602061410e878288016140c0565b935050604085013567ffffffffffffffff81111561412f5761412e613c66565b5b61413b87828801613d95565b925092505092959194509250565b600082825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000614190602083614149565b915061419b8261415a565b602082019050919050565b600060208201905081810360008301526141bf81614183565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b60006141fc601f83614149565b9150614207826141c6565b602082019050919050565b6000602082019050818103600083015261422b816141ef565b9050919050565b60008151905061424181613d07565b92915050565b60006020828403121561425d5761425c613c61565b5b600061426b84828501614232565b91505092915050565b7f4e6f7420656e6f75676820746f6b656e00000000000000000000000000000000600082015250565b60006142aa601083614149565b91506142b582614274565b602082019050919050565b600060208201905081810360008301526142d98161429d565b9050919050565b600060ff82169050919050565b6142f6816142e0565b811461430157600080fd5b50565b600081359050614313816142ed565b92915050565b6000806000806080858703121561433357614332613c61565b5b600061434187828801613d1e565b945050602061435287828801614304565b935050604061436387828801613e99565b925050606061437487828801613d1e565b91505092959194509250565b614389816142e0565b82525050565b6000819050919050565b6000819050919050565b60006143be6143b96143b48461438f565b614399565b6142e0565b9050919050565b6143ce816143a3565b82525050565b60006080820190506143e96000830187613c2d565b6143f66020830186614380565b61440360408301856143c5565b6144106060830184613c2d565b95945050505050565b600061443461442f61442a8461438f565b614399565b613c23565b9050919050565b61444481614419565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015614484578082015181840152602081019050614469565b83811115614493576000848401525b50505050565b6000601f19601f8301169050919050565b60006144b58261444a565b6144bf8185614455565b93506144cf818560208601614466565b6144d881614499565b840191505092915050565b60006080820190506144f86000830187613c2d565b614505602083018661443b565b614512604083018561401b565b818103606083015261452481846144aa565b905095945050505050565b6000608082019050614544600083018761443b565b6145516020830186613c2d565b61455e604083018561401b565b818103606083015261457081846144aa565b905095945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006145b582613c6b565b91506145c083613c6b565b9250828210156145d3576145d261457b565b5b828203905092915050565b60006145e982613c6b565b91506145f483613c6b565b92508273ffffffffffffffffffffffffffffffffffffffff0382111561461d5761461c61457b565b5b828201905092915050565b600060808201905061463d6000830187613c2d565b61464a602083018661401b565b6146576040830185614380565b6146646060830184613c2d565b95945050505050565b61467681613f15565b82525050565b6146858161409f565b82525050565b61469481613c6b565b82525050565b600060a0820190506146af600083018861401b565b6146bc602083018761466d565b6146c9604083018661467c565b6146d6606083018561468b565b81810360808301526146e881846144aa565b90509695505050505050565b600081519050614703816140a9565b92915050565b600080604083850312156147205761471f613c61565b5b600061472e858286016146f4565b925050602061473f858286016146f4565b9150509250929050565b7f4e6f7420656e6f75676820455448000000000000000000000000000000000000600082015250565b600061477f600e83614149565b915061478a82614749565b602082019050919050565b600060208201905081810360008301526147ae81614772565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000614811602683614149565b915061481c826147b5565b604082019050919050565b6000602082019050818103600083015261484081614804565b9050919050565b600061485282613c6b565b9050919050565b61486281614847565b811461486d57600080fd5b50565b60008135905061487f81614859565b92915050565b6000806000806080858703121561489f5761489e613c61565b5b60006148ad87828801613d1e565b94505060206148be87828801614870565b93505060406148cf87828801614304565b92505060606148e087828801613d1e565b91505092959194509250565b6000604082019050614901600083018561401b565b61490e6020830184613c2d565b9392505050565b60008151905061492481613cdb565b92915050565b6000602082840312156149405761493f613c61565b5b600061494e84828501614915565b91505092915050565b60008151905061496681613f21565b92915050565b60006020828403121561498257614981613c61565b5b600061499084828501614957565b91505092915050565b7f616d6f756e74206c657373206d696e0000000000000000000000000000000000600082015250565b60006149cf600f83614149565b91506149da82614999565b602082019050919050565b600060208201905081810360008301526149fe816149c2565b9050919050565b614a0e81613c23565b82525050565b614a1d81613c8b565b82525050565b6000606082019050614a386000830186614a05565b614a456020830185614a14565b614a526040830184614a14565b949350505050565b60006dffffffffffffffffffffffffffff82169050919050565b614a7d81614a5a565b8114614a8857600080fd5b50565b600081519050614a9a81614a74565b92915050565b600063ffffffff82169050919050565b614ab981614aa0565b8114614ac457600080fd5b50565b600081519050614ad681614ab0565b92915050565b600080600060608486031215614af557614af4613c61565b5b6000614b0386828701614a8b565b9350506020614b1486828701614a8b565b9250506040614b2586828701614ac7565b9150509250925092565b7f556e697377617056324c6962726172793a20494e53554646494349454e545f4960008201527f4e5055545f414d4f554e54000000000000000000000000000000000000000000602082015250565b6000614b8b602b83614149565b9150614b9682614b2f565b604082019050919050565b60006020820190508181036000830152614bba81614b7e565b9050919050565b7f556e697377617056324c6962726172793a20494e53554646494349454e545f4c60008201527f4951554944495459000000000000000000000000000000000000000000000000602082015250565b6000614c1d602883614149565b9150614c2882614bc1565b604082019050919050565b60006020820190508181036000830152614c4c81614c10565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000614c8d82613c23565b9150614c9883613c23565b925082614ca857614ca7614c53565b5b828204905092915050565b614cbc81613e73565b82525050565b6000608082019050614cd76000830187613c2d565b614ce46020830186614380565b614cf16040830185614cb3565b614cfe6060830184613c2d565b95945050505050565b60008160601b9050919050565b6000614d1f82614d07565b9050919050565b6000614d3182614d14565b9050919050565b614d49614d4482613c8b565b614d26565b82525050565b6000614d5b8285614d38565b601482019150614d6b8284614d38565b6014820191508190509392505050565b600081905092915050565b7fff00000000000000000000000000000000000000000000000000000000000000600082015250565b6000614dbc600183614d7b565b9150614dc782614d86565b600182019050919050565b6000819050919050565b6000819050919050565b614df7614df282614dd2565b614ddc565b82525050565b7f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f600082015250565b6000614e33602083614d7b565b9150614e3e82614dfd565b602082019050919050565b6000614e5482614daf565b9150614e608285614d38565b601482019150614e708284614de6565b602082019150614e7f82614e26565b91508190509392505050565b7f494e53554646494349454e545f494e5055545f414d4f554e5400000000000000600082015250565b6000614ec1601983614149565b9150614ecc82614e8b565b602082019050919050565b60006020820190508181036000830152614ef081614eb4565b9050919050565b7fe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303600082015250565b6000614f2d602083614d7b565b9150614f3882614ef7565b602082019050919050565b6000614f4e82614daf565b9150614f5a8285614d38565b601482019150614f6a8284614de6565b602082019150614f7982614f20565b91508190509392505050565b6000614f908261409f565b91507f80000000000000000000000000000000000000000000000000000000000000008203614fc257614fc161457b565b5b816000039050919050565b7f616d6f756e7420657468206f766572666c6f7700000000000000000000000000600082015250565b6000615003601383614149565b915061500e82614fcd565b602082019050919050565b6000602082019050818103600083015261503281614ff6565b9050919050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b6000615095602a83614149565b91506150a082615039565b604082019050919050565b600060208201905081810360008301526150c481615088565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61515e81613c8b565b82525050565b60006151708383615155565b60208301905092915050565b6000602082019050919050565b600061519482615129565b61519e8185615134565b93506151a983615145565b8060005b838110156151da5781516151c18882615164565b97506151cc8361517c565b9250506001810190506151ad565b5085935050505092915050565b600060a0820190506151fc6000830188613c2d565b6152096020830187613c2d565b818103604083015261521b8186615189565b905061522a606083018561401b565b6152376080830184613c2d565b9695505050505050565b61524a82614499565b810181811067ffffffffffffffff82111715615269576152686150cb565b5b80604052505050565b600061527c613c57565b90506152888282615241565b919050565b600067ffffffffffffffff8211156152a8576152a76150cb565b5b602082029050602081019050919050565b60006152cc6152c78461528d565b615272565b905080838252602082019050602084028301858111156152ef576152ee613d90565b5b835b8181101561531857806153048882614232565b8452602084019350506020810190506152f1565b5050509392505050565b600082601f83011261533757615336613d86565b5b81516153478482602086016152b9565b91505092915050565b60006020828403121561536657615365613c61565b5b600082015167ffffffffffffffff81111561538457615383613c66565b5b61539084828501615322565b91505092915050565b60006153a482613c23565b91506153af83613c23565b9250828210156153c2576153c161457b565b5b828203905092915050565b6153d681613e73565b82525050565b6153e581613c23565b82525050565b6153f481613c6b565b82525050565b610100820160008201516154116000850182615155565b5060208201516154246020850182615155565b50604082015161543760408501826153cd565b50606082015161544a6060850182615155565b50608082015161545d60808501826153dc565b5060a082015161547060a08501826153dc565b5060c082015161548360c08501826153dc565b5060e082015161549660e08501826153eb565b50505050565b6000610100820190506154b260008301846153fa565b92915050565b7f556e697377617056324c6962726172793a204944454e544943414c5f4144445260008201527f4553534553000000000000000000000000000000000000000000000000000000602082015250565b6000615514602583614149565b915061551f826154b8565b604082019050919050565b6000602082019050818103600083015261554381615507565b9050919050565b7f556e697377617056324c6962726172793a205a45524f5f414444524553530000600082015250565b6000615580601e83614149565b915061558b8261554a565b602082019050919050565b600060208201905081810360008301526155af81615573565b9050919050565b60006155c182613c23565b91506155cc83613c23565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156156055761560461457b565b5b828202905092915050565b600061561b82613c23565b915061562683613c23565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561565b5761565a61457b565b5b828201905092915050565b600060608201905061567b600083018661401b565b615688602083018561401b565b6156956040830184614cb3565b949350505050565b60006156a882614daf565b91506156b48286614d38565b6014820191506156c48285614de6565b6020820191506156d48284614de6565b602082019150819050949350505050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b6000615741602683614149565b915061574c826156e5565b604082019050919050565b6000602082019050818103600083015261577081615734565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b60006157ad601d83614149565b91506157b882615777565b602082019050919050565b600060208201905081810360008301526157dc816157a0565b9050919050565b600081905092915050565b60006157f98261444a565b61580381856157e3565b9350615813818560208601614466565b80840191505092915050565b600061582b82846157ee565b915081905092915050565b600081519050919050565b600061584c82615836565b6158568185614149565b9350615866818560208601614466565b61586f81614499565b840191505092915050565b600060208201905081810360008301526158948184615841565b90509291505056fea2646970667358221220ac18025e40aedd151d9630a036486ebd0cdd46244a0f89533ec8e58d801fb15164736f6c634300080d0033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.