Contract Address Details

0x1E876cCe41B7b844FDe09E38Fa1cf00f213bFf56

Contract Name
NetswapRouter
Creator
0x9c003f–bede97 at 0x0bd97e–135060
Balance
0 Metis
Tokens
Fetching tokens...
Transactions
483,037 Transactions
Transfers
363,061 Transfers
Gas Used
153,747,089,025
Last Balance Update
3695570
Contract name:
NetswapRouter




Optimization enabled
true
Compiler version
v0.6.12+commit.27d51765




Optimization runs
9999
EVM Version
default




Verified at
2021-12-06T11:54:40.089418Z

Constructor Arguments

00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f000000000000000000000000deaddeaddeaddeaddeaddeaddeaddeaddead0000

Arg [0] (address) : 0x70f51d68d16e8f9e418441280342bd43ac9dff9f
Arg [1] (address) : 0xdeaddeaddeaddeaddeaddeaddeaddeaddead0000

              

Contract source code

// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

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

    function name() external pure returns (string memory);
    function symbol() external pure returns (string memory);
    function decimals() external pure returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);
    function PERMIT_TYPEHASH() external pure returns (bytes32);
    function nonces(address owner) external view returns (uint);

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

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

    function MINIMUM_LIQUIDITY() external pure returns (uint);
    function factory() external view returns (address);
    function token0() external view returns (address);
    function token1() external view returns (address);
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
    function price0CumulativeLast() external view returns (uint);
    function price1CumulativeLast() external view returns (uint);
    function kLast() external view returns (uint);

    function mint(address to) external returns (uint liquidity);
    function burn(address to) external returns (uint amount0, uint amount1);
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
    function skim(address to) external;
    function sync() external;

    function initialize(address, address) external;
}

pragma solidity =0.6.12;

// a library for performing overflow-safe math, courtesy of DappHub (https://github.com/dapphub/ds-math)

library SafeMathNetswap {
    function add(uint x, uint y) internal pure returns (uint z) {
        require((z = x + y) >= x, 'ds-math-add-overflow');
    }

    function sub(uint x, uint y) internal pure returns (uint z) {
        require((z = x - y) <= x, 'ds-math-sub-underflow');
    }

    function mul(uint x, uint y) internal pure returns (uint z) {
        require(y == 0 || (z = x * y) / y == x, 'ds-math-mul-overflow');
    }
}


pragma solidity >=0.5.0;

interface INetswapFactory {
    event PairCreated(address indexed token0, address indexed token1, address pair, uint);

    function feeTo() external view returns (address);
    function feeRate() external view returns (uint);
    function feeToSetter() external view returns (address);

    function getPair(address tokenA, address tokenB) external view returns (address pair);
    function allPairs(uint) external view returns (address pair);
    function allPairsLength() external view returns (uint);

    function createPair(address tokenA, address tokenB) external returns (address pair);

    function setFeeTo(address) external;
    function setFeeToSetter(address) external;
}

pragma solidity >=0.5.0;



library NetswapLibrary {
    using SafeMathNetswap for uint;

    // 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, 'NetswapLibrary: IDENTICAL_ADDRESSES');
        (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
        require(token0 != address(0), 'NetswapLibrary: 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(uint(keccak256(abi.encodePacked(
                hex'ff',
                factory,
                keccak256(abi.encodePacked(token0, token1)),
                hex'966d65068a6a30f10fd1fa814258637a34e059081d79daa94f3e2b6cec48e810' // init code hash
            ))));
    }

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

    // given some amount of an asset and pair reserves, returns an equivalent amount of the other asset
    function quote(uint amountA, uint reserveA, uint reserveB) internal pure returns (uint amountB) {
        require(amountA > 0, 'NetswapLibrary: INSUFFICIENT_AMOUNT');
        require(reserveA > 0 && reserveB > 0, 'NetswapLibrary: INSUFFICIENT_LIQUIDITY');
        amountB = amountA.mul(reserveB) / reserveA;
    }

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

    // given an output amount of an asset and pair reserves, returns a required input amount of the other asset
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut, uint feeRate) internal pure returns (uint amountIn) {
        require(amountOut > 0, 'NetswapLibrary: INSUFFICIENT_OUTPUT_AMOUNT');
        require(reserveIn > 0 && reserveOut > 0, 'NetswapLibrary: INSUFFICIENT_LIQUIDITY');
        uint numerator = reserveIn.mul(amountOut).mul(1000);
        uint denominator = reserveOut.sub(amountOut).mul(1000 - feeRate);
        amountIn = (numerator / denominator).add(1);
    }

    // performs chained getAmountOut calculations on any number of pairs
    function getAmountsOut(address factory, uint amountIn, address[] memory path, uint feeRate) internal view returns (uint[] memory amounts) {
        require(path.length >= 2, 'NetswapLibrary: INVALID_PATH');
        amounts = new uint[](path.length);
        amounts[0] = amountIn;
        for (uint i; i < path.length - 1; i++) {
            (uint reserveIn, uint reserveOut) = getReserves(factory, path[i], path[i + 1]);
            amounts[i + 1] = getAmountOut(amounts[i], reserveIn, reserveOut, feeRate);
        }
    }

    // performs chained getAmountIn calculations on any number of pairs
    function getAmountsIn(address factory, uint amountOut, address[] memory path, uint feeRate) internal view returns (uint[] memory amounts) {
        require(path.length >= 2, 'NetswapLibrary: INVALID_PATH');
        amounts = new uint[](path.length);
        amounts[amounts.length - 1] = amountOut;
        for (uint i = path.length - 1; i > 0; i--) {
            (uint reserveIn, uint reserveOut) = getReserves(factory, path[i - 1], path[i]);
            amounts[i - 1] = getAmountIn(amounts[i], reserveIn, reserveOut, feeRate);
        }
    }
}

pragma solidity >=0.6.0;

// helper methods for interacting with ERC20 tokens and sending Metis that do not consistently return true/false
library TransferHelper {
    function safeApprove(address token, address to, uint value) internal {
        // bytes4(keccak256(bytes('approve(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: APPROVE_FAILED');
    }

    function safeTransfer(address token, address to, uint value) internal {
        // bytes4(keccak256(bytes('transfer(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FAILED');
    }

    function safeTransferFrom(address token, address from, address to, uint value) internal {
        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FROM_FAILED');
    }

    function safeTransferMetis(address to, uint value) internal {
        (bool success,) = to.call{value:value}(new bytes(0));
        require(success, 'TransferHelper: METIS_TRANSFER_FAILED');
    }
}

pragma solidity >=0.6.2;

interface INetswapRouter {
    function factory() external pure returns (address);
    function Metis() 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 addLiquidityMetis(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountMetisMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountMetis, 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 removeLiquidityMetis(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountMetisMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountMetis);
    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 removeLiquidityMetisWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountMetisMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountMetis);
    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 swapExactMetisForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    function swapTokensForExactMetis(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapExactTokensForMetis(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapMetisForExactTokens(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 view returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external view 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);
}

pragma solidity >=0.6.2;


interface INetswapRouter02 is INetswapRouter {
    function removeLiquidityMetisSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountMetisMin,
        address to,
        uint deadline
    ) external returns (uint amountMetis);
    function removeLiquidityMetisWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountMetisMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountMetis);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactMetisForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
    function swapExactTokensForMetisSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapMining() external pure returns (address);
}


pragma solidity >=0.5.0;

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

    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function decimals() external view returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);
}

interface ISwapMining {
    function swap(address account, address input, address output, uint256 amount) external returns (bool);
}

contract Ownable {
    address private _owner;

    constructor () internal {
        _owner = msg.sender;
        emit OwnershipTransferred(address(0), _owner);
    }

    function owner() public view returns (address) {
        return _owner;
    }

    function isOwner(address account) public view returns (bool) {
        return account == _owner;
    }

    function renounceOwnership() public onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }

    function transferOwnership(address newOwner) public onlyOwner {
        _transferOwnership(newOwner);
    }


    modifier onlyOwner() {
        require(isOwner(msg.sender), "Ownable: caller is not the owner");
        _;
    }

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


pragma solidity =0.6.12;

contract NetswapRouter is INetswapRouter02, Ownable {
    using SafeMathNetswap for uint;

    address public immutable override factory;
    address public immutable override Metis;
    address public override swapMining;

    modifier ensure(uint deadline) {
        require(deadline >= block.timestamp, 'NetswapRouter: EXPIRED');
        _;
    }

    constructor(address _factory, address _Metis) public {
        factory = _factory;
        Metis = _Metis;
    }

    function setSwapMining(address _swapMininng) public onlyOwner {
        swapMining = _swapMininng;
    }

    receive() external payable {}

    // **** ADD LIQUIDITY ****
    function _addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin
    ) internal virtual returns (uint amountA, uint amountB) {
        // create the pair if it doesn't exist yet
        if (INetswapFactory(factory).getPair(tokenA, tokenB) == address(0)) {
            INetswapFactory(factory).createPair(tokenA, tokenB);
        }
        (uint reserveA, uint reserveB) = NetswapLibrary.getReserves(factory, tokenA, tokenB);
        if (reserveA == 0 && reserveB == 0) {
            (amountA, amountB) = (amountADesired, amountBDesired);
        } else {
            uint amountBOptimal = NetswapLibrary.quote(amountADesired, reserveA, reserveB);
            if (amountBOptimal <= amountBDesired) {
                require(amountBOptimal >= amountBMin, 'NetswapRouter: INSUFFICIENT_B_AMOUNT');
                (amountA, amountB) = (amountADesired, amountBOptimal);
            } else {
                uint amountAOptimal = NetswapLibrary.quote(amountBDesired, reserveB, reserveA);
                assert(amountAOptimal <= amountADesired);
                require(amountAOptimal >= amountAMin, 'NetswapRouter: INSUFFICIENT_A_AMOUNT');
                (amountA, amountB) = (amountAOptimal, amountBDesired);
            }
        }
    }
    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external virtual override ensure(deadline) returns (uint amountA, uint amountB, uint liquidity) {
        (amountA, amountB) = _addLiquidity(tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin);
        address pair = NetswapLibrary.pairFor(factory, tokenA, tokenB);
        TransferHelper.safeTransferFrom(tokenA, msg.sender, pair, amountA);
        TransferHelper.safeTransferFrom(tokenB, msg.sender, pair, amountB);
        liquidity = INetswapPair(pair).mint(to);
    }
    function addLiquidityMetis(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountMetisMin,
        address to,
        uint deadline
    ) external virtual override payable ensure(deadline) returns (uint amountToken, uint amountMetis, uint liquidity) {
        (amountToken, amountMetis) = _addLiquidity(
            token,
            Metis,
            amountTokenDesired,
            msg.value,
            amountTokenMin,
            amountMetisMin
        );
        address pair = NetswapLibrary.pairFor(factory, token, Metis);
        TransferHelper.safeTransferFrom(token, msg.sender, pair, amountToken);
        // safe transfer Metis from router to pair
        TransferHelper.safeTransfer(Metis, pair, amountMetis);
        liquidity = INetswapPair(pair).mint(to);
        // refund dust metis, if any
        if (msg.value > amountMetis) TransferHelper.safeTransferMetis(msg.sender, msg.value - amountMetis);
    }

    // **** REMOVE LIQUIDITY ****
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) public virtual override ensure(deadline) returns (uint amountA, uint amountB) {
        address pair = NetswapLibrary.pairFor(factory, tokenA, tokenB);
        INetswapPair(pair).transferFrom(msg.sender, pair, liquidity); // send liquidity to pair
        (uint amount0, uint amount1) = INetswapPair(pair).burn(to);
        (address token0,) = NetswapLibrary.sortTokens(tokenA, tokenB);
        (amountA, amountB) = tokenA == token0 ? (amount0, amount1) : (amount1, amount0);
        require(amountA >= amountAMin, 'NetswapRouter: INSUFFICIENT_A_AMOUNT');
        require(amountB >= amountBMin, 'NetswapRouter: INSUFFICIENT_B_AMOUNT');
    }
    function removeLiquidityMetis(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountMetisMin,
        address to,
        uint deadline
    ) public virtual override ensure(deadline) returns (uint amountToken, uint amountMetis) {
        (amountToken, amountMetis) = removeLiquidity(
            token,
            Metis,
            liquidity,
            amountTokenMin,
            amountMetisMin,
            address(this),
            deadline
        );
        TransferHelper.safeTransfer(token, to, amountToken);
        TransferHelper.safeTransferMetis(to, amountMetis);
    }
    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 virtual override returns (uint amountA, uint amountB) {
        address pair = NetswapLibrary.pairFor(factory, tokenA, tokenB);
        uint value = approveMax ? uint(-1) : liquidity;
        INetswapPair(pair).permit(msg.sender, address(this), value, deadline, v, r, s);
        (amountA, amountB) = removeLiquidity(tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline);
    }
    function removeLiquidityMetisWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountMetisMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external virtual override returns (uint amountToken, uint amountMetis) {
        address pair = NetswapLibrary.pairFor(factory, token, Metis);
        uint value = approveMax ? uint(-1) : liquidity;
        INetswapPair(pair).permit(msg.sender, address(this), value, deadline, v, r, s);
        (amountToken, amountMetis) = removeLiquidityMetis(token, liquidity, amountTokenMin, amountMetisMin, to, deadline);
    }

    // **** REMOVE LIQUIDITY (supporting fee-on-transfer tokens) ****
    function removeLiquidityMetisSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountMetisMin,
        address to,
        uint deadline
    ) public virtual override ensure(deadline) returns (uint amountMetis) {
        (, amountMetis) = removeLiquidity(
            token,
            Metis,
            liquidity,
            amountTokenMin,
            amountMetisMin,
            address(this),
            deadline
        );
        TransferHelper.safeTransfer(token, to, IERC20Netswap(token).balanceOf(address(this)));
        TransferHelper.safeTransferMetis(to, amountMetis);
    }
    function removeLiquidityMetisWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountMetisMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external virtual override returns (uint amountMetis) {
        address pair = NetswapLibrary.pairFor(factory, token, Metis);
        uint value = approveMax ? uint(-1) : liquidity;
        INetswapPair(pair).permit(msg.sender, address(this), value, deadline, v, r, s);
        amountMetis = removeLiquidityMetisSupportingFeeOnTransferTokens(
            token, liquidity, amountTokenMin, amountMetisMin, to, deadline
        );
    }

    // **** SWAP ****
    // requires the initial amount to have already been sent to the first pair
    function _swap(uint[] memory amounts, address[] memory path, address _to) internal virtual {
        for (uint i; i < path.length - 1; i++) {
            (address input, address output) = (path[i], path[i + 1]);
            (address token0,) = NetswapLibrary.sortTokens(input, output);
            uint amountOut = amounts[i + 1];
            if (swapMining != address(0)) {
                ISwapMining(swapMining).swap(msg.sender, input, output, amountOut);
            }
            (uint amount0Out, uint amount1Out) = input == token0 ? (uint(0), amountOut) : (amountOut, uint(0));
            address to = i < path.length - 2 ? NetswapLibrary.pairFor(factory, output, path[i + 2]) : _to;
            INetswapPair(NetswapLibrary.pairFor(factory, input, output)).swap(
                amount0Out, amount1Out, to, new bytes(0)
            );
        }
    }
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external virtual override ensure(deadline) returns (uint[] memory amounts) {
        amounts = NetswapLibrary.getAmountsOut(factory, amountIn, path, INetswapFactory(factory).feeRate());
        require(amounts[amounts.length - 1] >= amountOutMin, 'NetswapRouter: INSUFFICIENT_OUTPUT_AMOUNT');
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, NetswapLibrary.pairFor(factory, path[0], path[1]), amounts[0]
        );
        _swap(amounts, path, to);
    }
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external virtual override ensure(deadline) returns (uint[] memory amounts) {
        amounts = NetswapLibrary.getAmountsIn(factory, amountOut, path, INetswapFactory(factory).feeRate());
        require(amounts[0] <= amountInMax, 'NetswapRouter: EXCESSIVE_INPUT_AMOUNT');
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, NetswapLibrary.pairFor(factory, path[0], path[1]), amounts[0]
        );
        _swap(amounts, path, to);
    }
    function swapExactMetisForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        virtual
        override
        payable
        ensure(deadline)
        returns (uint[] memory amounts)
    {
        require(path[0] == Metis, 'NetswapRouter: INVALID_PATH');
        amounts = NetswapLibrary.getAmountsOut(factory, msg.value, path, INetswapFactory(factory).feeRate());
        require(amounts[amounts.length - 1] >= amountOutMin, 'NetswapRouter: INSUFFICIENT_OUTPUT_AMOUNT');
        // safe transfer metis from router to pair
        TransferHelper.safeTransfer(Metis, NetswapLibrary.pairFor(factory, path[0], path[1]), amounts[0]);
        _swap(amounts, path, to);
    }
    function swapTokensForExactMetis(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        virtual
        override
        ensure(deadline)
        returns (uint[] memory amounts)
    {
        require(path[path.length - 1] == Metis, 'NetswapRouter: INVALID_PATH');
        amounts = NetswapLibrary.getAmountsIn(factory, amountOut, path, INetswapFactory(factory).feeRate());
        require(amounts[0] <= amountInMax, 'NetswapRouter: EXCESSIVE_INPUT_AMOUNT');
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, NetswapLibrary.pairFor(factory, path[0], path[1]), amounts[0]
        );
        _swap(amounts, path, address(this));
        TransferHelper.safeTransferMetis(to, amounts[amounts.length - 1]);
    }
    function swapExactTokensForMetis(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        virtual
        override
        ensure(deadline)
        returns (uint[] memory amounts)
    {
        require(path[path.length - 1] == Metis, 'NetswapRouter: INVALID_PATH');
        amounts = NetswapLibrary.getAmountsOut(factory, amountIn, path, INetswapFactory(factory).feeRate());
        require(amounts[amounts.length - 1] >= amountOutMin, 'NetswapRouter: INSUFFICIENT_OUTPUT_AMOUNT');
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, NetswapLibrary.pairFor(factory, path[0], path[1]), amounts[0]
        );
        _swap(amounts, path, address(this));
        TransferHelper.safeTransferMetis(to, amounts[amounts.length - 1]);
    }
    function swapMetisForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        virtual
        override
        payable
        ensure(deadline)
        returns (uint[] memory amounts)
    {
        require(path[0] == Metis, 'NetswapRouter: INVALID_PATH');
        amounts = NetswapLibrary.getAmountsIn(factory, amountOut, path, INetswapFactory(factory).feeRate());
        require(amounts[0] <= msg.value, 'NetswapRouter: EXCESSIVE_INPUT_AMOUNT');
        // safe transfer metis from router to pair
        TransferHelper.safeTransfer(Metis, NetswapLibrary.pairFor(factory, path[0], path[1]), amounts[0]);
        _swap(amounts, path, to);
        // refund dust metis, if any
        if (msg.value > amounts[0]) TransferHelper.safeTransferMetis(msg.sender, msg.value - amounts[0]);
    }

    // **** SWAP (supporting fee-on-transfer tokens) ****
    // requires the initial amount to have already been sent to the first pair
    function _swapSupportingFeeOnTransferTokens(address[] memory path, address _to) internal virtual {
        for (uint i; i < path.length - 1; i++) {
            (address input, address output) = (path[i], path[i + 1]);
            (address token0,) = NetswapLibrary.sortTokens(input, output);
            INetswapPair pair = INetswapPair(NetswapLibrary.pairFor(factory, input, output));
            uint amountInput;
            uint amountOutput;
            { // scope to avoid stack too deep errors
            (uint reserve0, uint reserve1,) = pair.getReserves();
            (uint reserveInput, uint reserveOutput) = input == token0 ? (reserve0, reserve1) : (reserve1, reserve0);
            amountInput = IERC20Netswap(input).balanceOf(address(pair)).sub(reserveInput);
            amountOutput = NetswapLibrary.getAmountOut(amountInput, reserveInput, reserveOutput, INetswapFactory(factory).feeRate());
            }
            if (swapMining != address(0)) {
                ISwapMining(swapMining).swap(msg.sender, input, output, amountOutput);
            }
            (uint amount0Out, uint amount1Out) = input == token0 ? (uint(0), amountOutput) : (amountOutput, uint(0));
            address to = i < path.length - 2 ? NetswapLibrary.pairFor(factory, output, path[i + 2]) : _to;
            pair.swap(amount0Out, amount1Out, to, new bytes(0));
        }
    }
    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external virtual override ensure(deadline) {
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, NetswapLibrary.pairFor(factory, path[0], path[1]), amountIn
        );
        uint balanceBefore = IERC20Netswap(path[path.length - 1]).balanceOf(to);
        _swapSupportingFeeOnTransferTokens(path, to);
        require(
            IERC20Netswap(path[path.length - 1]).balanceOf(to).sub(balanceBefore) >= amountOutMin,
            'NetswapRouter: INSUFFICIENT_OUTPUT_AMOUNT'
        );
    }
    function swapExactMetisForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    )
        external
        virtual
        override
        payable
        ensure(deadline)
    {
        require(path[0] == Metis, 'NetswapRouter: INVALID_PATH');
        uint amountIn = msg.value;
        // safe transfer metis from router to pair
        TransferHelper.safeTransfer(Metis, NetswapLibrary.pairFor(factory, path[0], path[1]), amountIn);
        uint balanceBefore = IERC20Netswap(path[path.length - 1]).balanceOf(to);
        _swapSupportingFeeOnTransferTokens(path, to);
        require(
            IERC20Netswap(path[path.length - 1]).balanceOf(to).sub(balanceBefore) >= amountOutMin,
            'NetswapRouter: INSUFFICIENT_OUTPUT_AMOUNT'
        );
    }
    function swapExactTokensForMetisSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    )
        external
        virtual
        override
        ensure(deadline)
    {
        require(path[path.length - 1] == Metis, 'NetswapRouter: INVALID_PATH');
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, NetswapLibrary.pairFor(factory, path[0], path[1]), amountIn
        );
        _swapSupportingFeeOnTransferTokens(path, address(this));
        uint amountOut = IERC20Netswap(Metis).balanceOf(address(this));
        require(amountOut >= amountOutMin, 'NetswapRouter: INSUFFICIENT_OUTPUT_AMOUNT');
        TransferHelper.safeTransferMetis(to, amountOut);
    }

    // **** LIBRARY FUNCTIONS ****
    function quote(uint amountA, uint reserveA, uint reserveB) public pure virtual override returns (uint amountB) {
        return NetswapLibrary.quote(amountA, reserveA, reserveB);
    }

    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut)
        public
        view
        virtual
        override
        returns (uint amountOut)
    {
        return NetswapLibrary.getAmountOut(amountIn, reserveIn, reserveOut, INetswapFactory(factory).feeRate());
    }

    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut)
        public
        view
        virtual
        override
        returns (uint amountIn)
    {
        return NetswapLibrary.getAmountIn(amountOut, reserveIn, reserveOut, INetswapFactory(factory).feeRate());
    }

    function getAmountsOut(uint amountIn, address[] memory path)
        public
        view
        virtual
        override
        returns (uint[] memory amounts)
    {
        return NetswapLibrary.getAmountsOut(factory, amountIn, path, INetswapFactory(factory).feeRate());
    }

    function getAmountsIn(uint amountOut, address[] memory path)
        public
        view
        virtual
        override
        returns (uint[] memory amounts)
    {
        return NetswapLibrary.getAmountsIn(factory, amountOut, path, INetswapFactory(factory).feeRate());
    }
}
        

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_factory","internalType":"address"},{"type":"address","name":"_Metis","internalType":"address"}]},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"Metis","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"amountA","internalType":"uint256"},{"type":"uint256","name":"amountB","internalType":"uint256"},{"type":"uint256","name":"liquidity","internalType":"uint256"}],"name":"addLiquidity","inputs":[{"type":"address","name":"tokenA","internalType":"address"},{"type":"address","name":"tokenB","internalType":"address"},{"type":"uint256","name":"amountADesired","internalType":"uint256"},{"type":"uint256","name":"amountBDesired","internalType":"uint256"},{"type":"uint256","name":"amountAMin","internalType":"uint256"},{"type":"uint256","name":"amountBMin","internalType":"uint256"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"deadline","internalType":"uint256"}]},{"type":"function","stateMutability":"payable","outputs":[{"type":"uint256","name":"amountToken","internalType":"uint256"},{"type":"uint256","name":"amountMetis","internalType":"uint256"},{"type":"uint256","name":"liquidity","internalType":"uint256"}],"name":"addLiquidityMetis","inputs":[{"type":"address","name":"token","internalType":"address"},{"type":"uint256","name":"amountTokenDesired","internalType":"uint256"},{"type":"uint256","name":"amountTokenMin","internalType":"uint256"},{"type":"uint256","name":"amountMetisMin","internalType":"uint256"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"deadline","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"factory","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"amountIn","internalType":"uint256"}],"name":"getAmountIn","inputs":[{"type":"uint256","name":"amountOut","internalType":"uint256"},{"type":"uint256","name":"reserveIn","internalType":"uint256"},{"type":"uint256","name":"reserveOut","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"amountOut","internalType":"uint256"}],"name":"getAmountOut","inputs":[{"type":"uint256","name":"amountIn","internalType":"uint256"},{"type":"uint256","name":"reserveIn","internalType":"uint256"},{"type":"uint256","name":"reserveOut","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[]","name":"amounts","internalType":"uint256[]"}],"name":"getAmountsIn","inputs":[{"type":"uint256","name":"amountOut","internalType":"uint256"},{"type":"address[]","name":"path","internalType":"address[]"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[]","name":"amounts","internalType":"uint256[]"}],"name":"getAmountsOut","inputs":[{"type":"uint256","name":"amountIn","internalType":"uint256"},{"type":"address[]","name":"path","internalType":"address[]"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isOwner","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"pure","outputs":[{"type":"uint256","name":"amountB","internalType":"uint256"}],"name":"quote","inputs":[{"type":"uint256","name":"amountA","internalType":"uint256"},{"type":"uint256","name":"reserveA","internalType":"uint256"},{"type":"uint256","name":"reserveB","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"amountA","internalType":"uint256"},{"type":"uint256","name":"amountB","internalType":"uint256"}],"name":"removeLiquidity","inputs":[{"type":"address","name":"tokenA","internalType":"address"},{"type":"address","name":"tokenB","internalType":"address"},{"type":"uint256","name":"liquidity","internalType":"uint256"},{"type":"uint256","name":"amountAMin","internalType":"uint256"},{"type":"uint256","name":"amountBMin","internalType":"uint256"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"deadline","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"amountToken","internalType":"uint256"},{"type":"uint256","name":"amountMetis","internalType":"uint256"}],"name":"removeLiquidityMetis","inputs":[{"type":"address","name":"token","internalType":"address"},{"type":"uint256","name":"liquidity","internalType":"uint256"},{"type":"uint256","name":"amountTokenMin","internalType":"uint256"},{"type":"uint256","name":"amountMetisMin","internalType":"uint256"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"deadline","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"amountMetis","internalType":"uint256"}],"name":"removeLiquidityMetisSupportingFeeOnTransferTokens","inputs":[{"type":"address","name":"token","internalType":"address"},{"type":"uint256","name":"liquidity","internalType":"uint256"},{"type":"uint256","name":"amountTokenMin","internalType":"uint256"},{"type":"uint256","name":"amountMetisMin","internalType":"uint256"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"deadline","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"amountToken","internalType":"uint256"},{"type":"uint256","name":"amountMetis","internalType":"uint256"}],"name":"removeLiquidityMetisWithPermit","inputs":[{"type":"address","name":"token","internalType":"address"},{"type":"uint256","name":"liquidity","internalType":"uint256"},{"type":"uint256","name":"amountTokenMin","internalType":"uint256"},{"type":"uint256","name":"amountMetisMin","internalType":"uint256"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"deadline","internalType":"uint256"},{"type":"bool","name":"approveMax","internalType":"bool"},{"type":"uint8","name":"v","internalType":"uint8"},{"type":"bytes32","name":"r","internalType":"bytes32"},{"type":"bytes32","name":"s","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"amountMetis","internalType":"uint256"}],"name":"removeLiquidityMetisWithPermitSupportingFeeOnTransferTokens","inputs":[{"type":"address","name":"token","internalType":"address"},{"type":"uint256","name":"liquidity","internalType":"uint256"},{"type":"uint256","name":"amountTokenMin","internalType":"uint256"},{"type":"uint256","name":"amountMetisMin","internalType":"uint256"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"deadline","internalType":"uint256"},{"type":"bool","name":"approveMax","internalType":"bool"},{"type":"uint8","name":"v","internalType":"uint8"},{"type":"bytes32","name":"r","internalType":"bytes32"},{"type":"bytes32","name":"s","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"amountA","internalType":"uint256"},{"type":"uint256","name":"amountB","internalType":"uint256"}],"name":"removeLiquidityWithPermit","inputs":[{"type":"address","name":"tokenA","internalType":"address"},{"type":"address","name":"tokenB","internalType":"address"},{"type":"uint256","name":"liquidity","internalType":"uint256"},{"type":"uint256","name":"amountAMin","internalType":"uint256"},{"type":"uint256","name":"amountBMin","internalType":"uint256"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"deadline","internalType":"uint256"},{"type":"bool","name":"approveMax","internalType":"bool"},{"type":"uint8","name":"v","internalType":"uint8"},{"type":"bytes32","name":"r","internalType":"bytes32"},{"type":"bytes32","name":"s","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setSwapMining","inputs":[{"type":"address","name":"_swapMininng","internalType":"address"}]},{"type":"function","stateMutability":"payable","outputs":[{"type":"uint256[]","name":"amounts","internalType":"uint256[]"}],"name":"swapExactMetisForTokens","inputs":[{"type":"uint256","name":"amountOutMin","internalType":"uint256"},{"type":"address[]","name":"path","internalType":"address[]"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"deadline","internalType":"uint256"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"swapExactMetisForTokensSupportingFeeOnTransferTokens","inputs":[{"type":"uint256","name":"amountOutMin","internalType":"uint256"},{"type":"address[]","name":"path","internalType":"address[]"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"deadline","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256[]","name":"amounts","internalType":"uint256[]"}],"name":"swapExactTokensForMetis","inputs":[{"type":"uint256","name":"amountIn","internalType":"uint256"},{"type":"uint256","name":"amountOutMin","internalType":"uint256"},{"type":"address[]","name":"path","internalType":"address[]"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"deadline","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"swapExactTokensForMetisSupportingFeeOnTransferTokens","inputs":[{"type":"uint256","name":"amountIn","internalType":"uint256"},{"type":"uint256","name":"amountOutMin","internalType":"uint256"},{"type":"address[]","name":"path","internalType":"address[]"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"deadline","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256[]","name":"amounts","internalType":"uint256[]"}],"name":"swapExactTokensForTokens","inputs":[{"type":"uint256","name":"amountIn","internalType":"uint256"},{"type":"uint256","name":"amountOutMin","internalType":"uint256"},{"type":"address[]","name":"path","internalType":"address[]"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"deadline","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"swapExactTokensForTokensSupportingFeeOnTransferTokens","inputs":[{"type":"uint256","name":"amountIn","internalType":"uint256"},{"type":"uint256","name":"amountOutMin","internalType":"uint256"},{"type":"address[]","name":"path","internalType":"address[]"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"deadline","internalType":"uint256"}]},{"type":"function","stateMutability":"payable","outputs":[{"type":"uint256[]","name":"amounts","internalType":"uint256[]"}],"name":"swapMetisForExactTokens","inputs":[{"type":"uint256","name":"amountOut","internalType":"uint256"},{"type":"address[]","name":"path","internalType":"address[]"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"deadline","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"swapMining","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256[]","name":"amounts","internalType":"uint256[]"}],"name":"swapTokensForExactMetis","inputs":[{"type":"uint256","name":"amountOut","internalType":"uint256"},{"type":"uint256","name":"amountInMax","internalType":"uint256"},{"type":"address[]","name":"path","internalType":"address[]"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"deadline","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256[]","name":"amounts","internalType":"uint256[]"}],"name":"swapTokensForExactTokens","inputs":[{"type":"uint256","name":"amountOut","internalType":"uint256"},{"type":"uint256","name":"amountInMax","internalType":"uint256"},{"type":"address[]","name":"path","internalType":"address[]"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"deadline","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"receive","stateMutability":"payable"}]
            

Deployed ByteCode

0x6080604052600436106101d15760003560e01c80638da5cb5b116100f7578063c3e6ed7111610095578063dcc88f1611610064578063dcc88f1614610c5a578063dd590d7514610cbe578063e8e3370014610d56578063f2fde38b14610db8576101d8565b8063c3e6ed7114610a95578063c45a015514610b08578063d06ca61f14610b1d578063d5968e2714610bd4576101d8565b8063b09d083c116100d1578063b09d083c1461094a578063b430e202146109d0578063baa2abde14610a23578063be159a6e14610a80576101d8565b80638da5cb5b1461088c578063972ae227146108a1578063ad615dec14610914576101d8565b80634902c9461161016f578063715018a61161013e578063715018a614610711578063744dd4911461072657806385f8c259146107be5780638803dbee146107f4576101d8565b80634902c9461461058d5780634e5eda11146106155780634f887183146106465780635c11d79514610679576101d8565b80631f00ca74116101ab5780631f00ca74146103795780632195995c146104305780632f54bf6e146104ae57806338ed1739146104f5576101d8565b8063054d50d4146101dd5780630cd814f9146102255780631c2f599b1461030d576101d8565b366101d857005b600080fd5b3480156101e957600080fd5b506102136004803603606081101561020057600080fd5b5080359060208101359060400135610deb565b60408051918252519081900360200190f35b34801561023157600080fd5b506102bd600480360360a081101561024857600080fd5b81359160208101359181019060608101604082013564010000000081111561026f57600080fd5b82018360208201111561028157600080fd5b803590602001918460208302840111640100000000831117156102a357600080fd5b91935091506001600160a01b038135169060200135610e85565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156102f95781810151838201526020016102e1565b505050509050019250505060405180910390f35b34801561031957600080fd5b50610360600480360360c081101561033057600080fd5b506001600160a01b0381358116916020810135916040820135916060810135916080820135169060a001356111e5565b6040805192835260208301919091528051918290030190f35b34801561038557600080fd5b506102bd6004803603604081101561039c57600080fd5b813591908101906040810160208201356401000000008111156103be57600080fd5b8201836020820111156103d057600080fd5b803590602001918460208302840111640100000000831117156103f257600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611293945050505050565b34801561043c57600080fd5b50610360600480360361016081101561045457600080fd5b506001600160a01b038135811691602081013582169160408201359160608101359160808201359160a08101359091169060c08101359060e081013515159060ff610100820135169061012081013590610140013561134e565b3480156104ba57600080fd5b506104e1600480360360208110156104d157600080fd5b50356001600160a01b0316611461565b604080519115158252519081900360200190f35b34801561050157600080fd5b506102bd600480360360a081101561051857600080fd5b81359160208101359181019060608101604082013564010000000081111561053f57600080fd5b82018360208201111561055157600080fd5b8035906020019184602083028401116401000000008311171561057357600080fd5b91935091506001600160a01b038135169060200135611475565b610613600480360360808110156105a357600080fd5b813591908101906040810160208201356401000000008111156105c557600080fd5b8201836020820111156105d757600080fd5b803590602001918460208302840111640100000000831117156105f957600080fd5b91935091506001600160a01b038135169060200135611645565b005b34801561062157600080fd5b5061062a611978565b604080516001600160a01b039092168252519081900360200190f35b34801561065257600080fd5b506106136004803603602081101561066957600080fd5b50356001600160a01b0316611987565b34801561068557600080fd5b50610613600480360360a081101561069c57600080fd5b8135916020810135918101906060810160408201356401000000008111156106c357600080fd5b8201836020820111156106d557600080fd5b803590602001918460208302840111640100000000831117156106f757600080fd5b91935091506001600160a01b038135169060200135611a1b565b34801561071d57600080fd5b50610613611c14565b34801561073257600080fd5b50610613600480360360a081101561074957600080fd5b81359160208101359181019060608101604082013564010000000081111561077057600080fd5b82018360208201111561078257600080fd5b803590602001918460208302840111640100000000831117156107a457600080fd5b91935091506001600160a01b038135169060200135611cd0565b3480156107ca57600080fd5b50610213600480360360608110156107e157600080fd5b5080359060208101359060400135611eff565b34801561080057600080fd5b506102bd600480360360a081101561081757600080fd5b81359160208101359181019060608101604082013564010000000081111561083e57600080fd5b82018360208201111561085057600080fd5b8035906020019184602083028401116401000000008311171561087257600080fd5b91935091506001600160a01b038135169060200135611f91565b34801561089857600080fd5b5061062a61210f565b3480156108ad57600080fd5b5061036060048036036101408110156108c557600080fd5b506001600160a01b0381358116916020810135916040820135916060810135916080820135169060a08101359060c081013515159060ff60e0820135169061010081013590610120013561211e565b34801561092057600080fd5b506102136004803603606081101561093757600080fd5b508035906020810135906040013561224b565b6102bd6004803603608081101561096057600080fd5b8135919081019060408101602082013564010000000081111561098257600080fd5b82018360208201111561099457600080fd5b803590602001918460208302840111640100000000831117156109b657600080fd5b91935091506001600160a01b038135169060200135612258565b3480156109dc57600080fd5b50610213600480360360c08110156109f357600080fd5b506001600160a01b0381358116916020810135916040820135916060810135916080820135169060a0013561256c565b348015610a2f57600080fd5b50610360600480360360e0811015610a4657600080fd5b506001600160a01b038135811691602081013582169160408201359160608101359160808201359160a08101359091169060c00135612686565b348015610a8c57600080fd5b5061062a61290e565b348015610aa157600080fd5b506102136004803603610140811015610ab957600080fd5b506001600160a01b0381358116916020810135916040820135916060810135916080820135169060a08101359060c081013515159060ff60e08201351690610100810135906101200135612932565b348015610b1457600080fd5b5061062a612a59565b348015610b2957600080fd5b506102bd60048036036040811015610b4057600080fd5b81359190810190604081016020820135640100000000811115610b6257600080fd5b820183602082011115610b7457600080fd5b80359060200191846020830284011164010000000083111715610b9657600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550612a7d945050505050565b6102bd60048036036080811015610bea57600080fd5b81359190810190604081016020820135640100000000811115610c0c57600080fd5b820183602082011115610c1e57600080fd5b80359060200191846020830284011164010000000083111715610c4057600080fd5b91935091506001600160a01b038135169060200135612afe565b610ca0600480360360c0811015610c7057600080fd5b506001600160a01b0381358116916020810135916040820135916060810135916080820135169060a00135612db5565b60408051938452602084019290925282820152519081900360600190f35b348015610cca57600080fd5b506102bd600480360360a0811015610ce157600080fd5b813591602081013591810190606081016040820135640100000000811115610d0857600080fd5b820183602082011115610d1a57600080fd5b80359060200191846020830284011164010000000083111715610d3c57600080fd5b91935091506001600160a01b038135169060200135612f68565b348015610d6257600080fd5b50610ca06004803603610100811015610d7a57600080fd5b506001600160a01b038135811691602081013582169160408201359160608101359160808201359160a08101359160c0820135169060e0013561318b565b348015610dc457600080fd5b5061061360048036036020811015610ddb57600080fd5b50356001600160a01b03166132d0565b6000610e7d8484847f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f6001600160a01b031663978bbdb96040518163ffffffff1660e01b815260040160206040518083038186803b158015610e4c57600080fd5b505afa158015610e60573d6000803e3d6000fd5b505050506040513d6020811015610e7657600080fd5b5051613336565b949350505050565b60608142811015610edd576040805162461bcd60e51b815260206004820152601660248201527f4e657473776170526f757465723a204558504952454400000000000000000000604482015290519081900360640190fd5b6001600160a01b037f000000000000000000000000deaddeaddeaddeaddeaddeaddeaddeaddead00001686866000198101818110610f1757fe5b905060200201356001600160a01b03166001600160a01b031614610f82576040805162461bcd60e51b815260206004820152601b60248201527f4e657473776170526f757465723a20494e56414c49445f504154480000000000604482015290519081900360640190fd5b6110847f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f8988888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080517f978bbdb900000000000000000000000000000000000000000000000000000000815290516001600160a01b037f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f16935063978bbdb992506004808301926020929190829003018186803b15801561105357600080fd5b505afa158015611067573d6000803e3d6000fd5b505050506040513d602081101561107d57600080fd5b5051613412565b9150868260018451038151811061109757fe5b602002602001015110156110dc5760405162461bcd60e51b8152600401808060200182810382526029815260200180614ba36029913960400191505060405180910390fd5b61117a868660008181106110ec57fe5b905060200201356001600160a01b0316336111607f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f8a8a600081811061112e57fe5b905060200201356001600160a01b03168b8b600181811061114b57fe5b905060200201356001600160a01b0316613560565b8560008151811061116d57fe5b602002602001015161364b565b6111b9828787808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152503092506137f4915050565b6111da84836001855103815181106111cd57fe5b6020026020010151613af0565b509695505050505050565b600080824281101561123e576040805162461bcd60e51b815260206004820152601660248201527f4e657473776170526f757465723a204558504952454400000000000000000000604482015290519081900360640190fd5b61126d897f000000000000000000000000deaddeaddeaddeaddeaddeaddeaddeaddead00008a8a8a308a612686565b909350915061127d898685613c06565b6112878583613af0565b50965096945050505050565b60606113457f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f84847f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f6001600160a01b031663978bbdb96040518163ffffffff1660e01b815260040160206040518083038186803b15801561131457600080fd5b505afa158015611328573d6000803e3d6000fd5b505050506040513d602081101561133e57600080fd5b5051613dbc565b90505b92915050565b600080600061137e7f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f8f8f613560565b905060008761138d578c611391565b6000195b604080517fd505accf00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101839052606481018c905260ff8a16608482015260a4810189905260c4810188905290519192506001600160a01b0384169163d505accf9160e48082019260009290919082900301818387803b15801561142057600080fd5b505af1158015611434573d6000803e3d6000fd5b505050506114478f8f8f8f8f8f8f612686565b809450819550505050509b509b9950505050505050505050565b6000546001600160a01b0390811691161490565b606081428110156114cd576040805162461bcd60e51b815260206004820152601660248201527f4e657473776170526f757465723a204558504952454400000000000000000000604482015290519081900360640190fd5b61159e7f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f8988888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080517f978bbdb900000000000000000000000000000000000000000000000000000000815290516001600160a01b037f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f16935063978bbdb992506004808301926020929190829003018186803b15801561105357600080fd5b915086826001845103815181106115b157fe5b602002602001015110156115f65760405162461bcd60e51b8152600401808060200182810382526029815260200180614ba36029913960400191505060405180910390fd5b611606868660008181106110ec57fe5b6111da828787808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508992506137f4915050565b804281101561169b576040805162461bcd60e51b815260206004820152601660248201527f4e657473776170526f757465723a204558504952454400000000000000000000604482015290519081900360640190fd5b7f000000000000000000000000deaddeaddeaddeaddeaddeaddeaddeaddead00006001600160a01b0316858560008181106116d257fe5b905060200201356001600160a01b03166001600160a01b03161461173d576040805162461bcd60e51b815260206004820152601b60248201527f4e657473776170526f757465723a20494e56414c49445f504154480000000000604482015290519081900360640190fd5b346117b47f000000000000000000000000deaddeaddeaddeaddeaddeaddeaddeaddead00006117ae7f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f898960008161179157fe5b905060200201356001600160a01b03168a8a600181811061114b57fe5b83613c06565b6000868660001981018181106117c657fe5b905060200201356001600160a01b03166001600160a01b03166370a08231866040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561182257600080fd5b505afa158015611836573d6000803e3d6000fd5b505050506040513d602081101561184c57600080fd5b5051604080516020898102828101820190935289825292935061188e9290918a918a918291850190849080828437600092019190915250899250613ef5915050565b8761193182898960001981018181106118a357fe5b905060200201356001600160a01b03166001600160a01b03166370a08231896040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156118ff57600080fd5b505afa158015611913573d6000803e3d6000fd5b505050506040513d602081101561192957600080fd5b505190614329565b101561196e5760405162461bcd60e51b8152600401808060200182810382526029815260200180614ba36029913960400191505060405180910390fd5b5050505050505050565b6001546001600160a01b031681565b61199033611461565b6119e1576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b8042811015611a71576040805162461bcd60e51b815260206004820152601660248201527f4e657473776170526f757465723a204558504952454400000000000000000000604482015290519081900360640190fd5b611ac985856000818110611a8157fe5b905060200201356001600160a01b031633611ac37f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f8989600081811061179157fe5b8a61364b565b600085856000198101818110611adb57fe5b905060200201356001600160a01b03166001600160a01b03166370a08231856040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611b3757600080fd5b505afa158015611b4b573d6000803e3d6000fd5b505050506040513d6020811015611b6157600080fd5b50516040805160208881028281018201909352888252929350611ba3929091899189918291850190849080828437600092019190915250889250613ef5915050565b866119318288886000198101818110611bb857fe5b905060200201356001600160a01b03166001600160a01b03166370a08231886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156118ff57600080fd5b611c1d33611461565b611c6e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b8042811015611d26576040805162461bcd60e51b815260206004820152601660248201527f4e657473776170526f757465723a204558504952454400000000000000000000604482015290519081900360640190fd5b6001600160a01b037f000000000000000000000000deaddeaddeaddeaddeaddeaddeaddeaddead00001685856000198101818110611d6057fe5b905060200201356001600160a01b03166001600160a01b031614611dcb576040805162461bcd60e51b815260206004820152601b60248201527f4e657473776170526f757465723a20494e56414c49445f504154480000000000604482015290519081900360640190fd5b611ddb85856000818110611a8157fe5b611e19858580806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250309250613ef5915050565b60007f000000000000000000000000deaddeaddeaddeaddeaddeaddeaddeaddead00006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611e8857600080fd5b505afa158015611e9c573d6000803e3d6000fd5b505050506040513d6020811015611eb257600080fd5b5051905086811015611ef55760405162461bcd60e51b8152600401808060200182810382526029815260200180614ba36029913960400191505060405180910390fd5b61196e8482613af0565b6000610e7d8484847f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f6001600160a01b031663978bbdb96040518163ffffffff1660e01b815260040160206040518083038186803b158015611f6057600080fd5b505afa158015611f74573d6000803e3d6000fd5b505050506040513d6020811015611f8a57600080fd5b5051614381565b60608142811015611fe9576040805162461bcd60e51b815260206004820152601660248201527f4e657473776170526f757465723a204558504952454400000000000000000000604482015290519081900360640190fd5b6120ba7f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f8988888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080517f978bbdb900000000000000000000000000000000000000000000000000000000815290516001600160a01b037f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f16935063978bbdb992506004808301926020929190829003018186803b15801561131457600080fd5b915086826000815181106120ca57fe5b602002602001015111156115f65760405162461bcd60e51b8152600401808060200182810382526025815260200180614abd6025913960400191505060405180910390fd5b6000546001600160a01b031690565b600080600061216e7f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f8e7f000000000000000000000000deaddeaddeaddeaddeaddeaddeaddeaddead0000613560565b905060008761217d578c612181565b6000195b604080517fd505accf00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101839052606481018c905260ff8a16608482015260a4810189905260c4810188905290519192506001600160a01b0384169163d505accf9160e48082019260009290919082900301818387803b15801561221057600080fd5b505af1158015612224573d6000803e3d6000fd5b505050506122368e8e8e8e8e8e6111e5565b909f909e509c50505050505050505050505050565b6000610e7d84848461445d565b606081428110156122b0576040805162461bcd60e51b815260206004820152601660248201527f4e657473776170526f757465723a204558504952454400000000000000000000604482015290519081900360640190fd5b7f000000000000000000000000deaddeaddeaddeaddeaddeaddeaddeaddead00006001600160a01b0316868660008181106122e757fe5b905060200201356001600160a01b03166001600160a01b031614612352576040805162461bcd60e51b815260206004820152601b60248201527f4e657473776170526f757465723a20494e56414c49445f504154480000000000604482015290519081900360640190fd5b6124237f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f8888888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080517f978bbdb900000000000000000000000000000000000000000000000000000000815290516001600160a01b037f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f16935063978bbdb992506004808301926020929190829003018186803b15801561131457600080fd5b9150348260008151811061243357fe5b602002602001015111156124785760405162461bcd60e51b8152600401808060200182810382526025815260200180614abd6025913960400191505060405180910390fd5b6124e77f000000000000000000000000deaddeaddeaddeaddeaddeaddeaddeaddead00006124cd7f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f8989600081811061179157fe5b846000815181106124da57fe5b6020026020010151613c06565b612526828787808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508992506137f4915050565b8160008151811061253357fe5b602002602001015134111561256257612562338360008151811061255357fe5b60200260200101513403613af0565b5095945050505050565b600081428110156125c4576040805162461bcd60e51b815260206004820152601660248201527f4e657473776170526f757465723a204558504952454400000000000000000000604482015290519081900360640190fd5b6125f3887f000000000000000000000000deaddeaddeaddeaddeaddeaddeaddeaddead00008989893089612686565b90508092505061267c88858a6001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561264b57600080fd5b505afa15801561265f573d6000803e3d6000fd5b505050506040513d602081101561267557600080fd5b5051613c06565b6111da8483613af0565b60008082428110156126df576040805162461bcd60e51b815260206004820152601660248201527f4e657473776170526f757465723a204558504952454400000000000000000000604482015290519081900360640190fd5b600061270c7f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f8c8c613560565b604080517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03831660248201819052604482018d9052915192935090916323b872dd916064808201926020929091908290030181600087803b15801561278057600080fd5b505af1158015612794573d6000803e3d6000fd5b505050506040513d60208110156127aa57600080fd5b5050604080517f89afcb440000000000000000000000000000000000000000000000000000000081526001600160a01b03888116600483015282516000938493928616926389afcb44926024808301939282900301818787803b15801561281057600080fd5b505af1158015612824573d6000803e3d6000fd5b505050506040513d604081101561283a57600080fd5b508051602090910151909250905060006128548e8e614503565b509050806001600160a01b03168e6001600160a01b03161461287757818361287a565b82825b90975095508a8710156128be5760405162461bcd60e51b8152600401808060200182810382526024815260200180614bcc6024913960400191505060405180910390fd5b898610156128fd5760405162461bcd60e51b8152600401808060200182810382526024815260200180614bf06024913960400191505060405180910390fd5b505050505097509795505050505050565b7f000000000000000000000000deaddeaddeaddeaddeaddeaddeaddeaddead000081565b6000806129807f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f8d7f000000000000000000000000deaddeaddeaddeaddeaddeaddeaddeaddead0000613560565b905060008661298f578b612993565b6000195b604080517fd505accf00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101839052606481018b905260ff8916608482015260a4810188905260c4810187905290519192506001600160a01b0384169163d505accf9160e48082019260009290919082900301818387803b158015612a2257600080fd5b505af1158015612a36573d6000803e3d6000fd5b50505050612a488d8d8d8d8d8d61256c565b9d9c50505050505050505050505050565b7f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f81565b60606113457f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f84847f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f6001600160a01b031663978bbdb96040518163ffffffff1660e01b815260040160206040518083038186803b15801561105357600080fd5b60608142811015612b56576040805162461bcd60e51b815260206004820152601660248201527f4e657473776170526f757465723a204558504952454400000000000000000000604482015290519081900360640190fd5b7f000000000000000000000000deaddeaddeaddeaddeaddeaddeaddeaddead00006001600160a01b031686866000818110612b8d57fe5b905060200201356001600160a01b03166001600160a01b031614612bf8576040805162461bcd60e51b815260206004820152601b60248201527f4e657473776170526f757465723a20494e56414c49445f504154480000000000604482015290519081900360640190fd5b612cc97f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f3488888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080517f978bbdb900000000000000000000000000000000000000000000000000000000815290516001600160a01b037f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f16935063978bbdb992506004808301926020929190829003018186803b15801561105357600080fd5b91508682600184510381518110612cdc57fe5b60200260200101511015612d215760405162461bcd60e51b8152600401808060200182810382526029815260200180614ba36029913960400191505060405180910390fd5b612d767f000000000000000000000000deaddeaddeaddeaddeaddeaddeaddeaddead00006124cd7f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f8989600081811061179157fe5b612562828787808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508992506137f4915050565b60008060008342811015612e10576040805162461bcd60e51b815260206004820152601660248201527f4e657473776170526f757465723a204558504952454400000000000000000000604482015290519081900360640190fd5b612e3e8a7f000000000000000000000000deaddeaddeaddeaddeaddeaddeaddeaddead00008b348c8c6145e1565b90945092506000612e907f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f8c7f000000000000000000000000deaddeaddeaddeaddeaddeaddeaddeaddead0000613560565b9050612e9e8b33838861364b565b612ec97f000000000000000000000000deaddeaddeaddeaddeaddeaddeaddeaddead00008286613c06565b806001600160a01b0316636a627842886040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050602060405180830381600087803b158015612f1857600080fd5b505af1158015612f2c573d6000803e3d6000fd5b505050506040513d6020811015612f4257600080fd5b5051925034841015612f5a57612f5a33853403613af0565b505096509650969350505050565b60608142811015612fc0576040805162461bcd60e51b815260206004820152601660248201527f4e657473776170526f757465723a204558504952454400000000000000000000604482015290519081900360640190fd5b6001600160a01b037f000000000000000000000000deaddeaddeaddeaddeaddeaddeaddeaddead00001686866000198101818110612ffa57fe5b905060200201356001600160a01b03166001600160a01b031614613065576040805162461bcd60e51b815260206004820152601b60248201527f4e657473776170526f757465723a20494e56414c49445f504154480000000000604482015290519081900360640190fd5b6131367f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f8988888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080517f978bbdb900000000000000000000000000000000000000000000000000000000815290516001600160a01b037f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f16935063978bbdb992506004808301926020929190829003018186803b15801561131457600080fd5b9150868260008151811061314657fe5b602002602001015111156110dc5760405162461bcd60e51b8152600401808060200182810382526025815260200180614abd6025913960400191505060405180910390fd5b600080600083428110156131e6576040805162461bcd60e51b815260206004820152601660248201527f4e657473776170526f757465723a204558504952454400000000000000000000604482015290519081900360640190fd5b6131f48c8c8c8c8c8c6145e1565b909450925060006132267f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f8e8e613560565b90506132348d33838861364b565b6132408c33838761364b565b806001600160a01b0316636a627842886040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050602060405180830381600087803b15801561328f57600080fd5b505af11580156132a3573d6000803e3d6000fd5b505050506040513d60208110156132b957600080fd5b5051949d939c50939a509198505050505050505050565b6132d933611461565b61332a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61333381614872565b50565b60008085116133765760405162461bcd60e51b8152600401808060200182810382526029815260200180614b7a6029913960400191505060405180910390fd5b6000841180156133865750600083115b6133c15760405162461bcd60e51b8152600401808060200182810382526026815260200180614c376026913960400191505060405180910390fd5b60006133d2866103e885900361492a565b905060006133e0828661492a565b905060006133fa836133f4896103e861492a565b90614996565b905080828161340557fe5b0498975050505050505050565b606060028351101561346b576040805162461bcd60e51b815260206004820152601c60248201527f4e6574737761704c6962726172793a20494e56414c49445f5041544800000000604482015290519081900360640190fd5b825167ffffffffffffffff8111801561348357600080fd5b506040519080825280602002602001820160405280156134ad578160200160208202803683370190505b50905083816000815181106134be57fe5b60200260200101818152505060005b600184510381101561355757600080613510888785815181106134ec57fe5b602002602001015188866001018151811061350357fe5b60200260200101516149ee565b9150915061353384848151811061352357fe5b6020026020010151838388613336565b84846001018151811061354257fe5b602090810291909101015250506001016134cd565b50949350505050565b600080600061356f8585614503565b604080517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606094851b811660208084019190915293851b81166034830152825160288184030181526048830184528051908501207fff0000000000000000000000000000000000000000000000000000000000000060688401529a90941b9093166069840152607d8301989098527f966d65068a6a30f10fd1fa814258637a34e059081d79daa94f3e2b6cec48e810609d808401919091528851808403909101815260bd909201909752805196019590952095945050505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017815292518251600094606094938a169392918291908083835b6020831061371c57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016136df565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461377e576040519150601f19603f3d011682016040523d82523d6000602084013e613783565b606091505b50915091508180156137b15750805115806137b157508080602001905160208110156137ae57600080fd5b50515b6137ec5760405162461bcd60e51b8152600401808060200182810382526024815260200180614c5d6024913960400191505060405180910390fd5b505050505050565b60005b6001835103811015613aea5760008084838151811061381257fe5b602002602001015185846001018151811061382957fe5b60200260200101519150915060006138418383614503565b509050600087856001018151811061385557fe5b60209081029190910101516001549091506001600160a01b03161561391e57600154604080517fa9678a180000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b0387811660248301528681166044830152606482018590529151919092169163a9678a189160848083019260209291908290030181600087803b1580156138f157600080fd5b505af1158015613905573d6000803e3d6000fd5b505050506040513d602081101561391b57600080fd5b50505b600080836001600160a01b0316866001600160a01b03161461394257826000613946565b6000835b91509150600060028a5103881061395d578861399e565b61399e7f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f878c8b6002018151811061399157fe5b6020026020010151613560565b90506139cb7f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f8888613560565b6001600160a01b031663022c0d9f84848460006040519080825280601f01601f191660200182016040528015613a08576020820181803683370190505b506040518563ffffffff1660e01b815260040180858152602001848152602001836001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b83811015613a70578181015183820152602001613a58565b50505050905090810190601f168015613a9d5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015613abf57600080fd5b505af1158015613ad3573d6000803e3d6000fd5b5050600190990198506137f7975050505050505050565b50505050565b604080516000808252602082019092526001600160a01b0384169083906040518082805190602001908083835b60208310613b5a57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613b1d565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613bbc576040519150601f19603f3d011682016040523d82523d6000602084013e613bc1565b606091505b5050905080613c015760405162461bcd60e51b8152600401808060200182810382526025815260200180614b556025913960400191505060405180910390fd5b505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000178152925182516000946060949389169392918291908083835b60208310613ccf57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613c92565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613d31576040519150601f19603f3d011682016040523d82523d6000602084013e613d36565b606091505b5091509150818015613d64575080511580613d645750808060200190516020811015613d6157600080fd5b50515b613db5576040805162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c454400604482015290519081900360640190fd5b5050505050565b6060600283511015613e15576040805162461bcd60e51b815260206004820152601c60248201527f4e6574737761704c6962726172793a20494e56414c49445f5041544800000000604482015290519081900360640190fd5b825167ffffffffffffffff81118015613e2d57600080fd5b50604051908082528060200260200182016040528015613e57578160200160208202803683370190505b5090508381600183510381518110613e6b57fe5b60209081029190910101528251600019015b801561355757600080613ead88876001860381518110613e9957fe5b602002602001015188868151811061350357fe5b91509150613ed0848481518110613ec057fe5b6020026020010151838388614381565b846001850381518110613edf57fe5b6020908102919091010152505060001901613e7d565b60005b6001835103811015613c0157600080848381518110613f1357fe5b6020026020010151858460010181518110613f2a57fe5b6020026020010151915091506000613f428383614503565b5090506000613f727f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f8585613560565b9050600080600080846001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015613fb357600080fd5b505afa158015613fc7573d6000803e3d6000fd5b505050506040513d6060811015613fdd57600080fd5b5080516020909101516dffffffffffffffffffffffffffff91821693501690506000806001600160a01b038a81169089161461401a57828461401d565b83835b91509150614072828b6001600160a01b03166370a082318a6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156118ff57600080fd5b95506140d38683837f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f6001600160a01b031663978bbdb96040518163ffffffff1660e01b815260040160206040518083038186803b158015610e4c57600080fd5b6001549095506001600160a01b03161593506141979250505057600154604080517fa9678a180000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b0389811660248301528881166044830152606482018590529151919092169163a9678a189160848083019260209291908290030181600087803b15801561416a57600080fd5b505af115801561417e573d6000803e3d6000fd5b505050506040513d602081101561419457600080fd5b50505b600080856001600160a01b0316886001600160a01b0316146141bb578260006141bf565b6000835b91509150600060028c51038a106141d6578a61420a565b61420a7f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f898e8d6002018151811061399157fe5b60408051600080825260208201928390527f022c0d9f00000000000000000000000000000000000000000000000000000000835260248201878152604483018790526001600160a01b038086166064850152608060848501908152845160a48601819052969750908c169563022c0d9f958a958a958a9591949193919260c486019290918190849084905b838110156142ad578181015183820152602001614295565b50505050905090810190601f1680156142da5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156142fc57600080fd5b505af1158015614310573d6000803e3d6000fd5b50506001909b019a50613ef89950505050505050505050565b80820382811115611348576040805162461bcd60e51b815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b60008085116143c15760405162461bcd60e51b815260040180806020018281038252602a815260200180614b2b602a913960400191505060405180910390fd5b6000841180156143d15750600083115b61440c5760405162461bcd60e51b8152600401808060200182810382526026815260200180614c376026913960400191505060405180910390fd5b60006144246103e861441e878961492a565b9061492a565b9050600061443b6103e885900361441e878a614329565b9050614452600182848161444b57fe5b0490614996565b979650505050505050565b600080841161449d5760405162461bcd60e51b8152600401808060200182810382526023815260200180614b086023913960400191505060405180910390fd5b6000831180156144ad5750600082115b6144e85760405162461bcd60e51b8152600401808060200182810382526026815260200180614c376026913960400191505060405180910390fd5b826144f3858461492a565b816144fa57fe5b04949350505050565b600080826001600160a01b0316846001600160a01b031614156145575760405162461bcd60e51b8152600401808060200182810382526023815260200180614c146023913960400191505060405180910390fd5b826001600160a01b0316846001600160a01b03161061457757828461457a565b83835b90925090506001600160a01b0382166145da576040805162461bcd60e51b815260206004820152601c60248201527f4e6574737761704c6962726172793a205a45524f5f4144445245535300000000604482015290519081900360640190fd5b9250929050565b60008060006001600160a01b03167f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f6001600160a01b031663e6a439058a8a6040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561466d57600080fd5b505afa158015614681573d6000803e3d6000fd5b505050506040513d602081101561469757600080fd5b50516001600160a01b03161415614755577f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f6001600160a01b031663c9c6539689896040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b0316815260200192505050602060405180830381600087803b15801561472857600080fd5b505af115801561473c573d6000803e3d6000fd5b505050506040513d602081101561475257600080fd5b50505b6000806147837f00000000000000000000000070f51d68d16e8f9e418441280342bd43ac9dff9f8b8b6149ee565b91509150816000148015614795575080155b156147a557879350869250614865565b60006147b289848461445d565b905087811161480557858110156147fa5760405162461bcd60e51b8152600401808060200182810382526024815260200180614bf06024913960400191505060405180910390fd5b889450925082614863565b600061481289848661445d565b90508981111561481e57fe5b8781101561485d5760405162461bcd60e51b8152600401808060200182810382526024815260200180614bcc6024913960400191505060405180910390fd5b94508793505b505b5050965096945050505050565b6001600160a01b0381166148b75760405162461bcd60e51b8152600401808060200182810382526026815260200180614ae26026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60008115806149455750508082028282828161494257fe5b04145b611348576040805162461bcd60e51b815260206004820152601460248201527f64732d6d6174682d6d756c2d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b80820182811015611348576040805162461bcd60e51b815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b60008060006149fd8585614503565b509050600080614a0e888888613560565b6001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015614a4657600080fd5b505afa158015614a5a573d6000803e3d6000fd5b505050506040513d6060811015614a7057600080fd5b5080516020909101516dffffffffffffffffffffffffffff91821693501690506001600160a01b0387811690841614614aaa578082614aad565b81815b9099909850965050505050505056fe4e657473776170526f757465723a204558434553534956455f494e5055545f414d4f554e544f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734e6574737761704c6962726172793a20494e53554646494349454e545f414d4f554e544e6574737761704c6962726172793a20494e53554646494349454e545f4f55545055545f414d4f554e545472616e7366657248656c7065723a204d455449535f5452414e534645525f4641494c45444e6574737761704c6962726172793a20494e53554646494349454e545f494e5055545f414d4f554e544e657473776170526f757465723a20494e53554646494349454e545f4f55545055545f414d4f554e544e657473776170526f757465723a20494e53554646494349454e545f415f414d4f554e544e657473776170526f757465723a20494e53554646494349454e545f425f414d4f554e544e6574737761704c6962726172793a204944454e544943414c5f4144445245535345534e6574737761704c6962726172793a20494e53554646494349454e545f4c49515549444954595472616e7366657248656c7065723a205452414e534645525f46524f4d5f4641494c4544a2646970667358221220157d330ded3a415fa36a82a076c9ac91801e827113dd211e108f30607e90b90664736f6c634300060c0033