Contract Address Details
contract

0xe5759714998e8B50A33c7333C04C2d02e5dcE77f

Contract Name
ElkRouter
Creator
0xabb5fe–7dacd7 at 0xfee079–c45ebb
Balance
0 xDAI ( )
Tokens
Fetching tokens...
Transactions
39,743 Transactions
Transfers
18,641 Transfers
Gas Used
6,049,272,025
Last Balance Update
23772309
Contract name:
ElkRouter




Optimization enabled
true
Compiler version
v0.6.6+commit.6c089d02




Optimization runs
1000
EVM Version
default




Verified at
2021-08-22T20:53:21.517114Z

Constructor Arguments

000000000000000000000000cb018587da9590a18f49ffe2b85314c33af3ad3b000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d

Arg [0] (address) : 0xcb018587da9590a18f49ffe2b85314c33af3ad3b
Arg [1] (address) : 0xe91d153e0b41518a2ce8dd3d7944fa863463a97d

              

Contract source code

// Sources flattened with hardhat v2.0.6 https://hardhat.org

// File contracts/elk-core/interfaces/IElkFactory.sol

pragma solidity >=0.5.0;

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

    function feeTo() external view returns (address);
    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;
}


// File contracts/elk-lib/libraries/TransferHelper.sol


pragma solidity >=0.6.0;

// helper methods for interacting with ERC20 tokens and sending xDAI that do not consistently return true/false
library TransferHelper {
    function safeApprove(
        address token,
        address to,
        uint256 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,
        uint256 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,
        uint256 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 safeTransferxDAI(address to, uint256 value) internal {
        (bool success, ) = to.call{value: value}(new bytes(0));
        require(success, 'TransferHelper: xDAI_TRANSFER_FAILED');
    }
}


// File contracts/elk-periphery/interfaces/IElkRouter.sol

pragma solidity >=0.6.2;

interface IElkRouter {
    function factory() external pure returns (address);
    function WxDAI() 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 addLiquidityxDAI(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountxDAIMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountxDAI, 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 removeLiquidityxDAI(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountxDAIMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountxDAI);
    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 removeLiquidityxDAIWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountxDAIMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountxDAI);
    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 swapExactxDAIForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    function swapTokensForExactxDAI(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapExactTokensForxDAI(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapxDAIForExactTokens(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);

    function removeLiquidityxDAISupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountxDAIMin,
        address to,
        uint deadline
    ) external returns (uint amountxDAI);
    function removeLiquidityxDAIWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountxDAIMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountxDAI);

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


// File contracts/elk-core/interfaces/IElkPair.sol

pragma solidity >=0.5.0;

interface IElkPair {
    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;
}


// File contracts/elk-periphery/libraries/SafeMath.sol

pragma solidity =0.6.6;

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

library SafeMath {
    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');
    }
}


// File contracts/elk-periphery/libraries/ElkLibrary.sol

pragma solidity >=0.5.0;


library ElkLibrary {
    using SafeMath 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, 'ElkLibrary: IDENTICAL_ADDRESSES');
        (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
        require(token0 != address(0), 'ElkLibrary: 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'84845e7ccb283dec564acfcd3d9287a491dec6d675705545a2ab8be22ad78f31' // 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,) = IElkPair(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, 'ElkLibrary: INSUFFICIENT_AMOUNT');
        require(reserveA > 0 && reserveB > 0, 'ElkLibrary: 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) internal pure returns (uint amountOut) {
        require(amountIn > 0, 'ElkLibrary: INSUFFICIENT_INPUT_AMOUNT');
        require(reserveIn > 0 && reserveOut > 0, 'ElkLibrary: INSUFFICIENT_LIQUIDITY');
        uint amountInWithFee = amountIn.mul(997);
        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) internal pure returns (uint amountIn) {
        require(amountOut > 0, 'ElkLibrary: INSUFFICIENT_OUTPUT_AMOUNT');
        require(reserveIn > 0 && reserveOut > 0, 'ElkLibrary: INSUFFICIENT_LIQUIDITY');
        uint numerator = reserveIn.mul(amountOut).mul(1000);
        uint denominator = reserveOut.sub(amountOut).mul(997);
        amountIn = (numerator / denominator).add(1);
    }

    // performs chained getAmountOut calculations on any number of pairs
    function getAmountsOut(address factory, uint amountIn, address[] memory path) internal view returns (uint[] memory amounts) {
        require(path.length >= 2, 'ElkLibrary: 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);
        }
    }

    // performs chained getAmountIn calculations on any number of pairs
    function getAmountsIn(address factory, uint amountOut, address[] memory path) internal view returns (uint[] memory amounts) {
        require(path.length >= 2, 'ElkLibrary: 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);
        }
    }
}


// File contracts/elk-periphery/interfaces/IERC20.sol

pragma solidity >=0.5.0;

interface IERC20 {
    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);
}


// File contracts/elk-periphery/interfaces/IWxDAI.sol

pragma solidity >=0.5.0;

interface IWxDAI {
    function deposit() external payable;
    function transfer(address to, uint value) external returns (bool);
    function withdraw(uint) external;
}


// File contracts/elk-periphery/ElkRouter.sol

pragma solidity =0.6.6;






contract ElkRouter is IElkRouter {
    using SafeMath for uint;

    address public immutable override factory;
    address public immutable override WxDAI;

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

    constructor(address _factory, address _WxDAI) public {
        factory = _factory;
        WxDAI = _WxDAI;
    }

    receive() external payable {
        assert(msg.sender == WxDAI); // only accept xDAI via fallback from the WxDAI contract
    }

    // **** 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 (IElkFactory(factory).getPair(tokenA, tokenB) == address(0)) {
            IElkFactory(factory).createPair(tokenA, tokenB);
        }
        (uint reserveA, uint reserveB) = ElkLibrary.getReserves(factory, tokenA, tokenB);
        if (reserveA == 0 && reserveB == 0) {
            (amountA, amountB) = (amountADesired, amountBDesired);
        } else {
            uint amountBOptimal = ElkLibrary.quote(amountADesired, reserveA, reserveB);
            if (amountBOptimal <= amountBDesired) {
                require(amountBOptimal >= amountBMin, 'ElkRouter: INSUFFICIENT_B_AMOUNT');
                (amountA, amountB) = (amountADesired, amountBOptimal);
            } else {
                uint amountAOptimal = ElkLibrary.quote(amountBDesired, reserveB, reserveA);
                assert(amountAOptimal <= amountADesired);
                require(amountAOptimal >= amountAMin, 'ElkRouter: 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 = ElkLibrary.pairFor(factory, tokenA, tokenB);
        TransferHelper.safeTransferFrom(tokenA, msg.sender, pair, amountA);
        TransferHelper.safeTransferFrom(tokenB, msg.sender, pair, amountB);
        liquidity = IElkPair(pair).mint(to);
    }
    function addLiquidityxDAI(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountxDAIMin,
        address to,
        uint deadline
    ) external virtual override payable ensure(deadline) returns (uint amountToken, uint amountxDAI, uint liquidity) {
        (amountToken, amountxDAI) = _addLiquidity(
            token,
            WxDAI,
            amountTokenDesired,
            msg.value,
            amountTokenMin,
            amountxDAIMin
        );
        address pair = ElkLibrary.pairFor(factory, token, WxDAI);
        TransferHelper.safeTransferFrom(token, msg.sender, pair, amountToken);
        IWxDAI(WxDAI).deposit{value: amountxDAI}();
        assert(IWxDAI(WxDAI).transfer(pair, amountxDAI));
        liquidity = IElkPair(pair).mint(to);
        // refund dust xDAI, if any
        if (msg.value > amountxDAI) TransferHelper.safeTransferxDAI(msg.sender, msg.value - amountxDAI);
    }

    // **** 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 = ElkLibrary.pairFor(factory, tokenA, tokenB);
        IElkPair(pair).transferFrom(msg.sender, pair, liquidity); // send liquidity to pair
        (uint amount0, uint amount1) = IElkPair(pair).burn(to);
        (address token0,) = ElkLibrary.sortTokens(tokenA, tokenB);
        (amountA, amountB) = tokenA == token0 ? (amount0, amount1) : (amount1, amount0);
        require(amountA >= amountAMin, 'ElkRouter: INSUFFICIENT_A_AMOUNT');
        require(amountB >= amountBMin, 'ElkRouter: INSUFFICIENT_B_AMOUNT');
    }
    function removeLiquidityxDAI(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountxDAIMin,
        address to,
        uint deadline
    ) public virtual override ensure(deadline) returns (uint amountToken, uint amountxDAI) {
        (amountToken, amountxDAI) = removeLiquidity(
            token,
            WxDAI,
            liquidity,
            amountTokenMin,
            amountxDAIMin,
            address(this),
            deadline
        );
        TransferHelper.safeTransfer(token, to, amountToken);
        IWxDAI(WxDAI).withdraw(amountxDAI);
        TransferHelper.safeTransferxDAI(to, amountxDAI);
    }
    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 = ElkLibrary.pairFor(factory, tokenA, tokenB);
        uint value = approveMax ? uint(-1) : liquidity;
        IElkPair(pair).permit(msg.sender, address(this), value, deadline, v, r, s);
        (amountA, amountB) = removeLiquidity(tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline);
    }
    function removeLiquidityxDAIWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountxDAIMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external virtual override returns (uint amountToken, uint amountxDAI) {
        address pair = ElkLibrary.pairFor(factory, token, WxDAI);
        uint value = approveMax ? uint(-1) : liquidity;
        IElkPair(pair).permit(msg.sender, address(this), value, deadline, v, r, s);
        (amountToken, amountxDAI) = removeLiquidityxDAI(token, liquidity, amountTokenMin, amountxDAIMin, to, deadline);
    }

    // **** REMOVE LIQUIDITY (supporting fee-on-transfer tokens) ****
    function removeLiquidityxDAISupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountxDAIMin,
        address to,
        uint deadline
    ) public virtual override ensure(deadline) returns (uint amountxDAI) {
        (, amountxDAI) = removeLiquidity(
            token,
            WxDAI,
            liquidity,
            amountTokenMin,
            amountxDAIMin,
            address(this),
            deadline
        );
        TransferHelper.safeTransfer(token, to, IERC20(token).balanceOf(address(this)));
        IWxDAI(WxDAI).withdraw(amountxDAI);
        TransferHelper.safeTransferxDAI(to, amountxDAI);
    }
    function removeLiquidityxDAIWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountxDAIMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external virtual override returns (uint amountxDAI) {
        address pair = ElkLibrary.pairFor(factory, token, WxDAI);
        uint value = approveMax ? uint(-1) : liquidity;
        IElkPair(pair).permit(msg.sender, address(this), value, deadline, v, r, s);
        amountxDAI = removeLiquidityxDAISupportingFeeOnTransferTokens(
            token, liquidity, amountTokenMin, amountxDAIMin, 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,) = ElkLibrary.sortTokens(input, output);
            uint amountOut = amounts[i + 1];
            (uint amount0Out, uint amount1Out) = input == token0 ? (uint(0), amountOut) : (amountOut, uint(0));
            address to = i < path.length - 2 ? ElkLibrary.pairFor(factory, output, path[i + 2]) : _to;
            IElkPair(ElkLibrary.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 = ElkLibrary.getAmountsOut(factory, amountIn, path);
        require(amounts[amounts.length - 1] >= amountOutMin, 'ElkRouter: INSUFFICIENT_OUTPUT_AMOUNT');
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, ElkLibrary.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 = ElkLibrary.getAmountsIn(factory, amountOut, path);
        require(amounts[0] <= amountInMax, 'ElkRouter: EXCESSIVE_INPUT_AMOUNT');
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, ElkLibrary.pairFor(factory, path[0], path[1]), amounts[0]
        );
        _swap(amounts, path, to);
    }
    function swapExactxDAIForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        virtual
        override
        payable
        ensure(deadline)
        returns (uint[] memory amounts)
    {
        require(path[0] == WxDAI, 'ElkRouter: INVALID_PATH');
        amounts = ElkLibrary.getAmountsOut(factory, msg.value, path);
        require(amounts[amounts.length - 1] >= amountOutMin, 'ElkRouter: INSUFFICIENT_OUTPUT_AMOUNT');
        IWxDAI(WxDAI).deposit{value: amounts[0]}();
        assert(IWxDAI(WxDAI).transfer(ElkLibrary.pairFor(factory, path[0], path[1]), amounts[0]));
        _swap(amounts, path, to);
    }
    function swapTokensForExactxDAI(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] == WxDAI, 'ElkRouter: INVALID_PATH');
        amounts = ElkLibrary.getAmountsIn(factory, amountOut, path);
        require(amounts[0] <= amountInMax, 'ElkRouter: EXCESSIVE_INPUT_AMOUNT');
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, ElkLibrary.pairFor(factory, path[0], path[1]), amounts[0]
        );
        _swap(amounts, path, address(this));
        IWxDAI(WxDAI).withdraw(amounts[amounts.length - 1]);
        TransferHelper.safeTransferxDAI(to, amounts[amounts.length - 1]);
    }
    function swapExactTokensForxDAI(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] == WxDAI, 'ElkRouter: INVALID_PATH');
        amounts = ElkLibrary.getAmountsOut(factory, amountIn, path);
        require(amounts[amounts.length - 1] >= amountOutMin, 'ElkRouter: INSUFFICIENT_OUTPUT_AMOUNT');
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, ElkLibrary.pairFor(factory, path[0], path[1]), amounts[0]
        );
        _swap(amounts, path, address(this));
        IWxDAI(WxDAI).withdraw(amounts[amounts.length - 1]);
        TransferHelper.safeTransferxDAI(to, amounts[amounts.length - 1]);
    }
    function swapxDAIForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        virtual
        override
        payable
        ensure(deadline)
        returns (uint[] memory amounts)
    {
        require(path[0] == WxDAI, 'ElkRouter: INVALID_PATH');
        amounts = ElkLibrary.getAmountsIn(factory, amountOut, path);
        require(amounts[0] <= msg.value, 'ElkRouter: EXCESSIVE_INPUT_AMOUNT');
        IWxDAI(WxDAI).deposit{value: amounts[0]}();
        assert(IWxDAI(WxDAI).transfer(ElkLibrary.pairFor(factory, path[0], path[1]), amounts[0]));
        _swap(amounts, path, to);
        // refund dust xDAI, if any
        if (msg.value > amounts[0]) TransferHelper.safeTransferxDAI(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,) = ElkLibrary.sortTokens(input, output);
            IElkPair pair = IElkPair(ElkLibrary.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 = IERC20(input).balanceOf(address(pair)).sub(reserveInput);
            amountOutput = ElkLibrary.getAmountOut(amountInput, reserveInput, reserveOutput);
            }
            (uint amount0Out, uint amount1Out) = input == token0 ? (uint(0), amountOutput) : (amountOutput, uint(0));
            address to = i < path.length - 2 ? ElkLibrary.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, ElkLibrary.pairFor(factory, path[0], path[1]), amountIn
        );
        uint balanceBefore = IERC20(path[path.length - 1]).balanceOf(to);
        _swapSupportingFeeOnTransferTokens(path, to);
        require(
            IERC20(path[path.length - 1]).balanceOf(to).sub(balanceBefore) >= amountOutMin,
            'ElkRouter: INSUFFICIENT_OUTPUT_AMOUNT'
        );
    }
    function swapExactxDAIForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    )
        external
        virtual
        override
        payable
        ensure(deadline)
    {
        require(path[0] == WxDAI, 'ElkRouter: INVALID_PATH');
        uint amountIn = msg.value;
        IWxDAI(WxDAI).deposit{value: amountIn}();
        assert(IWxDAI(WxDAI).transfer(ElkLibrary.pairFor(factory, path[0], path[1]), amountIn));
        uint balanceBefore = IERC20(path[path.length - 1]).balanceOf(to);
        _swapSupportingFeeOnTransferTokens(path, to);
        require(
            IERC20(path[path.length - 1]).balanceOf(to).sub(balanceBefore) >= amountOutMin,
            'ElkRouter: INSUFFICIENT_OUTPUT_AMOUNT'
        );
    }
    function swapExactTokensForxDAISupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    )
        external
        virtual
        override
        ensure(deadline)
    {
        require(path[path.length - 1] == WxDAI, 'ElkRouter: INVALID_PATH');
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, ElkLibrary.pairFor(factory, path[0], path[1]), amountIn
        );
        _swapSupportingFeeOnTransferTokens(path, address(this));
        uint amountOut = IERC20(WxDAI).balanceOf(address(this));
        require(amountOut >= amountOutMin, 'ElkRouter: INSUFFICIENT_OUTPUT_AMOUNT');
        IWxDAI(WxDAI).withdraw(amountOut);
        TransferHelper.safeTransferxDAI(to, amountOut);
    }

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

    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut)
        public
        pure
        virtual
        override
        returns (uint amountOut)
    {
        return ElkLibrary.getAmountOut(amountIn, reserveIn, reserveOut);
    }

    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut)
        public
        pure
        virtual
        override
        returns (uint amountIn)
    {
        return ElkLibrary.getAmountIn(amountOut, reserveIn, reserveOut);
    }

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

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

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_factory","internalType":"address"},{"type":"address","name":"_WxDAI","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"WxDAI","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":"amountxDAI","internalType":"uint256"},{"type":"uint256","name":"liquidity","internalType":"uint256"}],"name":"addLiquidityxDAI","inputs":[{"type":"address","name":"token","internalType":"address"},{"type":"uint256","name":"amountTokenDesired","internalType":"uint256"},{"type":"uint256","name":"amountTokenMin","internalType":"uint256"},{"type":"uint256","name":"amountxDAIMin","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":"pure","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":"pure","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":"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":"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":[{"type":"uint256","name":"amountToken","internalType":"uint256"},{"type":"uint256","name":"amountxDAI","internalType":"uint256"}],"name":"removeLiquidityxDAI","inputs":[{"type":"address","name":"token","internalType":"address"},{"type":"uint256","name":"liquidity","internalType":"uint256"},{"type":"uint256","name":"amountTokenMin","internalType":"uint256"},{"type":"uint256","name":"amountxDAIMin","internalType":"uint256"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"deadline","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"amountxDAI","internalType":"uint256"}],"name":"removeLiquidityxDAISupportingFeeOnTransferTokens","inputs":[{"type":"address","name":"token","internalType":"address"},{"type":"uint256","name":"liquidity","internalType":"uint256"},{"type":"uint256","name":"amountTokenMin","internalType":"uint256"},{"type":"uint256","name":"amountxDAIMin","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":"amountxDAI","internalType":"uint256"}],"name":"removeLiquidityxDAIWithPermit","inputs":[{"type":"address","name":"token","internalType":"address"},{"type":"uint256","name":"liquidity","internalType":"uint256"},{"type":"uint256","name":"amountTokenMin","internalType":"uint256"},{"type":"uint256","name":"amountxDAIMin","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":"amountxDAI","internalType":"uint256"}],"name":"removeLiquidityxDAIWithPermitSupportingFeeOnTransferTokens","inputs":[{"type":"address","name":"token","internalType":"address"},{"type":"uint256","name":"liquidity","internalType":"uint256"},{"type":"uint256","name":"amountTokenMin","internalType":"uint256"},{"type":"uint256","name":"amountxDAIMin","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":"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":"nonpayable","outputs":[{"type":"uint256[]","name":"amounts","internalType":"uint256[]"}],"name":"swapExactTokensForxDAI","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":"swapExactTokensForxDAISupportingFeeOnTransferTokens","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":"swapExactxDAIForTokens","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":"swapExactxDAIForTokensSupportingFeeOnTransferTokens","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":"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":[{"type":"uint256[]","name":"amounts","internalType":"uint256[]"}],"name":"swapTokensForExactxDAI","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":"payable","outputs":[{"type":"uint256[]","name":"amounts","internalType":"uint256[]"}],"name":"swapxDAIForExactTokens","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":"receive","stateMutability":"payable"}]
            

Deployed ByteCode

0x60806040526004361061018e5760003560e01c806385f8c259116100d6578063baa2abde1161007f578063e1dd05b011610059578063e1dd05b014610bc4578063e8e3370014610c37578063fee4b8c714610c99576101c7565b8063baa2abde14610a9b578063c45a015514610af8578063d06ca61f14610b0d576101c7565b806397a04f31116100b057806397a04f3114610947578063ad615dec146109df578063ba4dd1b114610a15576101c7565b806385f8c259146107e15780638803dbee146108175780638cc7d4d7146108af576101c7565b806338ed173911610138578063590821f311610112578063590821f31461062b5780635c11d795146106b15780637b5e25d714610749576101c7565b806338ed1739146104dc5780633cee464b146105745780635615f3d5146105a5576101c7565b80631a9f81fe116101695780631a9f81fe146102e45780631f00ca74146103575780632195995c1461045e576101c7565b8062fee4b2146101cc578063054d50d41461023857806316b56b0014610280576101c7565b366101c757336001600160a01b037f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d16146101c557fe5b005b600080fd5b3480156101d857600080fd5b5061021f600480360360c08110156101ef57600080fd5b506001600160a01b0381358116916020810135916040820135916060810135916080820135169060a00135610cec565b6040805192835260208301919091528051918290030190f35b34801561024457600080fd5b5061026e6004803603606081101561025b57600080fd5b5080359060208101359060400135610e0d565b60408051918252519081900360200190f35b6102c6600480360360c081101561029657600080fd5b506001600160a01b0381358116916020810135916040820135916060810135916080820135169060a00135610e22565b60408051938452602084019290925282820152519081900360600190f35b3480156102f057600080fd5b5061026e600480360361014081101561030857600080fd5b506001600160a01b0381358116916020810135916040820135916060810135916080820135169060a08101359060c081013515159060ff60e082013516906101008101359061012001356110ce565b34801561036357600080fd5b5061040e6004803603604081101561037a57600080fd5b8135919081019060408101602082013564010000000081111561039c57600080fd5b8201836020820111156103ae57600080fd5b803590602001918460208302840111640100000000831117156103d057600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506111dc945050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561044a578181015183820152602001610432565b505050509050019250505060405180910390f35b34801561046a57600080fd5b5061021f600480360361016081101561048257600080fd5b506001600160a01b038135811691602081013582169160408201359160608101359160808201359160a08101359091169060c08101359060e081013515159060ff6101008201351690610120810135906101400135611212565b3480156104e857600080fd5b5061040e600480360360a08110156104ff57600080fd5b81359160208101359181019060608101604082013564010000000081111561052657600080fd5b82018360208201111561053857600080fd5b8035906020019184602083028401116401000000008311171561055a57600080fd5b91935091506001600160a01b03813516906020013561130c565b34801561058057600080fd5b506105896114f7565b604080516001600160a01b039092168252519081900360200190f35b6101c5600480360360808110156105bb57600080fd5b813591908101906040810160208201356401000000008111156105dd57600080fd5b8201836020820111156105ef57600080fd5b8035906020019184602083028401116401000000008311171561061157600080fd5b91935091506001600160a01b03813516906020013561151b565b61040e6004803603608081101561064157600080fd5b8135919081019060408101602082013564010000000081111561066357600080fd5b82018360208201111561067557600080fd5b8035906020019184602083028401116401000000008311171561069757600080fd5b91935091506001600160a01b038135169060200135611956565b3480156106bd57600080fd5b506101c5600480360360a08110156106d457600080fd5b8135916020810135918101906060810160408201356401000000008111156106fb57600080fd5b82018360208201111561070d57600080fd5b8035906020019184602083028401116401000000008311171561072f57600080fd5b91935091506001600160a01b038135169060200135611cf5565b34801561075557600080fd5b5061040e600480360360a081101561076c57600080fd5b81359160208101359181019060608101604082013564010000000081111561079357600080fd5b8201836020820111156107a557600080fd5b803590602001918460208302840111640100000000831117156107c757600080fd5b91935091506001600160a01b038135169060200135611ef5565b3480156107ed57600080fd5b5061026e6004803603606081101561080457600080fd5b5080359060208101359060400135612199565b34801561082357600080fd5b5061040e600480360360a081101561083a57600080fd5b81359160208101359181019060608101604082013564010000000081111561086157600080fd5b82018360208201111561087357600080fd5b8035906020019184602083028401116401000000008311171561089557600080fd5b91935091506001600160a01b0381351690602001356121a6565b3480156108bb57600080fd5b506101c5600480360360a08110156108d257600080fd5b8135916020810135918101906060810160408201356401000000008111156108f957600080fd5b82018360208201111561090b57600080fd5b8035906020019184602083028401116401000000008311171561092d57600080fd5b91935091506001600160a01b0381351690602001356122a6565b34801561095357600080fd5b5061040e600480360360a081101561096a57600080fd5b81359160208101359181019060608101604082013564010000000081111561099157600080fd5b8201836020820111156109a357600080fd5b803590602001918460208302840111640100000000831117156109c557600080fd5b91935091506001600160a01b03813516906020013561253d565b3480156109eb57600080fd5b5061026e60048036036060811015610a0257600080fd5b50803590602081013590604001356126df565b61040e60048036036080811015610a2b57600080fd5b81359190810190604081016020820135640100000000811115610a4d57600080fd5b820183602082011115610a5f57600080fd5b80359060200191846020830284011164010000000083111715610a8157600080fd5b91935091506001600160a01b0381351690602001356126ec565b348015610aa757600080fd5b5061021f600480360360e0811015610abe57600080fd5b506001600160a01b038135811691602081013582169160408201359160608101359160808201359160a08101359091169060c00135612a48565b348015610b0457600080fd5b50610589612cd8565b348015610b1957600080fd5b5061040e60048036036040811015610b3057600080fd5b81359190810190604081016020820135640100000000811115610b5257600080fd5b820183602082011115610b6457600080fd5b80359060200191846020830284011164010000000083111715610b8657600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550612cfc945050505050565b348015610bd057600080fd5b5061021f6004803603610140811015610be857600080fd5b506001600160a01b0381358116916020810135916040820135916060810135916080820135169060a08101359060c081013515159060ff60e08201351690610100810135906101200135612d29565b348015610c4357600080fd5b506102c66004803603610100811015610c5b57600080fd5b506001600160a01b038135811691602081013582169160408201359160608101359160808201359160a08101359160c0820135169060e00135612e3d565b348015610ca557600080fd5b5061026e600480360360c0811015610cbc57600080fd5b506001600160a01b0381358116916020810135916040820135916060810135916080820135169060a00135612f80565b6000808242811015610d3a576040805162461bcd60e51b8152602060048201526012602482015271115b1ad49bdd5d195c8e881156141254915160721b604482015290519081900360640190fd5b610d69897f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d8a8a8a308a612a48565b9093509150610d79898685613108565b7f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d6001600160a01b0316632e1a7d4d836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015610ddf57600080fd5b505af1158015610df3573d6000803e3d6000fd5b50505050610e0185836132a0565b50965096945050505050565b6000610e1a848484613398565b949350505050565b60008060008342811015610e72576040805162461bcd60e51b8152602060048201526012602482015271115b1ad49bdd5d195c8e881156141254915160721b604482015290519081900360640190fd5b610ea08a7f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d8b348c8c613488565b90945092506000610ef27f000000000000000000000000cb018587da9590a18f49ffe2b85314c33af3ad3b8c7f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d61375a565b9050610f008b338388613832565b7f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d6001600160a01b031663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b158015610f5b57600080fd5b505af1158015610f6f573d6000803e3d6000fd5b50505050507f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d6001600160a01b031663a9059cbb82866040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015610ff457600080fd5b505af1158015611008573d6000803e3d6000fd5b505050506040513d602081101561101e57600080fd5b505161102657fe5b806001600160a01b0316636a627842886040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050602060405180830381600087803b15801561107e57600080fd5b505af1158015611092573d6000803e3d6000fd5b505050506040513d60208110156110a857600080fd5b50519250348410156110c0576110c0338534036132a0565b505096509650969350505050565b60008061111c7f000000000000000000000000cb018587da9590a18f49ffe2b85314c33af3ad3b8d7f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d61375a565b905060008661112b578b61112f565b6000195b6040805163d505accf60e01b815233600482015230602482015260448101839052606481018b905260ff8916608482015260a4810188905260c4810187905290519192506001600160a01b0384169163d505accf9160e48082019260009290919082900301818387803b1580156111a557600080fd5b505af11580156111b9573d6000803e3d6000fd5b505050506111cb8d8d8d8d8d8d612f80565b9d9c50505050505050505050505050565b60606112097f000000000000000000000000cb018587da9590a18f49ffe2b85314c33af3ad3b84846139a4565b90505b92915050565b60008060006112427f000000000000000000000000cb018587da9590a18f49ffe2b85314c33af3ad3b8f8f61375a565b9050600087611251578c611255565b6000195b6040805163d505accf60e01b815233600482015230602482015260448101839052606481018c905260ff8a16608482015260a4810189905260c4810188905290519192506001600160a01b0384169163d505accf9160e48082019260009290919082900301818387803b1580156112cb57600080fd5b505af11580156112df573d6000803e3d6000fd5b505050506112f28f8f8f8f8f8f8f612a48565b809450819550505050509b509b9950505050505050505050565b60608142811015611359576040805162461bcd60e51b8152602060048201526012602482015271115b1ad49bdd5d195c8e881156141254915160721b604482015290519081900360640190fd5b6113b77f000000000000000000000000cb018587da9590a18f49ffe2b85314c33af3ad3b89888880806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250613af192505050565b915086826001845103815181106113ca57fe5b6020026020010151101561140f5760405162461bcd60e51b81526004018080602001828103825260258152602001806147006025913960400191505060405180910390fd5b6114ad8686600081811061141f57fe5b905060200201356001600160a01b0316336114937f000000000000000000000000cb018587da9590a18f49ffe2b85314c33af3ad3b8a8a600081811061146157fe5b905060200201356001600160a01b03168b8b600181811061147e57fe5b905060200201356001600160a01b031661375a565b856000815181106114a057fe5b6020026020010151613832565b6114ec82878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250613c28915050565b509695505050505050565b7f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d81565b8042811015611566576040805162461bcd60e51b8152602060048201526012602482015271115b1ad49bdd5d195c8e881156141254915160721b604482015290519081900360640190fd5b7f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d6001600160a01b03168585600081811061159d57fe5b905060200201356001600160a01b03166001600160a01b031614611602576040805162461bcd60e51b815260206004820152601760248201527608ad8d6a4deeae8cae47440929cac82989288bea082a89604b1b604482015290519081900360640190fd5b60003490507f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d6001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561166257600080fd5b505af1158015611676573d6000803e3d6000fd5b50505050507f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d6001600160a01b031663a9059cbb6116f87f000000000000000000000000cb018587da9590a18f49ffe2b85314c33af3ad3b898960008181106116db57fe5b905060200201356001600160a01b03168a8a600181811061147e57fe5b836040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561174857600080fd5b505af115801561175c573d6000803e3d6000fd5b505050506040513d602081101561177257600080fd5b505161177a57fe5b60008686600019810181811061178c57fe5b905060200201356001600160a01b03166001600160a01b03166370a08231866040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156117f157600080fd5b505afa158015611805573d6000803e3d6000fd5b505050506040513d602081101561181b57600080fd5b5051604080516020898102828101820190935289825292935061185d9290918a918a918291850190849080828437600092019190915250899250613e6e915050565b8761190f828989600019810181811061187257fe5b905060200201356001600160a01b03166001600160a01b03166370a08231896040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156118d757600080fd5b505afa1580156118eb573d6000803e3d6000fd5b505050506040513d602081101561190157600080fd5b50519063ffffffff61419916565b101561194c5760405162461bcd60e51b81526004018080602001828103825260258152602001806147006025913960400191505060405180910390fd5b5050505050505050565b606081428110156119a3576040805162461bcd60e51b8152602060048201526012602482015271115b1ad49bdd5d195c8e881156141254915160721b604482015290519081900360640190fd5b7f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d6001600160a01b0316868660008181106119da57fe5b905060200201356001600160a01b03166001600160a01b031614611a3f576040805162461bcd60e51b815260206004820152601760248201527608ad8d6a4deeae8cae47440929cac82989288bea082a89604b1b604482015290519081900360640190fd5b611a9d7f000000000000000000000000cb018587da9590a18f49ffe2b85314c33af3ad3b888888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506139a492505050565b91503482600081518110611aad57fe5b60200260200101511115611af25760405162461bcd60e51b81526004018080602001828103825260218152602001806146756021913960400191505060405180910390fd5b7f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d6001600160a01b031663d0e30db083600081518110611b2e57fe5b60200260200101516040518263ffffffff1660e01b81526004016000604051808303818588803b158015611b6157600080fd5b505af1158015611b75573d6000803e3d6000fd5b50505050507f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d6001600160a01b031663a9059cbb611bda7f000000000000000000000000cb018587da9590a18f49ffe2b85314c33af3ad3b898960008181106116db57fe5b84600081518110611be757fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015611c3e57600080fd5b505af1158015611c52573d6000803e3d6000fd5b505050506040513d6020811015611c6857600080fd5b5051611c7057fe5b611caf82878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250613c28915050565b81600081518110611cbc57fe5b6020026020010151341115611ceb57611ceb3383600081518110611cdc57fe5b602002602001015134036132a0565b5095945050505050565b8042811015611d40576040805162461bcd60e51b8152602060048201526012602482015271115b1ad49bdd5d195c8e881156141254915160721b604482015290519081900360640190fd5b611d9885856000818110611d5057fe5b905060200201356001600160a01b031633611d927f000000000000000000000000cb018587da9590a18f49ffe2b85314c33af3ad3b898960008181106116db57fe5b8a613832565b600085856000198101818110611daa57fe5b905060200201356001600160a01b03166001600160a01b03166370a08231856040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015611e0f57600080fd5b505afa158015611e23573d6000803e3d6000fd5b505050506040513d6020811015611e3957600080fd5b50516040805160208881028281018201909352888252929350611e7b929091899189918291850190849080828437600092019190915250889250613e6e915050565b8661190f8288886000198101818110611e9057fe5b905060200201356001600160a01b03166001600160a01b03166370a08231886040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156118d757600080fd5b60608142811015611f42576040805162461bcd60e51b8152602060048201526012602482015271115b1ad49bdd5d195c8e881156141254915160721b604482015290519081900360640190fd5b6001600160a01b037f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d1686866000198101818110611f7c57fe5b905060200201356001600160a01b03166001600160a01b031614611fe1576040805162461bcd60e51b815260206004820152601760248201527608ad8d6a4deeae8cae47440929cac82989288bea082a89604b1b604482015290519081900360640190fd5b61203f7f000000000000000000000000cb018587da9590a18f49ffe2b85314c33af3ad3b898888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506139a492505050565b9150868260008151811061204f57fe5b602002602001015111156120945760405162461bcd60e51b81526004018080602001828103825260218152602001806146756021913960400191505060405180910390fd5b6120a48686600081811061141f57fe5b6120e382878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250309250613c28915050565b7f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d6001600160a01b0316632e1a7d4d8360018551038151811061212257fe5b60200260200101516040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561216057600080fd5b505af1158015612174573d6000803e3d6000fd5b505050506114ec848360018551038151811061218c57fe5b60200260200101516132a0565b6000610e1a8484846141f1565b606081428110156121f3576040805162461bcd60e51b8152602060048201526012602482015271115b1ad49bdd5d195c8e881156141254915160721b604482015290519081900360640190fd5b6122517f000000000000000000000000cb018587da9590a18f49ffe2b85314c33af3ad3b898888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506139a492505050565b9150868260008151811061226157fe5b6020026020010151111561140f5760405162461bcd60e51b81526004018080602001828103825260218152602001806146756021913960400191505060405180910390fd5b80428110156122f1576040805162461bcd60e51b8152602060048201526012602482015271115b1ad49bdd5d195c8e881156141254915160721b604482015290519081900360640190fd5b6001600160a01b037f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d168585600019810181811061232b57fe5b905060200201356001600160a01b03166001600160a01b031614612390576040805162461bcd60e51b815260206004820152601760248201527608ad8d6a4deeae8cae47440929cac82989288bea082a89604b1b604482015290519081900360640190fd5b6123a085856000818110611d5057fe5b6123de858580806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250309250613e6e915050565b604080516370a0823160e01b815230600482015290516000916001600160a01b037f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d16916370a0823191602480820192602092909190829003018186803b15801561244857600080fd5b505afa15801561245c573d6000803e3d6000fd5b505050506040513d602081101561247257600080fd5b50519050868110156124b55760405162461bcd60e51b81526004018080602001828103825260258152602001806147006025913960400191505060405180910390fd5b7f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d6001600160a01b0316632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561251b57600080fd5b505af115801561252f573d6000803e3d6000fd5b5050505061194c84826132a0565b6060814281101561258a576040805162461bcd60e51b8152602060048201526012602482015271115b1ad49bdd5d195c8e881156141254915160721b604482015290519081900360640190fd5b6001600160a01b037f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d16868660001981018181106125c457fe5b905060200201356001600160a01b03166001600160a01b031614612629576040805162461bcd60e51b815260206004820152601760248201527608ad8d6a4deeae8cae47440929cac82989288bea082a89604b1b604482015290519081900360640190fd5b6126877f000000000000000000000000cb018587da9590a18f49ffe2b85314c33af3ad3b89888880806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250613af192505050565b9150868260018451038151811061269a57fe5b602002602001015110156120945760405162461bcd60e51b81526004018080602001828103825260258152602001806147006025913960400191505060405180910390fd5b6000610e1a8484846142e1565b60608142811015612739576040805162461bcd60e51b8152602060048201526012602482015271115b1ad49bdd5d195c8e881156141254915160721b604482015290519081900360640190fd5b7f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d6001600160a01b03168686600081811061277057fe5b905060200201356001600160a01b03166001600160a01b0316146127d5576040805162461bcd60e51b815260206004820152601760248201527608ad8d6a4deeae8cae47440929cac82989288bea082a89604b1b604482015290519081900360640190fd5b6128337f000000000000000000000000cb018587da9590a18f49ffe2b85314c33af3ad3b34888880806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250613af192505050565b9150868260018451038151811061284657fe5b6020026020010151101561288b5760405162461bcd60e51b81526004018080602001828103825260258152602001806147006025913960400191505060405180910390fd5b7f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d6001600160a01b031663d0e30db0836000815181106128c757fe5b60200260200101516040518263ffffffff1660e01b81526004016000604051808303818588803b1580156128fa57600080fd5b505af115801561290e573d6000803e3d6000fd5b50505050507f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d6001600160a01b031663a9059cbb6129737f000000000000000000000000cb018587da9590a18f49ffe2b85314c33af3ad3b898960008181106116db57fe5b8460008151811061298057fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156129d757600080fd5b505af11580156129eb573d6000803e3d6000fd5b505050506040513d6020811015612a0157600080fd5b5051612a0957fe5b611ceb82878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250613c28915050565b6000808242811015612a96576040805162461bcd60e51b8152602060048201526012602482015271115b1ad49bdd5d195c8e881156141254915160721b604482015290519081900360640190fd5b6000612ac37f000000000000000000000000cb018587da9590a18f49ffe2b85314c33af3ad3b8c8c61375a565b604080516323b872dd60e01b81523360048201526001600160a01b03831660248201819052604482018d9052915192935090916323b872dd916064808201926020929091908290030181600087803b158015612b1e57600080fd5b505af1158015612b32573d6000803e3d6000fd5b505050506040513d6020811015612b4857600080fd5b5050604080517f89afcb440000000000000000000000000000000000000000000000000000000081526001600160a01b03888116600483015282516000938493928616926389afcb44926024808301939282900301818787803b158015612bae57600080fd5b505af1158015612bc2573d6000803e3d6000fd5b505050506040513d6040811015612bd857600080fd5b50805160209091015190925090506000612bf28e8e6143a3565b509050806001600160a01b03168e6001600160a01b031614612c15578183612c18565b82825b90975095508a871015612c72576040805162461bcd60e51b815260206004820181905260248201527f456c6b526f757465723a20494e53554646494349454e545f415f414d4f554e54604482015290519081900360640190fd5b89861015612cc7576040805162461bcd60e51b815260206004820181905260248201527f456c6b526f757465723a20494e53554646494349454e545f425f414d4f554e54604482015290519081900360640190fd5b505050505097509795505050505050565b7f000000000000000000000000cb018587da9590a18f49ffe2b85314c33af3ad3b81565b60606112097f000000000000000000000000cb018587da9590a18f49ffe2b85314c33af3ad3b8484613af1565b6000806000612d797f000000000000000000000000cb018587da9590a18f49ffe2b85314c33af3ad3b8e7f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d61375a565b9050600087612d88578c612d8c565b6000195b6040805163d505accf60e01b815233600482015230602482015260448101839052606481018c905260ff8a16608482015260a4810189905260c4810188905290519192506001600160a01b0384169163d505accf9160e48082019260009290919082900301818387803b158015612e0257600080fd5b505af1158015612e16573d6000803e3d6000fd5b50505050612e288e8e8e8e8e8e610cec565b909f909e509c50505050505050505050505050565b60008060008342811015612e8d576040805162461bcd60e51b8152602060048201526012602482015271115b1ad49bdd5d195c8e881156141254915160721b604482015290519081900360640190fd5b612e9b8c8c8c8c8c8c613488565b90945092506000612ecd7f000000000000000000000000cb018587da9590a18f49ffe2b85314c33af3ad3b8e8e61375a565b9050612edb8d338388613832565b612ee78c338387613832565b806001600160a01b0316636a627842886040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050602060405180830381600087803b158015612f3f57600080fd5b505af1158015612f53573d6000803e3d6000fd5b505050506040513d6020811015612f6957600080fd5b5051949d939c50939a509198505050505050505050565b60008142811015612fcd576040805162461bcd60e51b8152602060048201526012602482015271115b1ad49bdd5d195c8e881156141254915160721b604482015290519081900360640190fd5b612ffc887f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d8989893089612a48565b604080516370a0823160e01b8152306004820152905191945061308092508a9187916001600160a01b038416916370a0823191602480820192602092909190829003018186803b15801561304f57600080fd5b505afa158015613063573d6000803e3d6000fd5b505050506040513d602081101561307957600080fd5b5051613108565b7f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d6001600160a01b0316632e1a7d4d836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156130e657600080fd5b505af11580156130fa573d6000803e3d6000fd5b505050506114ec84836132a0565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000178152925182516000946060949389169392918291908083835b602083106131b35780518252601f199092019160209182019101613194565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613215576040519150601f19603f3d011682016040523d82523d6000602084013e61321a565b606091505b5091509150818015613248575080511580613248575080806020019051602081101561324557600080fd5b50515b613299576040805162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c454400604482015290519081900360640190fd5b5050505050565b604080516000808252602082019092526001600160a01b0384169083906040518082805190602001908083835b602083106132ec5780518252601f1990920191602091820191016132cd565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461334e576040519150601f19603f3d011682016040523d82523d6000602084013e613353565b606091505b50509050806133935760405162461bcd60e51b81526004018080602001828103825260248152602001806146966024913960400191505060405180910390fd5b505050565b60008084116133d85760405162461bcd60e51b815260040180806020018281038252602581526020018061462a6025913960400191505060405180910390fd5b6000831180156133e85750600082115b6134235760405162461bcd60e51b81526004018080602001828103825260228152602001806146ba6022913960400191505060405180910390fd5b6000613437856103e563ffffffff61449716565b9050600061344b828563ffffffff61449716565b9050600061347183613465886103e863ffffffff61449716565b9063ffffffff61450316565b905080828161347c57fe5b04979650505050505050565b604080517fe6a439050000000000000000000000000000000000000000000000000000000081526001600160a01b03888116600483015287811660248301529151600092839283927f000000000000000000000000cb018587da9590a18f49ffe2b85314c33af3ad3b9092169163e6a4390591604480820192602092909190829003018186803b15801561351b57600080fd5b505afa15801561352f573d6000803e3d6000fd5b505050506040513d602081101561354557600080fd5b50516001600160a01b0316141561361157604080517fc9c653960000000000000000000000000000000000000000000000000000000081526001600160a01b038a81166004830152898116602483015291517f000000000000000000000000cb018587da9590a18f49ffe2b85314c33af3ad3b9092169163c9c65396916044808201926020929091908290030181600087803b1580156135e457600080fd5b505af11580156135f8573d6000803e3d6000fd5b505050506040513d602081101561360e57600080fd5b50505b60008061363f7f000000000000000000000000cb018587da9590a18f49ffe2b85314c33af3ad3b8b8b61455b565b91509150816000148015613651575080155b156136615787935086925061374d565b600061366e8984846142e1565b90508781116136d757858110156136cc576040805162461bcd60e51b815260206004820181905260248201527f456c6b526f757465723a20494e53554646494349454e545f425f414d4f554e54604482015290519081900360640190fd5b88945092508261374b565b60006136e48984866142e1565b9050898111156136f057fe5b87811015613745576040805162461bcd60e51b815260206004820181905260248201527f456c6b526f757465723a20494e53554646494349454e545f415f414d4f554e54604482015290519081900360640190fd5b94508793505b505b5050965096945050505050565b600080600061376985856143a3565b604080516bffffffffffffffffffffffff19606094851b811660208084019190915293851b81166034830152825160288184030181526048830184528051908501207fff0000000000000000000000000000000000000000000000000000000000000060688401529a90941b9093166069840152607d8301989098527f84845e7ccb283dec564acfcd3d9287a491dec6d675705545a2ab8be22ad78f31609d808401919091528851808403909101815260bd909201909752805196019590952095945050505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166323b872dd60e01b17815292518251600094606094938a169392918291908083835b602083106138cc5780518252601f1990920191602091820191016138ad565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461392e576040519150601f19603f3d011682016040523d82523d6000602084013e613933565b606091505b5091509150818015613961575080511580613961575080806020019051602081101561395e57600080fd5b50515b61399c5760405162461bcd60e51b81526004018080602001828103825260248152602001806146dc6024913960400191505060405180910390fd5b505050505050565b60606002825110156139fd576040805162461bcd60e51b815260206004820152601860248201527f456c6b4c6962726172793a20494e56414c49445f504154480000000000000000604482015290519081900360640190fd5b815167ffffffffffffffff81118015613a1557600080fd5b50604051908082528060200260200182016040528015613a3f578160200160208202803683370190505b5090508281600183510381518110613a5357fe5b60209081029190910101528151600019015b8015613ae957600080613aa287866001860381518110613a8157fe5b6020026020010151878681518110613a9557fe5b602002602001015161455b565b91509150613ac4848481518110613ab557fe5b602002602001015183836141f1565b846001850381518110613ad357fe5b6020908102919091010152505060001901613a65565b509392505050565b6060600282511015613b4a576040805162461bcd60e51b815260206004820152601860248201527f456c6b4c6962726172793a20494e56414c49445f504154480000000000000000604482015290519081900360640190fd5b815167ffffffffffffffff81118015613b6257600080fd5b50604051908082528060200260200182016040528015613b8c578160200160208202803683370190505b5090508281600081518110613b9d57fe5b60200260200101818152505060005b6001835103811015613ae957600080613be287868581518110613bcb57fe5b6020026020010151878660010181518110613a9557fe5b91509150613c04848481518110613bf557fe5b60200260200101518383613398565b848460010181518110613c1357fe5b60209081029190910101525050600101613bac565b60005b6001835103811015613e6857600080848381518110613c4657fe5b6020026020010151858460010181518110613c5d57fe5b6020026020010151915091506000613c7583836143a3565b5090506000878560010181518110613c8957fe5b60200260200101519050600080836001600160a01b0316866001600160a01b031614613cb757826000613cbb565b6000835b91509150600060028a51038810613cd25788613d13565b613d137f000000000000000000000000cb018587da9590a18f49ffe2b85314c33af3ad3b878c8b60020181518110613d0657fe5b602002602001015161375a565b9050613d407f000000000000000000000000cb018587da9590a18f49ffe2b85314c33af3ad3b888861375a565b6001600160a01b031663022c0d9f84848460006040519080825280601f01601f191660200182016040528015613d7d576020820181803683370190505b506040518563ffffffff1660e01b815260040180858152602001848152602001836001600160a01b03166001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b83811015613dee578181015183820152602001613dd6565b50505050905090810190601f168015613e1b5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015613e3d57600080fd5b505af1158015613e51573d6000803e3d6000fd5b505060019099019850613c2b975050505050505050565b50505050565b60005b600183510381101561339357600080848381518110613e8c57fe5b6020026020010151858460010181518110613ea357fe5b6020026020010151915091506000613ebb83836143a3565b5090506000613eeb7f000000000000000000000000cb018587da9590a18f49ffe2b85314c33af3ad3b858561375a565b9050600080600080846001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015613f2c57600080fd5b505afa158015613f40573d6000803e3d6000fd5b505050506040513d6060811015613f5657600080fd5b5080516020909101516dffffffffffffffffffffffffffff91821693501690506000806001600160a01b038a811690891614613f93578284613f96565b83835b91509150613ff4828b6001600160a01b03166370a082318a6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156118d757600080fd5b9550614001868383613398565b945050505050600080856001600160a01b0316886001600160a01b03161461402b5782600061402f565b6000835b91509150600060028c51038a10614046578a61407a565b61407a7f000000000000000000000000cb018587da9590a18f49ffe2b85314c33af3ad3b898e8d60020181518110613d0657fe5b60408051600080825260208201928390527f022c0d9f00000000000000000000000000000000000000000000000000000000835260248201878152604483018790526001600160a01b038086166064850152608060848501908152845160a48601819052969750908c169563022c0d9f958a958a958a9591949193919260c486019290918190849084905b8381101561411d578181015183820152602001614105565b50505050905090810190601f16801561414a5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561416c57600080fd5b505af1158015614180573d6000803e3d6000fd5b50506001909b019a50613e719950505050505050505050565b8082038281111561120c576040805162461bcd60e51b815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b60008084116142315760405162461bcd60e51b815260040180806020018281038252602681526020018061464f6026913960400191505060405180910390fd5b6000831180156142415750600082115b61427c5760405162461bcd60e51b81526004018080602001828103825260228152602001806146ba6022913960400191505060405180910390fd5b60006142a06103e8614294868863ffffffff61449716565b9063ffffffff61449716565b905060006142ba6103e5614294868963ffffffff61419916565b90506142d760018284816142ca57fe5b049063ffffffff61450316565b9695505050505050565b6000808411614337576040805162461bcd60e51b815260206004820152601f60248201527f456c6b4c6962726172793a20494e53554646494349454e545f414d4f554e5400604482015290519081900360640190fd5b6000831180156143475750600082115b6143825760405162461bcd60e51b81526004018080602001828103825260228152602001806146ba6022913960400191505060405180910390fd5b82614393858463ffffffff61449716565b8161439a57fe5b04949350505050565b600080826001600160a01b0316846001600160a01b0316141561440d576040805162461bcd60e51b815260206004820152601f60248201527f456c6b4c6962726172793a204944454e544943414c5f41444452455353455300604482015290519081900360640190fd5b826001600160a01b0316846001600160a01b03161061442d578284614430565b83835b90925090506001600160a01b038216614490576040805162461bcd60e51b815260206004820152601860248201527f456c6b4c6962726172793a205a45524f5f414444524553530000000000000000604482015290519081900360640190fd5b9250929050565b60008115806144b2575050808202828282816144af57fe5b04145b61120c576040805162461bcd60e51b815260206004820152601460248201527f64732d6d6174682d6d756c2d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b8082018281101561120c576040805162461bcd60e51b815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b600080600061456a85856143a3565b50905060008061457b88888861375a565b6001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b1580156145b357600080fd5b505afa1580156145c7573d6000803e3d6000fd5b505050506040513d60608110156145dd57600080fd5b5080516020909101516dffffffffffffffffffffffffffff91821693501690506001600160a01b038781169084161461461757808261461a565b81815b9099909850965050505050505056fe456c6b4c6962726172793a20494e53554646494349454e545f494e5055545f414d4f554e54456c6b4c6962726172793a20494e53554646494349454e545f4f55545055545f414d4f554e54456c6b526f757465723a204558434553534956455f494e5055545f414d4f554e545472616e7366657248656c7065723a20784441495f5452414e534645525f4641494c4544456c6b4c6962726172793a20494e53554646494349454e545f4c49515549444954595472616e7366657248656c7065723a205452414e534645525f46524f4d5f4641494c4544456c6b526f757465723a20494e53554646494349454e545f4f55545055545f414d4f554e54a264697066735822122010b14015c2c5cc69d0c5f8f4267a236bc79e53eac819d4939989521d40c6be7264736f6c63430006060033