Contract 0xe9c7650b97712c0ec958ff270fbf4189fb99c071 1

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x8dfe5d1a7171c68344d56d00fb463c1571d1fbdd9326df74b686c8a236db299aSwap ETH For Exa...119377922021-10-20 13:39:0017 secs ago0xdd48bdb73bdff0927ddf4c090d80a8011fa4b361 IN  0xe9c7650b97712c0ec958ff270fbf4189fb99c0710.68733800145419 BNB0.001567515
0x6fe8ca270e9327c1b8bcb3bee41d3455f0e6dd0f8d32ca2c51f06d87ce4382faSwap Exact ETH F...119377912021-10-20 13:38:5720 secs ago0x85b3fe9716bd32ce8b1812874d9aa133ad218c55 IN  0xe9c7650b97712c0ec958ff270fbf4189fb99c0716 BNB0.0014901537
0xc07661d2cd780ac044fe24f177a1ed0a9e1bf767ed8ee729412a7fcfca128436Add Liquidity119377882021-10-20 13:38:4829 secs ago0xb4092f1e6062c4d4b83feedd8e91867617856351 IN  0xe9c7650b97712c0ec958ff270fbf4189fb99c0710 BNB0.001040245
0x0c7598ea4dd7663a2da903989c225c5e87584961d4e634d0f81e52027e3aff74Swap Exact ETH F...119377882021-10-20 13:38:4829 secs ago0x73a781457f4e567dd4810e1d56b8ad657eba3443 IN  0xe9c7650b97712c0ec958ff270fbf4189fb99c0713 BNB0.0014901537
0xfe4cd390f7ef8582d2586f58d9410ffa1185de35a7f3680b10b61e11b8865adaSwap Exact Token...119377862021-10-20 13:38:4235 secs ago0x8853b152a17c64aa58d159682d0a7928e209371b IN  0xe9c7650b97712c0ec958ff270fbf4189fb99c0710 BNB0.0015579735
0xb40184043d398405c725c2c2c31b529aabd395fcf77f9b58ecb000b8f15dd29eSwap Exact Token...119377832021-10-20 13:38:3344 secs ago0xbb098bd81dbca64df11373d19d9a85a4694a3e43 IN  0xe9c7650b97712c0ec958ff270fbf4189fb99c0710 BNB0.001602425
0x534c0a7e3209353a0838163b4a298ed66412dcf2143074e1b16641a21aeb7bfcSwap Exact Token...119377802021-10-20 13:38:2453 secs ago0xb4092f1e6062c4d4b83feedd8e91867617856351 IN  0xe9c7650b97712c0ec958ff270fbf4189fb99c0710 BNB0.001430445
0x27d26774bc3b97b9f66e6c6817a6d06264fbd5f2bb4808d119d72ec92574d53fSwap Exact ETH F...119377792021-10-20 13:38:2156 secs ago0x8853b152a17c64aa58d159682d0a7928e209371b IN  0xe9c7650b97712c0ec958ff270fbf4189fb99c0713.77488 BNB0.0014281377
0x7b8d7970ebf0e3ba38c9edbcdc8a0fd03e69e4a2a23259b274139ebe5e3133d9Remove Liquidity119377772021-10-20 13:38:151 min ago0xcefd2d4f08d86a547fb62099e100838c43452a28 IN  0xe9c7650b97712c0ec958ff270fbf4189fb99c0710 BNB0.000958345
0xdef84440f8cfc9ca7332cc973cd67f6f272c4018045b9646cd4ca661441b750cSwap Exact Token...119377772021-10-20 13:38:151 min ago0x85b3fe9716bd32ce8b1812874d9aa133ad218c55 IN  0xe9c7650b97712c0ec958ff270fbf4189fb99c0710 BNB0.0015579735
0xcda8128c8b6cfd86102bf13131b430ae2f86034a6023cc97426b4eba1d1bc07dSwap Exact Token...119377702021-10-20 13:37:541 min ago0x107f35a0c04aa5e1c6ca3a48fd332930982a99b7 IN  0xe9c7650b97712c0ec958ff270fbf4189fb99c0710 BNB0.0027187
0x0db1671f375bb7cf56a7d0ac8c5d08e1080c5be203c51a6ed0555c57fb378e7eSwap Exact Token...119377672021-10-20 13:37:451 min ago0x8853b152a17c64aa58d159682d0a7928e209371b IN  0xe9c7650b97712c0ec958ff270fbf4189fb99c0710 BNB0.0015579735
0x9c5c43dec3f8ae580e725051fce99f29c318ef7bdaba0609e184b08b90501000Swap Exact ETH F...119377662021-10-20 13:37:421 min ago0x85b3fe9716bd32ce8b1812874d9aa133ad218c55 IN  0xe9c7650b97712c0ec958ff270fbf4189fb99c0716 BNB0.0014901537
0x052eaebf0a49bc7d5a0b7833f651a95ab903942a68635fabb2d2b676d01de5a7Swap Exact Token...119377612021-10-20 13:37:271 min ago0x81ab9d56c5a7f268a9ea5e3fe233771423754895 IN  0xe9c7650b97712c0ec958ff270fbf4189fb99c0710 BNB0.00168509
0x6c422e00363263c71a607ba4525436d3be750f2cb54aa3d69163565ee43d068bSwap Exact Token...119377542021-10-20 13:37:062 mins ago0x85b3fe9716bd32ce8b1812874d9aa133ad218c55 IN  0xe9c7650b97712c0ec958ff270fbf4189fb99c0710 BNB0.0015579735
0x051b393135f2cc5ab35d7da631dbd280dcae16cc9f405a4cc2ff730ee3c5d740Swap Exact Token...119377532021-10-20 13:37:032 mins ago0xb4092f1e6062c4d4b83feedd8e91867617856351 IN  0xe9c7650b97712c0ec958ff270fbf4189fb99c0710 BNB0.002653725
0x7cc4eacadbebf7faafbedd387fc6a72a6eb516b6646c626d7e137dafc26d10b6Add Liquidity119377522021-10-20 13:37:002 mins ago0xbff0365285a680a76df156469c6248a920ae0fe6 IN  0xe9c7650b97712c0ec958ff270fbf4189fb99c0710 BNB0.001115065
0x52730be4b597a626db231bd94c4067c5558b93f1038a5188b44a3d80fe573a6bAdd Liquidity119377512021-10-20 13:36:572 mins ago0x6d87dd410efdc62cc0df6a047bec5982ad60d411 IN  0xe9c7650b97712c0ec958ff270fbf4189fb99c0710 BNB0.00107124
0x227a1703b933900a33dac25ebb04c13f3f25156092c49c9465cef0ed26205196Swap Exact ETH F...119377492021-10-20 13:36:512 mins ago0x8853b152a17c64aa58d159682d0a7928e209371b IN  0xe9c7650b97712c0ec958ff270fbf4189fb99c0713.801259 BNB0.0014901537
0x12fbd9fe6f9bd73509c2451b6160b009aec1b3ad72d92ecaa8e87bc91d00af3aSwap Exact ETH F...119377442021-10-20 13:36:362 mins ago0xf4e188c80815fe8f434a86b5e0ff33a91fe9685e IN  0xe9c7650b97712c0ec958ff270fbf4189fb99c0710.1 BNB0.001460935
0xfcdb4e4bdec62c133b15b0a4bb3ae62b8769f7ea6777877095da7a607652c00bSwap Exact Token...119377432021-10-20 13:36:332 mins ago0x8853b152a17c64aa58d159682d0a7928e209371b IN  0xe9c7650b97712c0ec958ff270fbf4189fb99c0710 BNB0.0015579123
0xe203820a0ec58e388d03e342ccd32b8d1110404addeb47365ada939a923c7b03Swap Exact ETH F...119377422021-10-20 13:36:302 mins ago0x85b3fe9716bd32ce8b1812874d9aa133ad218c55 IN  0xe9c7650b97712c0ec958ff270fbf4189fb99c0716.15 BNB0.0014901537
0x0f745bd4acb4a99a7377ae3bc730402d748a2db4e5bbf7cbeff6ed830febcf85Add Liquidity119377382021-10-20 13:36:182 mins ago0x6d87dd410efdc62cc0df6a047bec5982ad60d411 IN  0xe9c7650b97712c0ec958ff270fbf4189fb99c0710 BNB0.000160735
0xd1a412fdddf1e0aa838eef9eb0b267e54c1db0ce82401b061c7a0c2b1cd33f39Swap Exact Token...119377372021-10-20 13:36:153 mins ago0x4e3b7eb73f06302f280fcc5b703c78b27db6216a IN  0xe9c7650b97712c0ec958ff270fbf4189fb99c0710 BNB0.00079891
0xa6bcb8d0a93f4cd36c96bac44c92fdcd60a133388314d1285f329152b4df4d45Swap Exact ETH F...119377362021-10-20 13:36:123 mins ago0x8853b152a17c64aa58d159682d0a7928e209371b IN  0xe9c7650b97712c0ec958ff270fbf4189fb99c0713.809498 BNB0.0014901537
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x27d26774bc3b97b9f66e6c6817a6d06264fbd5f2bb4808d119d72ec92574d53f119377792021-10-20 13:38:2156 secs ago 0xe9c7650b97712c0ec958ff270fbf4189fb99c071 Binance: WBNB Token3.77488 BNB
0xdef84440f8cfc9ca7332cc973cd67f6f272c4018045b9646cd4ca661441b750c119377772021-10-20 13:38:151 min ago 0xe9c7650b97712c0ec958ff270fbf4189fb99c0710x85b3fe9716bd32ce8b1812874d9aa133ad218c555.923139876035072519 BNB
0xdef84440f8cfc9ca7332cc973cd67f6f272c4018045b9646cd4ca661441b750c119377772021-10-20 13:38:151 min ago Binance: WBNB Token 0xe9c7650b97712c0ec958ff270fbf4189fb99c0715.923139876035072519 BNB
0x0db1671f375bb7cf56a7d0ac8c5d08e1080c5be203c51a6ed0555c57fb378e7e119377672021-10-20 13:37:451 min ago 0xe9c7650b97712c0ec958ff270fbf4189fb99c0710x8853b152a17c64aa58d159682d0a7928e209371b3.777927260868705672 BNB
0x0db1671f375bb7cf56a7d0ac8c5d08e1080c5be203c51a6ed0555c57fb378e7e119377672021-10-20 13:37:451 min ago Binance: WBNB Token 0xe9c7650b97712c0ec958ff270fbf4189fb99c0713.777927260868705672 BNB
0x9c5c43dec3f8ae580e725051fce99f29c318ef7bdaba0609e184b08b90501000119377662021-10-20 13:37:421 min ago 0xe9c7650b97712c0ec958ff270fbf4189fb99c071 Binance: WBNB Token6 BNB
0x052eaebf0a49bc7d5a0b7833f651a95ab903942a68635fabb2d2b676d01de5a7119377612021-10-20 13:37:271 min ago 0xe9c7650b97712c0ec958ff270fbf4189fb99c0710x81ab9d56c5a7f268a9ea5e3fe2337714237548950.084477586549201549 BNB
0x052eaebf0a49bc7d5a0b7833f651a95ab903942a68635fabb2d2b676d01de5a7119377612021-10-20 13:37:271 min ago Binance: WBNB Token 0xe9c7650b97712c0ec958ff270fbf4189fb99c0710.084477586549201549 BNB
0x6c422e00363263c71a607ba4525436d3be750f2cb54aa3d69163565ee43d068b119377542021-10-20 13:37:062 mins ago 0xe9c7650b97712c0ec958ff270fbf4189fb99c0710x85b3fe9716bd32ce8b1812874d9aa133ad218c556.074208385721889891 BNB
0x6c422e00363263c71a607ba4525436d3be750f2cb54aa3d69163565ee43d068b119377542021-10-20 13:37:062 mins ago Binance: WBNB Token 0xe9c7650b97712c0ec958ff270fbf4189fb99c0716.074208385721889891 BNB
0x227a1703b933900a33dac25ebb04c13f3f25156092c49c9465cef0ed26205196119377492021-10-20 13:36:512 mins ago 0xe9c7650b97712c0ec958ff270fbf4189fb99c071 Binance: WBNB Token3.801259 BNB
0x12fbd9fe6f9bd73509c2451b6160b009aec1b3ad72d92ecaa8e87bc91d00af3a119377442021-10-20 13:36:362 mins ago 0xe9c7650b97712c0ec958ff270fbf4189fb99c071 Binance: WBNB Token0.1 BNB
0xfcdb4e4bdec62c133b15b0a4bb3ae62b8769f7ea6777877095da7a607652c00b119377432021-10-20 13:36:332 mins ago 0xe9c7650b97712c0ec958ff270fbf4189fb99c0710x8853b152a17c64aa58d159682d0a7928e209371b3.804307134191733648 BNB
0xfcdb4e4bdec62c133b15b0a4bb3ae62b8769f7ea6777877095da7a607652c00b119377432021-10-20 13:36:332 mins ago Binance: WBNB Token 0xe9c7650b97712c0ec958ff270fbf4189fb99c0713.804307134191733648 BNB
0xe203820a0ec58e388d03e342ccd32b8d1110404addeb47365ada939a923c7b03119377422021-10-20 13:36:302 mins ago 0xe9c7650b97712c0ec958ff270fbf4189fb99c071 Binance: WBNB Token6.15 BNB
0xa6bcb8d0a93f4cd36c96bac44c92fdcd60a133388314d1285f329152b4df4d45119377362021-10-20 13:36:123 mins ago 0xe9c7650b97712c0ec958ff270fbf4189fb99c071 Binance: WBNB Token3.809498 BNB
0x1921bc2c746bb4a63f5e6ee8fead140b8d4f21ab472c4064f61e11f08d4acc26119377352021-10-20 13:36:093 mins ago 0xe9c7650b97712c0ec958ff270fbf4189fb99c0710x5c4d2121357d4d818ac622b96eba1353a606cdc10.009536946472944334 BNB
0x1921bc2c746bb4a63f5e6ee8fead140b8d4f21ab472c4064f61e11f08d4acc26119377352021-10-20 13:36:093 mins ago Binance: WBNB Token 0xe9c7650b97712c0ec958ff270fbf4189fb99c0710.009536946472944334 BNB
0xda76a6bd3d50e779e100af23b1f07ac3ed84b1ad77aecbddec972c05e9852811119377342021-10-20 13:36:063 mins ago 0xe9c7650b97712c0ec958ff270fbf4189fb99c071 Binance: WBNB Token1 BNB
0x1b72fb292309a182e9ced1c7fc37a2b557d3e8d20a6b7d450226284c948c5ec2119377282021-10-20 13:35:483 mins ago 0xe9c7650b97712c0ec958ff270fbf4189fb99c0710x85b3fe9716bd32ce8b1812874d9aa133ad218c556.080571089269407986 BNB
0x1b72fb292309a182e9ced1c7fc37a2b557d3e8d20a6b7d450226284c948c5ec2119377282021-10-20 13:35:483 mins ago Binance: WBNB Token 0xe9c7650b97712c0ec958ff270fbf4189fb99c0716.080571089269407986 BNB
0xc3adf3e3889fd918f30779d3b971e2c453007e1f7fa2f541cf4914de468145e1119377252021-10-20 13:35:393 mins ago 0xe9c7650b97712c0ec958ff270fbf4189fb99c0710x5c4d2121357d4d818ac622b96eba1353a606cdc10.009473746208647309 BNB
0xc3adf3e3889fd918f30779d3b971e2c453007e1f7fa2f541cf4914de468145e1119377252021-10-20 13:35:393 mins ago Binance: WBNB Token 0xe9c7650b97712c0ec958ff270fbf4189fb99c0710.009473746208647309 BNB
0xc4db3caa84380c4b6932083aef99eb56891018ef4938aa906687bec015e4c62f119377212021-10-20 13:35:273 mins ago 0xe9c7650b97712c0ec958ff270fbf4189fb99c0710x8853b152a17c64aa58d159682d0a7928e209371b3.812699110300363448 BNB
0xc4db3caa84380c4b6932083aef99eb56891018ef4938aa906687bec015e4c62f119377212021-10-20 13:35:273 mins ago Binance: WBNB Token 0xe9c7650b97712c0ec958ff270fbf4189fb99c0713.812699110300363448 BNB
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SwapRouter

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 13 : SwapRouter.sol
// SPDX-License-Identifier: MIT

pragma solidity =0.6.12;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts/math/SafeMath.sol";
import '@openzeppelin/contracts/access/Ownable.sol';
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import '../libraries/SwapLibrary.sol';
import '../libraries/TransferHelper.sol';
import '../interfaces/ISwapRouter02.sol';
import '../interfaces/ISwapFactory.sol';
import '../interfaces/IWOKT.sol';
import "../libraries/TransferHelper.sol";
import "../interfaces/ISwapAdapter.sol";

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

contract SwapRouter is ISwapRouter02, Ownable {
    using SafeMath for uint256;

    struct PoolInfo {
        uint256 direction;
        uint256 poolEdition;
        uint256 weight;
        address pool;
        address adapter;
        bytes moreInfo;
    }

    event ExSwap(
        address fromToken,
        address toToken,
        address sender,
        uint256 fromAmount,
        uint256 returnAmount
    );

    address public immutable override factory;
    address public immutable override WOKT;
    address public override tradingPool;
    mapping (address => bool) public isWhiteListed;

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

    constructor(address _factory, address _WOKT) public {
        factory = _factory;
        WOKT = _WOKT;
    }

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

    function addWhiteList (address contractAddr) public onlyOwner {
        isWhiteListed[contractAddr] = true;
    }

    function removeWhiteList (address contractAddr) public onlyOwner {
        isWhiteListed[contractAddr] = false;
    }

    function setTradingPool(address _tradingPool) public onlyOwner {
        tradingPool = _tradingPool;
    }

    // **** ADD LIQUIDITY ****
    function _addLiquidity(
        address tokenA,
        address tokenB,
        uint256 amountADesired,
        uint256 amountBDesired,
        uint256 amountAMin,
        uint256 amountBMin
    ) internal virtual returns (uint256 amountA, uint256 amountB) {
        // create the pair if it doesn't exist yet
        if (ISwapFactory(factory).getPair(tokenA, tokenB) == address(0)) {
            ISwapFactory(factory).createPair(tokenA, tokenB);
        }
        (uint256 reserveA, uint256 reserveB) = SwapLibrary.getReserves(factory, tokenA, tokenB);
        if (reserveA == 0 && reserveB == 0) {
            (amountA, amountB) = (amountADesired, amountBDesired);
        } else {
            uint256 amountBOptimal = SwapLibrary.quote(amountADesired, reserveA, reserveB);
            if (amountBOptimal <= amountBDesired) {
                require(amountBOptimal >= amountBMin, 'SwapRouter: INSUFFICIENT_B_AMOUNT');
                (amountA, amountB) = (amountADesired, amountBOptimal);
            } else {
                uint256 amountAOptimal = SwapLibrary.quote(amountBDesired, reserveB, reserveA);
                assert(amountAOptimal <= amountADesired);
                require(amountAOptimal >= amountAMin, 'SwapRouter: INSUFFICIENT_A_AMOUNT');
                (amountA, amountB) = (amountAOptimal, amountBDesired);
            }
        }
    }
    
    function pairFor(address tokenA, address tokenB) public view returns(address) {
        return SwapLibrary.pairFor(factory, tokenA, tokenB);
    }

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint256 amountADesired,
        uint256 amountBDesired,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    )
        external
        virtual
        override
        ensure(deadline)
        returns (
            uint256 amountA,
            uint256 amountB,
            uint256 liquidity
        )
    {
        (amountA, amountB) = _addLiquidity(tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin);
        address pair = SwapLibrary.pairFor(factory, tokenA, tokenB);
        TransferHelper.safeTransferFrom(tokenA, msg.sender, pair, amountA);
        TransferHelper.safeTransferFrom(tokenB, msg.sender, pair, amountB);
        liquidity = ISwapPair(pair).mint(to);
    }

    function addLiquidityETH(
        address token,
        uint256 amountTokenDesired,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    )
        external
        payable
        virtual
        override
        ensure(deadline)
        returns (
            uint256 amountToken,
            uint256 amountETH,
            uint256 liquidity
        )
    {
        (amountToken, amountETH) = _addLiquidity(
            token,
            WOKT,
            amountTokenDesired,
            msg.value,
            amountTokenMin,
            amountETHMin
        );
        address pair = SwapLibrary.pairFor(factory, token, WOKT);
        TransferHelper.safeTransferFrom(token, msg.sender, pair, amountToken);
        IWOKT(WOKT).deposit{value: amountETH}();
        assert(IWOKT(WOKT).transfer(pair, amountETH));
        liquidity = ISwapPair(pair).mint(to);
        // refund dust eth, if any
        if (msg.value > amountETH) TransferHelper.safeTransferETH(msg.sender, msg.value - amountETH);
    }

    // **** REMOVE LIQUIDITY ****
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    ) public virtual override ensure(deadline) returns (uint256 amountA, uint256 amountB) {
        address pair = SwapLibrary.pairFor(factory, tokenA, tokenB);
        ISwapPair(pair).transferFrom(msg.sender, pair, liquidity); // send liquidity to pair
        (uint256 amount0, uint256 amount1) = ISwapPair(pair).burn(to);
        (address token0, ) = SwapLibrary.sortTokens(tokenA, tokenB);
        (amountA, amountB) = tokenA == token0 ? (amount0, amount1) : (amount1, amount0);
        require(amountA >= amountAMin, 'SwapRouter: INSUFFICIENT_A_AMOUNT');
        require(amountB >= amountBMin, 'SwapRouter: INSUFFICIENT_B_AMOUNT');
    }

    function removeLiquidityETH(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) public virtual override ensure(deadline) returns (uint256 amountToken, uint256 amountETH) {
        (amountToken, amountETH) = removeLiquidity(
            token,
            WOKT,
            liquidity,
            amountTokenMin,
            amountETHMin,
            address(this),
            deadline
        );
        TransferHelper.safeTransfer(token, to, amountToken);
        IWOKT(WOKT).withdraw(amountETH);
        TransferHelper.safeTransferETH(to, amountETH);
    }

    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external virtual override returns (uint256 amountA, uint256 amountB) {
        address pair = SwapLibrary.pairFor(factory, tokenA, tokenB);
        uint256 value = approveMax ? uint256(-1) : liquidity;
        ISwapPair(pair).permit(msg.sender, address(this), value, deadline, v, r, s);
        (amountA, amountB) = removeLiquidity(tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline);
    }

    function removeLiquidityETHWithPermit(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external virtual override returns (uint256 amountToken, uint256 amountETH) {
        address pair = SwapLibrary.pairFor(factory, token, WOKT);
        uint256 value = approveMax ? uint256(-1) : liquidity;
        ISwapPair(pair).permit(msg.sender, address(this), value, deadline, v, r, s);
        (amountToken, amountETH) = removeLiquidityETH(token, liquidity, amountTokenMin, amountETHMin, to, deadline);
    }

    // **** REMOVE LIQUIDITY (supporting fee-on-transfer tokens) ****
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) public virtual override ensure(deadline) returns (uint256 amountETH) {
        (, amountETH) = removeLiquidity(token, WOKT, liquidity, amountTokenMin, amountETHMin, address(this), deadline);
        TransferHelper.safeTransfer(token, to, IERC20(token).balanceOf(address(this)));
        IWOKT(WOKT).withdraw(amountETH);
        TransferHelper.safeTransferETH(to, amountETH);
    }

    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external virtual override returns (uint256 amountETH) {
        address pair = SwapLibrary.pairFor(factory, token, WOKT);
        uint256 value = approveMax ? uint256(-1) : liquidity;
        ISwapPair(pair).permit(msg.sender, address(this), value, deadline, v, r, s);
        amountETH = removeLiquidityETHSupportingFeeOnTransferTokens(
            token,
            liquidity,
            amountTokenMin,
            amountETHMin,
            to,
            deadline
        );
    }

    // **** SWAP ****
    // requires the initial amount to have already been sent to the first pair
    function _swap(
        uint256[] memory amounts,
        address[] memory path,
        address _to
    ) internal virtual {
        for (uint256 i; i < path.length - 1; i++) {
            (address input, address output) = (path[i], path[i + 1]);
            (address token0, ) = SwapLibrary.sortTokens(input, output);
            uint256 amountOut = amounts[i + 1];
            if (tradingPool != address(0)) {
                ITradingPool(tradingPool).swap(msg.sender, input, output, amountOut);
            }
            (uint256 amount0Out, uint256 amount1Out) =
                input == token0 ? (uint256(0), amountOut) : (amountOut, uint256(0));
            address to = i < path.length - 2 ? SwapLibrary.pairFor(factory, output, path[i + 2]) : _to;
            ISwapPair(SwapLibrary.pairFor(factory, input, output)).swap(amount0Out, amount1Out, to, new bytes(0));
        }
    }

    function swapExactTokensForTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external virtual override ensure(deadline) returns (uint256[] memory amounts) {
        amounts = SwapLibrary.getAmountsOut(factory, amountIn, path);
        require(amounts[amounts.length - 1] >= amountOutMin, 'SwapRouter: INSUFFICIENT_OUTPUT_AMOUNT');
        TransferHelper.safeTransferFrom(
            path[0],
            msg.sender,
            SwapLibrary.pairFor(factory, path[0], path[1]),
            amounts[0]
        );
        _swap(amounts, path, to);
    }

    function swapTokensForExactTokens(
        uint256 amountOut,
        uint256 amountInMax,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external virtual override ensure(deadline) returns (uint256[] memory amounts) {
        amounts = SwapLibrary.getAmountsIn(factory, amountOut, path);
        require(amounts[0] <= amountInMax, 'SwapRouter: EXCESSIVE_INPUT_AMOUNT');
        TransferHelper.safeTransferFrom(
            path[0],
            msg.sender,
            SwapLibrary.pairFor(factory, path[0], path[1]),
            amounts[0]
        );
        _swap(amounts, path, to);
    }

    function swapExactETHForTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable virtual override ensure(deadline) returns (uint256[] memory amounts) {
        require(path[0] == WOKT, 'SwapRouter: INVALID_PATH');
        amounts = SwapLibrary.getAmountsOut(factory, msg.value, path);
        require(amounts[amounts.length - 1] >= amountOutMin, 'SwapRouter: INSUFFICIENT_OUTPUT_AMOUNT');
        IWOKT(WOKT).deposit{value: amounts[0]}();
        assert(IWOKT(WOKT).transfer(SwapLibrary.pairFor(factory, path[0], path[1]), amounts[0]));
        _swap(amounts, path, to);
    }

    function swapTokensForExactETH(
        uint256 amountOut,
        uint256 amountInMax,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external virtual override ensure(deadline) returns (uint256[] memory amounts) {
        require(path[path.length - 1] == WOKT, 'SwapRouter: INVALID_PATH');
        amounts = SwapLibrary.getAmountsIn(factory, amountOut, path);
        require(amounts[0] <= amountInMax, 'SwapRouter: EXCESSIVE_INPUT_AMOUNT');
        TransferHelper.safeTransferFrom(
            path[0],
            msg.sender,
            SwapLibrary.pairFor(factory, path[0], path[1]),
            amounts[0]
        );
        _swap(amounts, path, address(this));
        IWOKT(WOKT).withdraw(amounts[amounts.length - 1]);
        TransferHelper.safeTransferETH(to, amounts[amounts.length - 1]);
    }

    function swapExactTokensForETH(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external virtual override ensure(deadline) returns (uint256[] memory amounts) {
        require(path[path.length - 1] == WOKT, 'SwapRouter: INVALID_PATH');
        amounts = SwapLibrary.getAmountsOut(factory, amountIn, path);
        require(amounts[amounts.length - 1] >= amountOutMin, 'SwapRouter: INSUFFICIENT_OUTPUT_AMOUNT');
        TransferHelper.safeTransferFrom(
            path[0],
            msg.sender,
            SwapLibrary.pairFor(factory, path[0], path[1]),
            amounts[0]
        );
        _swap(amounts, path, address(this));
        IWOKT(WOKT).withdraw(amounts[amounts.length - 1]);
        TransferHelper.safeTransferETH(to, amounts[amounts.length - 1]);
    }

    function swapETHForExactTokens(
        uint256 amountOut,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable virtual override ensure(deadline) returns (uint256[] memory amounts) {
        require(path[0] == WOKT, 'SwapRouter: INVALID_PATH');
        amounts = SwapLibrary.getAmountsIn(factory, amountOut, path);
        require(amounts[0] <= msg.value, 'SwapRouter: EXCESSIVE_INPUT_AMOUNT');
        IWOKT(WOKT).deposit{value: amounts[0]}();
        assert(IWOKT(WOKT).transfer(SwapLibrary.pairFor(factory, path[0], path[1]), amounts[0]));
        _swap(amounts, path, to);
        // refund dust eth, if any
        if (msg.value > amounts[0]) TransferHelper.safeTransferETH(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 (uint256 i; i < path.length - 1; i++) {
            (address input, address output) = (path[i], path[i + 1]);
            (address token0, ) = SwapLibrary.sortTokens(input, output);
            ISwapPair pair = ISwapPair(SwapLibrary.pairFor(factory, input, output));
            uint256 amountInput;
            uint256 amountOutput;
            {
                // scope to avoid stack too deep errors
                (uint256 reserve0, uint256 reserve1, ) = pair.getReserves();
                (uint256 reserveInput, uint256 reserveOutput) =
                    input == token0 ? (reserve0, reserve1) : (reserve1, reserve0);
                amountInput = IERC20(input).balanceOf(address(pair)).sub(reserveInput);
                amountOutput = SwapLibrary.getAmountOut(amountInput, reserveInput, reserveOutput);
            }
            if (tradingPool != address(0)) {
                ITradingPool(tradingPool).swap(msg.sender, input, output, amountOutput);
            }
            (uint256 amount0Out, uint256 amount1Out) =
                input == token0 ? (uint256(0), amountOutput) : (amountOutput, uint256(0));
            address to = i < path.length - 2 ? SwapLibrary.pairFor(factory, output, path[i + 2]) : _to;
            pair.swap(amount0Out, amount1Out, to, new bytes(0));
        }
    }

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external virtual override ensure(deadline) {
        TransferHelper.safeTransferFrom(path[0], msg.sender, SwapLibrary.pairFor(factory, path[0], path[1]), amountIn);
        uint256 balanceBefore = IERC20(path[path.length - 1]).balanceOf(to);
        _swapSupportingFeeOnTransferTokens(path, to);
        require(
            IERC20(path[path.length - 1]).balanceOf(to).sub(balanceBefore) >= amountOutMin,
            'SwapRouter: INSUFFICIENT_OUTPUT_AMOUNT'
        );
    }

    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable virtual override ensure(deadline) {
        require(path[0] == WOKT, 'SwapRouter: INVALID_PATH');
        uint256 amountIn = msg.value;
        IWOKT(WOKT).deposit{value: amountIn}();
        assert(IWOKT(WOKT).transfer(SwapLibrary.pairFor(factory, path[0], path[1]), amountIn));
        uint256 balanceBefore = IERC20(path[path.length - 1]).balanceOf(to);
        _swapSupportingFeeOnTransferTokens(path, to);
        require(
            IERC20(path[path.length - 1]).balanceOf(to).sub(balanceBefore) >= amountOutMin,
            'SwapRouter: INSUFFICIENT_OUTPUT_AMOUNT'
        );
    }

    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external virtual override ensure(deadline) {
        require(path[path.length - 1] == WOKT, 'SwapRouter: INVALID_PATH');
        TransferHelper.safeTransferFrom(path[0], msg.sender, SwapLibrary.pairFor(factory, path[0], path[1]), amountIn);
        _swapSupportingFeeOnTransferTokens(path, address(this));
        uint256 amountOut = IERC20(WOKT).balanceOf(address(this));
        require(amountOut >= amountOutMin, 'SwapRouter: INSUFFICIENT_OUTPUT_AMOUNT');
        IWOKT(WOKT).withdraw(amountOut);
        TransferHelper.safeTransferETH(to, amountOut);
    }

    /**** mix swap  ****/

    function externalSwap(
        address fromToken,
        address toToken,
        address approveTarget,
        address swapTarget,
        uint256 fromTokenAmount,
        uint256 minReturnAmount,
        bytes memory callDataConcat,
        uint256 deadLine
    )
    external
    override
    payable
    ensure(deadLine)
    returns (uint256 returnAmount)
    {
        require(minReturnAmount > 0, "SwapRouter: RETURN_AMOUNT_ZERO");

        uint256 toTokenOriginBalance = TransferHelper.universalBalanceOf(toToken, msg.sender);
        if (!TransferHelper.isETH(fromToken)) {
            TransferHelper.safeTransferFrom(fromToken, msg.sender, address(this), fromTokenAmount);

            TransferHelper.universalApproveMax(fromToken, approveTarget, fromTokenAmount);
        }

        require(isWhiteListed[swapTarget], "SwapRouter: Not Whitelist Contract");
        (bool success, ) = swapTarget.call{value: TransferHelper.isETH(fromToken) ? msg.value : 0}(callDataConcat);

        require(success, "SwapRouter: External Swap execution Failed");

        TransferHelper.universalTransfer(
            toToken, msg.sender, TransferHelper.universalBalanceOf(toToken, address(this))
        );

        returnAmount = TransferHelper.universalBalanceOf(toToken, msg.sender).sub(toTokenOriginBalance);
        require(returnAmount >= minReturnAmount, "SwapRouter: Return amount is not enough");

        emit ExSwap(fromToken, toToken, msg.sender, fromTokenAmount, returnAmount);
    }

    function mixSwap(
        address fromToken,
        address toToken,
        uint256 fromTokenAmount,
        uint256 minReturnAmount,
        address[] memory mixAdapters,
        address[] memory mixPairs,
        address[] memory assetTo,
        uint256 directions,
        uint256 deadLine
    ) external override payable ensure(deadLine) returns (uint256 returnAmount) {
        require(mixPairs.length > 0, "SwapRouter: PAIRS_EMPTY");
        require(mixPairs.length == mixAdapters.length, "SwapRouter: PAIR_ADAPTER_NOT_MATCH");
        require(mixPairs.length == assetTo.length - 1, "SwapRouter: PAIR_ASSETTO_NOT_MATCH");
        require(minReturnAmount > 0, "SwapRouter: RETURN_AMOUNT_ZERO");

        address _fromToken = fromToken;
        address _toToken = toToken;
        uint256 _fromTokenAmount = fromTokenAmount;

        uint256 toTokenOriginBalance = TransferHelper.universalBalanceOf(_toToken, msg.sender);

        _deposit(msg.sender, assetTo[0], _fromToken, _fromTokenAmount, TransferHelper.isETH(_fromToken));

        for (uint256 i = 0; i < mixPairs.length; i++) {
            if (directions & 1 == 0) {
                ISwapAdapter(mixAdapters[i]).sellBase(assetTo[i + 1], mixPairs[i], "");
            } else {
                ISwapAdapter(mixAdapters[i]).sellQuote(assetTo[i + 1], mixPairs[i], "");
            }
            directions = directions >> 1;
        }

        if(TransferHelper.isETH(_toToken)) {
            returnAmount = IWOKT(WOKT).balanceOf(address(this));
            IWOKT(WOKT).withdraw(returnAmount);
            msg.sender.transfer(returnAmount);
        } else {
            returnAmount = TransferHelper.tokenBalanceOf(_toToken, msg.sender).sub(toTokenOriginBalance);
        }

        require(returnAmount >= minReturnAmount, "SwapRouter: Return amount is not enough");

        emit ExSwap(fromToken, toToken, msg.sender, _fromTokenAmount, returnAmount);
    }

    function polySwap(
        address fromToken,
        address toToken,
        uint256 fromTokenAmount,
        uint256 minReturnAmount,
        uint[] memory weights,
        address[] memory adapters,
        address[] memory pools,
        uint256 directions,
        uint256 deadLine
    ) external payable override ensure(deadLine) returns (uint256 returnAmount) {
        require(pools.length == adapters.length, 'SwapRouter: POOL_ADAPTER_NOT_MATCH');
        require(minReturnAmount > 0, "SwapRouter: RETURN_AMOUNT_ZERO");

        uint256 _fromTokenAmount = fromTokenAmount;
        uint256 toTokenOriginBalance = TransferHelper.universalBalanceOf(toToken, msg.sender);
        address _fromToken = fromToken;

        _deposit(msg.sender, address(this), _fromToken, _fromTokenAmount, TransferHelper.isETH(_fromToken));

        address midTo = msg.sender;
        if (TransferHelper.isETH(_fromToken)) {
            midTo = address(this);
        }

        address _toToken = toToken;
        address[] memory _adapters = adapters;
        uint[] memory _weights = weights;
        address[] memory _pools = pools;
        for(uint256 i = 0; i < _adapters.length; i++) {
            uint256 curAmount = _fromTokenAmount.mul(uint256(_weights[i])).div(100);
            IERC20(_fromToken).transfer(_pools[i], curAmount);

            if (directions & 1 == 0) {
                ISwapAdapter(_adapters[i]).sellBase(midTo, _pools[i], "");
            } else {
                ISwapAdapter(_adapters[i]).sellQuote(midTo, _pools[i], "");
            }
            directions = directions >> 1;
        }

        if(TransferHelper.isETH(_toToken)) {
            returnAmount = IWOKT(WOKT).balanceOf(address(this));
            IWOKT(WOKT).withdraw(returnAmount);
            msg.sender.transfer(returnAmount);
        }else {
            returnAmount = TransferHelper.tokenBalanceOf(_toToken, msg.sender).sub(toTokenOriginBalance);
        }

        require(returnAmount >= minReturnAmount, "SwapRouter: Return amount is not enough");

        emit ExSwap(_fromToken, _toToken, msg.sender, _fromTokenAmount, returnAmount);
    }

    function _deposit(
        address from,
        address to,
        address token,
        uint256 amount,
        bool isETH
    ) internal {
        if (isETH) {
            if (amount > 0) {
                IWOKT(WOKT).deposit{value: amount}();
                if (to != address(this)) TransferHelper.safeTransfer(WOKT, to, amount);
            }
        } else {
            TransferHelper.safeTransferFrom(token, from, to, amount);
        }
    }

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

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

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

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

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

File 2 of 13 : TransferHelper.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.6.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {

    address private constant ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

    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 safeTransferETH(address to, uint256 value) internal {
        (bool success, ) = to.call{value: value}(new bytes(0));
        require(success, 'TransferHelper: ETH_TRANSFER_FAILED');
    }

    function universalTransfer(
        address token,
        address payable to,
        uint256 amount
    ) internal {
        if (amount > 0) {
            if (isETH(token)) {
                to.transfer(amount);
            } else {
                safeTransfer(token, to, amount);
            }
        }
    }

    function universalApproveMax(
        address token,
        address to,
        uint256 amount
    ) internal {
        uint256 allowance = IERC20(token).allowance(address(this), to);
        if (allowance < amount) {
            if (allowance > 0) {
                safeApprove(token, to, 0);
            }
            safeApprove(token, to, uint256(-1));
        }
    }

    function universalBalanceOf(address token, address who) internal view returns (uint256) {
        if (isETH(token)) {
            return who.balance;
        } else {
            return IERC20(token).balanceOf(who);
        }
    }

    function tokenBalanceOf(address token, address who) internal view returns (uint256) {
        return IERC20(token).balanceOf(who);
    }

    function isETH(address token) internal pure returns (bool) {
        return token == ETH_ADDRESS;
    }

    function getETH() internal pure returns (address) {
        return ETH_ADDRESS;
    }
}

File 3 of 13 : SwapLibrary.sol
// SPDX-License-Identifier: MIT

pragma solidity =0.6.12;

import "@openzeppelin/contracts/math/SafeMath.sol";
import "../interfaces/ISwapPair.sol";

library SwapLibrary {
    using SafeMath for uint256;

    // returns sorted token addresses, used to handle return values from pairs sorted in this order
    function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
        require(tokenA != tokenB, "SwapLibrary: IDENTICAL_ADDRESSES");
        (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
        require(token0 != address(0), "SwapLibrary: 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(
            uint256(
                keccak256(
                    abi.encodePacked(
                        hex"ff",
                        factory,
                        keccak256(abi.encodePacked(token0, token1)),
                        hex"772d76e02b5a3aeeef00b07a18a744c893227f52ecb6e3d431da85a229ed6a1d" // init code hash
                    )
                )
            )
        );
    }

    // fetches and sorts the reserves for a pair
    function getReserves(
        address factory,
        address tokenA,
        address tokenB
    ) internal view returns (uint256 reserveA, uint256 reserveB) {
        (address token0, ) = sortTokens(tokenA, tokenB);
        (uint256 reserve0, uint256 reserve1, ) = ISwapPair(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(
        uint256 amountA,
        uint256 reserveA,
        uint256 reserveB
    ) internal pure returns (uint256 amountB) {
        require(amountA > 0, "SwapLibrary: INSUFFICIENT_AMOUNT");
        require(reserveA > 0 && reserveB > 0, "SwapLibrary: 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(
        uint256 amountIn,
        uint256 reserveIn,
        uint256 reserveOut
    ) internal pure returns (uint256 amountOut) {
        require(amountIn > 0, "SwapLibrary: INSUFFICIENT_INPUT_AMOUNT");
        require(reserveIn > 0 && reserveOut > 0, "SwapLibrary: INSUFFICIENT_LIQUIDITY");
        uint256 amountInWithFee = amountIn.mul(997);
        uint256 numerator = amountInWithFee.mul(reserveOut);
        uint256 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(
        uint256 amountOut,
        uint256 reserveIn,
        uint256 reserveOut
    ) internal pure returns (uint256 amountIn) {
        require(amountOut > 0, "SwapLibrary: INSUFFICIENT_OUTPUT_AMOUNT");
        require(reserveIn > 0 && reserveOut > 0, "SwapLibrary: INSUFFICIENT_LIQUIDITY");
        uint256 numerator = reserveIn.mul(amountOut).mul(1000);
        uint256 denominator = reserveOut.sub(amountOut).mul(997);
        amountIn = (numerator / denominator).add(1);
    }

    // performs chained getAmountOut calculations on any number of pairs
    function getAmountsOut(
        address factory,
        uint256 amountIn,
        address[] memory path
    ) internal view returns (uint256[] memory amounts) {
        require(path.length >= 2, "SwapLibrary: INVALID_PATH");
        amounts = new uint256[](path.length);
        amounts[0] = amountIn;
        for (uint256 i; i < path.length - 1; i++) {
            (uint256 reserveIn, uint256 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,
        uint256 amountOut,
        address[] memory path
    ) internal view returns (uint256[] memory amounts) {
        require(path.length >= 2, "SwapLibrary: INVALID_PATH");
        amounts = new uint256[](path.length);
        amounts[amounts.length - 1] = amountOut;
        for (uint256 i = path.length - 1; i > 0; i--) {
            (uint256 reserveIn, uint256 reserveOut) = getReserves(factory, path[i - 1], path[i]);
            amounts[i - 1] = getAmountIn(amounts[i], reserveIn, reserveOut);
        }
    }
}

File 4 of 13 : IWOKT.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.5.0;

interface IWOKT {
    function totalSupply() external view returns (uint256);

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

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

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

    function deposit() external payable;

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

    function withdraw(uint256) external;
}

File 5 of 13 : ISwapRouter02.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2;
pragma experimental ABIEncoderV2;

import './ISwapRouter01.sol';

interface ISwapRouter02 is ISwapRouter01 {
    function tradingPool() external pure returns (address);

    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountETH);

    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;

    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable;

    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;

    function externalSwap(
        address fromToken,
        address toToken,
        address approveTarget,
        address swapTarget,
        uint256 fromTokenAmount,
        uint256 minReturnAmount,
        bytes memory callDataConcat,
        uint256 deadLine
    )
    external
    payable
    returns (uint256 returnAmount);

    function mixSwap(
        address fromToken,
        address toToken,
        uint256 fromTokenAmount,
        uint256 minReturnAmount,
        address[] memory mixAdapters,
        address[] memory mixPairs,
        address[] memory assetTo,
        uint256 directions,
        uint256 deadLine
    ) external payable returns (uint256 returnAmount);

    function polySwap(
        address fromToken,
        address toToken,
        uint256 fromTokenAmount,
        uint256 minReturnAmount,
        uint[] memory weights,
        address[] memory adapters,
        address[] memory pools,
        uint256 directions,
        uint256 deadLine
    ) external payable returns (uint256 returnAmount);
}

File 6 of 13 : ISwapRouter01.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2;

interface ISwapRouter01 {
    function factory() external pure returns (address);

    function WOKT() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint256 amountADesired,
        uint256 amountBDesired,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    )
        external
        returns (
            uint256 amountA,
            uint256 amountB,
            uint256 liquidity
        );

    function addLiquidityETH(
        address token,
        uint256 amountTokenDesired,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    )
        external
        payable
        returns (
            uint256 amountToken,
            uint256 amountETH,
            uint256 liquidity
        );

    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountA, uint256 amountB);

    function removeLiquidityETH(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountToken, uint256 amountETH);

    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountA, uint256 amountB);

    function removeLiquidityETHWithPermit(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountToken, uint256 amountETH);

    function swapExactTokensForTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapTokensForExactTokens(
        uint256 amountOut,
        uint256 amountInMax,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapExactETHForTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable returns (uint256[] memory amounts);

    function swapTokensForExactETH(
        uint256 amountOut,
        uint256 amountInMax,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapExactTokensForETH(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapETHForExactTokens(
        uint256 amountOut,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable returns (uint256[] memory amounts);

    function quote(
        uint256 amountA,
        uint256 reserveA,
        uint256 reserveB
    ) external pure returns (uint256 amountB);

    function getAmountOut(
        uint256 amountIn,
        uint256 reserveIn,
        uint256 reserveOut
    ) external pure returns (uint256 amountOut);

    function getAmountIn(
        uint256 amountOut,
        uint256 reserveIn,
        uint256 reserveOut
    ) external pure returns (uint256 amountIn);

    function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns (uint256[] memory amounts);

    function getAmountsIn(uint256 amountOut, address[] calldata path) external view returns (uint256[] memory amounts);
}

File 7 of 13 : ISwapPair.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.5.0;

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

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

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

    function decimals() external pure returns (uint8);

    function totalSupply() external view returns (uint256);

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

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

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

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

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

    function DOMAIN_SEPARATOR() external view returns (bytes32);

    function PERMIT_TYPEHASH() external pure returns (bytes32);

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

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

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

    function MINIMUM_LIQUIDITY() external pure returns (uint256);

    function factory() external view returns (address);

    function token0() external view returns (address);

    function token1() external view returns (address);

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

    function price0CumulativeLast() external view returns (uint256);

    function price1CumulativeLast() external view returns (uint256);

    function kLast() external view returns (uint256);

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

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

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

    function skim(address to) external;

    function sync() external;

    function price(address token, uint256 baseDecimal) external view returns (uint256);

    function initialize(address, address) external;
}

File 8 of 13 : ISwapFactory.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.5.0;

interface ISwapFactory {
    event PairCreated(address indexed token0, address indexed token1, address pair, uint256);

    function feeTo() external view returns (address);

    function feeToSetter() external view returns (address);

    function feeToRate() external view returns (uint256);

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

    function allPairs(uint256) external view returns (address pair);

    function allPairsLength() external view returns (uint256);

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

    function setFeeTo(address) external;

    function setFeeToSetter(address) external;

    function setFeeToRate(uint256) external;
}

File 9 of 13 : ISwapAdapter.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.5.0;

interface ISwapAdapter {

    function sellBase(address to, address pool, bytes memory data) external;

    function sellQuote(address to, address pool, bytes memory data) external;
}

File 10 of 13 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 11 of 13 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 12 of 13 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

File 13 of 13 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

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

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

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

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "istanbul",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_WOKT","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"fromToken","type":"address"},{"indexed":false,"internalType":"address","name":"toToken","type":"address"},{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"fromAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"returnAmount","type":"uint256"}],"name":"ExSwap","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"WOKT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"amountADesired","type":"uint256"},{"internalType":"uint256","name":"amountBDesired","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"addLiquidity","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"},{"internalType":"uint256","name":"liquidity","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountTokenDesired","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"addLiquidityETH","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountETH","type":"uint256"},{"internalType":"uint256","name":"liquidity","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddr","type":"address"}],"name":"addWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"fromToken","type":"address"},{"internalType":"address","name":"toToken","type":"address"},{"internalType":"address","name":"approveTarget","type":"address"},{"internalType":"address","name":"swapTarget","type":"address"},{"internalType":"uint256","name":"fromTokenAmount","type":"uint256"},{"internalType":"uint256","name":"minReturnAmount","type":"uint256"},{"internalType":"bytes","name":"callDataConcat","type":"bytes"},{"internalType":"uint256","name":"deadLine","type":"uint256"}],"name":"externalSwap","outputs":[{"internalType":"uint256","name":"returnAmount","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"reserveIn","type":"uint256"},{"internalType":"uint256","name":"reserveOut","type":"uint256"}],"name":"getAmountIn","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"reserveIn","type":"uint256"},{"internalType":"uint256","name":"reserveOut","type":"uint256"}],"name":"getAmountOut","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"getAmountsIn","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"getAmountsOut","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isWhiteListed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"fromToken","type":"address"},{"internalType":"address","name":"toToken","type":"address"},{"internalType":"uint256","name":"fromTokenAmount","type":"uint256"},{"internalType":"uint256","name":"minReturnAmount","type":"uint256"},{"internalType":"address[]","name":"mixAdapters","type":"address[]"},{"internalType":"address[]","name":"mixPairs","type":"address[]"},{"internalType":"address[]","name":"assetTo","type":"address[]"},{"internalType":"uint256","name":"directions","type":"uint256"},{"internalType":"uint256","name":"deadLine","type":"uint256"}],"name":"mixSwap","outputs":[{"internalType":"uint256","name":"returnAmount","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"}],"name":"pairFor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"fromToken","type":"address"},{"internalType":"address","name":"toToken","type":"address"},{"internalType":"uint256","name":"fromTokenAmount","type":"uint256"},{"internalType":"uint256","name":"minReturnAmount","type":"uint256"},{"internalType":"uint256[]","name":"weights","type":"uint256[]"},{"internalType":"address[]","name":"adapters","type":"address[]"},{"internalType":"address[]","name":"pools","type":"address[]"},{"internalType":"uint256","name":"directions","type":"uint256"},{"internalType":"uint256","name":"deadLine","type":"uint256"}],"name":"polySwap","outputs":[{"internalType":"uint256","name":"returnAmount","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"reserveA","type":"uint256"},{"internalType":"uint256","name":"reserveB","type":"uint256"}],"name":"quote","outputs":[{"internalType":"uint256","name":"amountB","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"removeLiquidity","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"removeLiquidityETH","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"removeLiquidityETHSupportingFeeOnTransferTokens","outputs":[{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bool","name":"approveMax","type":"bool"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"removeLiquidityETHWithPermit","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bool","name":"approveMax","type":"bool"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"removeLiquidityETHWithPermitSupportingFeeOnTransferTokens","outputs":[{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bool","name":"approveMax","type":"bool"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"removeLiquidityWithPermit","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddr","type":"address"}],"name":"removeWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tradingPool","type":"address"}],"name":"setTradingPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapETHForExactTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactETHForTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactETHForTokensSupportingFeeOnTransferTokens","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForETH","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForETHSupportingFeeOnTransferTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForTokensSupportingFeeOnTransferTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"amountInMax","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapTokensForExactETH","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"amountInMax","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapTokensForExactTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tradingPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60c06040523480156200001157600080fd5b5060405162005cb838038062005cb88339810160408190526200003491620000ad565b600062000040620000a9565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001600160601b0319606092831b8116608052911b1660a05262000104565b3390565b60008060408385031215620000c0578182fd5b8251620000cd81620000eb565b6020840151909250620000e081620000eb565b809150509250929050565b6001600160a01b03811681146200010157600080fd5b50565b60805160601c60a05160601c615a63620002556000398061022352806106cc528061071c52806107db52806109cb5280610f075280611030528061147b528061154e528061160c528061193e52806119dd5280611b225280611c2b5280611cb35280611f1a5280611fe7528061207b52806120f2528061216652806127da528061287952806129ee5280612d145280612d6a5280612d9e5280612e245280612f7d5280613083528061310b52806132705280613fa2528061402a52508061084b52806109085280610a915280610b2a5280610c215280610f77528061100e528061113f5280611b975280611ce55280611e195280611ebe5280612198528061239c5280612556528061299c52806129cc5280612b585280612d485280612ff2528061313d528061387252806138b55280613cd75280613edc52806142ee52806143a352806144365250615a636000f3fe6080604052600436106102135760003560e01c806385f8c25911610118578063c621e0c3116100a0578063e8e337001161006f578063e8e337001461060f578063f2fde38b1461063e578063f305d7191461065e578063fb3bdb4114610671578063fcda5888146106845761024c565b8063c621e0c31461059c578063d06ca61f146105af578063ded9382a146105cf578063e7cd4a04146105ef5761024c565b8063ad615dec116100e7578063ad615dec14610514578063af2979eb14610534578063b6f9de9514610554578063baa2abde14610567578063c45a0155146105875761024c565b806385f8c2591461049f5780638803dbee146104bf5780638da5cb5b146104df57806396ed28f9146104f45761024c565b80635b0d59841161019b578063715018a61161016a578063715018a61461042257806371f16a1814610437578063791ac947146104595780637dc3b5c6146104795780637ff36ab51461048c5761024c565b80635b0d5984146103955780635c11d795146103b55780636f9170f6146103d557806370cda01a146104025761024c565b80632042e5c2116101e25780632042e5c2146103025780632195995c1461032257806338ed17391461034257806338f4c188146103625780634a25d94a146103755761024c565b806302751cec14610251578063054d50d41461028857806318cbafe5146102b55780631f00ca74146102e25761024c565b3661024c57336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461024a57fe5b005b600080fd5b34801561025d57600080fd5b5061027161026c366004614c90565b610699565b60405161027f92919061590b565b60405180910390f35b34801561029457600080fd5b506102a86102a3366004614f49565b610799565b60405161027f9190615902565b3480156102c157600080fd5b506102d56102d0366004614ed8565b6107ae565b60405161027f9190615140565b3480156102ee57600080fd5b506102d56102fd366004614e70565b610a8a565b34801561030e57600080fd5b5061024a61031d366004614825565b610ac0565b34801561032e57600080fd5b5061027161033d366004614b6b565b610b20565b34801561034e57600080fd5b506102d561035d366004614ed8565b610bf9565b6102a8610370366004614895565b610d02565b34801561038157600080fd5b506102d5610390366004614ed8565b610eda565b3480156103a157600080fd5b506102a86103b0366004614ced565b611006565b3480156103c157600080fd5b5061024a6103d0366004614ed8565b6110f3565b3480156103e157600080fd5b506103f56103f0366004614825565b611342565b60405161027f9190615184565b34801561040e57600080fd5b5061024a61041d366004614825565b611357565b34801561042e57600080fd5b5061024a6113b8565b34801561044357600080fd5b5061044c611441565b60405161027f919061500d565b34801561046557600080fd5b5061024a610474366004614ed8565b611450565b6102a8610487366004614a57565b61167d565b6102d561049a366004614e0b565b611afd565b3480156104ab57600080fd5b506102a86104ba366004614f49565b611de4565b3480156104cb57600080fd5b506102d56104da366004614ed8565b611df1565b3480156104eb57600080fd5b5061044c611ea8565b34801561050057600080fd5b5061044c61050f36600461485d565b611eb7565b34801561052057600080fd5b506102a861052f366004614f49565b611ee4565b34801561054057600080fd5b506102a861054f366004614c90565b611ef1565b61024a610562366004614e0b565b612058565b34801561057357600080fd5b50610271610582366004614afa565b612371565b34801561059357600080fd5b5061044c612554565b6102a86105aa366004614988565b612578565b3480156105bb57600080fd5b506102d56105ca366004614e70565b612995565b3480156105db57600080fd5b506102716105ea366004614ced565b6129c2565b3480156105fb57600080fd5b5061024a61060a366004614825565b612ab5565b34801561061b57600080fd5b5061062f61062a366004614c15565b612b18565b60405161027f93929190615969565b34801561064a57600080fd5b5061024a610659366004614825565b612c28565b61062f61066c366004614c90565b612ce8565b6102d561067f366004614e0b565b612f58565b34801561069057600080fd5b5061044c61326e565b60008082428110156106c65760405162461bcd60e51b81526004016106bd90615722565b60405180910390fd5b6106f5897f00000000000000000000000000000000000000000000000000000000000000008a8a8a308a612371565b9093509150610705898685613292565b604051632e1a7d4d60e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690632e1a7d4d90610751908590600401615902565b600060405180830381600087803b15801561076b57600080fd5b505af115801561077f573d6000803e3d6000fd5b5050505061078d8583613380565b50965096945050505050565b60006107a6848484613412565b949350505050565b606081428110156107d15760405162461bcd60e51b81526004016106bd90615722565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168686600019810181811061080b57fe5b90506020020160208101906108209190614825565b6001600160a01b0316146108465760405162461bcd60e51b81526004016106bd906157c8565b6108a47f0000000000000000000000000000000000000000000000000000000000000000898888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506134ac92505050565b915086826001845103815181106108b757fe5b602002602001015110156108dd5760405162461bcd60e51b81526004016106bd90615610565b61098a868660008181106108ed57fe5b90506020020160208101906109029190614825565b336109707f00000000000000000000000000000000000000000000000000000000000000008a8a600081811061093457fe5b90506020020160208101906109499190614825565b8b8b600181811061095657fe5b905060200201602081019061096b9190614825565b6135c3565b8560008151811061097d57fe5b6020026020010151613633565b6109c982878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250309250613724915050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632e1a7d4d83600185510381518110610a0857fe5b60200260200101516040518263ffffffff1660e01b8152600401610a2c9190615902565b600060405180830381600087803b158015610a4657600080fd5b505af1158015610a5a573d6000803e3d6000fd5b50505050610a7f8483600185510381518110610a7257fe5b6020026020010151613380565b509695505050505050565b6060610ab77f00000000000000000000000000000000000000000000000000000000000000008484613983565b90505b92915050565b610ac8613a86565b6001600160a01b0316610ad9611ea8565b6001600160a01b031614610aff5760405162461bcd60e51b81526004016106bd9061551d565b6001600160a01b03166000908152600260205260409020805460ff19169055565b6000806000610b507f00000000000000000000000000000000000000000000000000000000000000008f8f6135c3565b9050600087610b5f578c610b63565b6000195b60405163d505accf60e01b81529091506001600160a01b0383169063d505accf90610b9e903390309086908f908e908e908e90600401615021565b600060405180830381600087803b158015610bb857600080fd5b505af1158015610bcc573d6000803e3d6000fd5b50505050610bdf8f8f8f8f8f8f8f612371565b809450819550505050509b509b9950505050505050505050565b60608142811015610c1c5760405162461bcd60e51b81526004016106bd90615722565b610c7a7f0000000000000000000000000000000000000000000000000000000000000000898888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506134ac92505050565b91508682600184510381518110610c8d57fe5b60200260200101511015610cb35760405162461bcd60e51b81526004016106bd90615610565b610cc3868660008181106108ed57fe5b610a7f82878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250613724915050565b60008142811015610d255760405162461bcd60e51b81526004016106bd90615722565b60008511610d455760405162461bcd60e51b81526004016106bd906155d9565b6000610d518a33613a8a565b9050610d5c8b613b2e565b610d7757610d6c8b33308a613633565b610d778b8a89613b53565b6001600160a01b03881660009081526002602052604090205460ff16610daf5760405162461bcd60e51b81526004016106bd9061569d565b6000886001600160a01b0316610dc48d613b2e565b610dcf576000610dd1565b345b87604051610ddf9190614f9b565b60006040518083038185875af1925050503d8060008114610e1c576040519150601f19603f3d011682016040523d82523d6000602084013e610e21565b606091505b5050905080610e425760405162461bcd60e51b81526004016106bd906153d8565b610e568b33610e518e30613a8a565b613bfd565b610e6a82610e648d33613a8a565b90613c58565b935086841015610e8c5760405162461bcd60e51b81526004016106bd90615884565b7fa6db55cf507cc79bb5dc65a3eef34c88e86b85796bcdcad78d4c1668ce7adda88c8c338b88604051610ec39594939291906150ca565b60405180910390a150505098975050505050505050565b60608142811015610efd5760405162461bcd60e51b81526004016106bd90615722565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001686866000198101818110610f3757fe5b9050602002016020810190610f4c9190614825565b6001600160a01b031614610f725760405162461bcd60e51b81526004016106bd906157c8565b610fd07f00000000000000000000000000000000000000000000000000000000000000008988888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061398392505050565b91508682600081518110610fe057fe5b602002602001015111156108dd5760405162461bcd60e51b81526004016106bd90615786565b6000806110547f00000000000000000000000000000000000000000000000000000000000000008d7f00000000000000000000000000000000000000000000000000000000000000006135c3565b9050600086611063578b611067565b6000195b60405163d505accf60e01b81529091506001600160a01b0383169063d505accf906110a2903390309086908e908d908d908d90600401615021565b600060405180830381600087803b1580156110bc57600080fd5b505af11580156110d0573d6000803e3d6000fd5b505050506110e28d8d8d8d8d8d611ef1565b9d9c50505050505050505050505050565b80428110156111145760405162461bcd60e51b81526004016106bd90615722565b6111938585600081811061112457fe5b90506020020160208101906111399190614825565b3361118d7f00000000000000000000000000000000000000000000000000000000000000008989600081811061116b57fe5b90506020020160208101906111809190614825565b8a8a600181811061095657fe5b8a613633565b6000858560001981018181106111a557fe5b90506020020160208101906111ba9190614825565b6001600160a01b03166370a08231856040518263ffffffff1660e01b81526004016111e5919061500d565b60206040518083038186803b1580156111fd57600080fd5b505afa158015611211573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112359190614df3565b9050611275868680806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250889250613c80915050565b8661131a828888600019810181811061128a57fe5b905060200201602081019061129f9190614825565b6001600160a01b03166370a08231886040518263ffffffff1660e01b81526004016112ca919061500d565b60206040518083038186803b1580156112e257600080fd5b505afa1580156112f6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e649190614df3565b10156113385760405162461bcd60e51b81526004016106bd90615610565b5050505050505050565b60026020526000908152604090205460ff1681565b61135f613a86565b6001600160a01b0316611370611ea8565b6001600160a01b0316146113965760405162461bcd60e51b81526004016106bd9061551d565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6113c0613a86565b6001600160a01b03166113d1611ea8565b6001600160a01b0316146113f75760405162461bcd60e51b81526004016106bd9061551d565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6001546001600160a01b031681565b80428110156114715760405162461bcd60e51b81526004016106bd90615722565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016858560001981018181106114ab57fe5b90506020020160208101906114c09190614825565b6001600160a01b0316146114e65760405162461bcd60e51b81526004016106bd906157c8565b6114f68585600081811061112457fe5b611534858580806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250309250613c80915050565b6040516370a0823160e01b81526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a082319061158390309060040161500d565b60206040518083038186803b15801561159b57600080fd5b505afa1580156115af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d39190614df3565b9050868110156115f55760405162461bcd60e51b81526004016106bd90615610565b604051632e1a7d4d60e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690632e1a7d4d90611641908490600401615902565b600060405180830381600087803b15801561165b57600080fd5b505af115801561166f573d6000803e3d6000fd5b505050506113388482613380565b600081428110156116a05760405162461bcd60e51b81526004016106bd90615722565b85518551146116c15760405162461bcd60e51b81526004016106bd90615457565b600088116116e15760405162461bcd60e51b81526004016106bd906155d9565b8860006116ee8c33613a8a565b90508c6117063330838661170182613b2e565b613f94565b3361171082613b2e565b156117185750305b8d8a8c8b60005b835181101561191857600061175b606461175586858151811061173e57fe5b60200260200101518d61406190919063ffffffff16565b9061409b565b9050876001600160a01b031663a9059cbb84848151811061177857fe5b6020026020010151836040518363ffffffff1660e01b815260040161179e929190615127565b602060405180830381600087803b1580156117b857600080fd5b505af11580156117cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117f09190614d83565b5060018e166118845784828151811061180557fe5b60200260200101516001600160a01b03166330e6ae318885858151811061182857fe5b60200260200101516040518363ffffffff1660e01b815260040161184d9291906150fe565b600060405180830381600087803b15801561186757600080fd5b505af115801561187b573d6000803e3d6000fd5b5050505061190b565b84828151811061189057fe5b60200260200101516001600160a01b0316636f7929f2888585815181106118b357fe5b60200260200101516040518363ffffffff1660e01b81526004016118d89291906150fe565b600060405180830381600087803b1580156118f257600080fd5b505af1158015611906573d6000803e3d6000fd5b505050505b5060019c8d1c9c0161171f565b5061192284613b2e565b15611a77576040516370a0823160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a082319061197390309060040161500d565b60206040518083038186803b15801561198b57600080fd5b505afa15801561199f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119c39190614df3565b604051632e1a7d4d60e01b8152909a506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690632e1a7d4d90611a12908d90600401615902565b600060405180830381600087803b158015611a2c57600080fd5b505af1158015611a40573d6000803e3d6000fd5b50506040513392508c156108fc0291508c906000818181858888f19350505050158015611a71573d6000803e3d6000fd5b50611a88565b611a8587610e6486336140cd565b99505b8f8a1015611aa85760405162461bcd60e51b81526004016106bd90615884565b7fa6db55cf507cc79bb5dc65a3eef34c88e86b85796bcdcad78d4c1668ce7adda88685338b8e604051611adf9594939291906150ca565b60405180910390a15050505050505050509998505050505050505050565b60608142811015611b205760405162461bcd60e51b81526004016106bd90615722565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031686866000818110611b5757fe5b9050602002016020810190611b6c9190614825565b6001600160a01b031614611b925760405162461bcd60e51b81526004016106bd906157c8565b611bf07f0000000000000000000000000000000000000000000000000000000000000000348888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506134ac92505050565b91508682600184510381518110611c0357fe5b60200260200101511015611c295760405162461bcd60e51b81526004016106bd90615610565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db083600081518110611c6557fe5b60200260200101516040518263ffffffff1660e01b81526004016000604051808303818588803b158015611c9857600080fd5b505af1158015611cac573d6000803e3d6000fd5b50505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb611d117f00000000000000000000000000000000000000000000000000000000000000008989600081811061116b57fe5b84600081518110611d1e57fe5b60200260200101516040518363ffffffff1660e01b8152600401611d43929190615127565b602060405180830381600087803b158015611d5d57600080fd5b505af1158015611d71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d959190614d83565b611d9b57fe5b611dda82878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250613724915050565b5095945050505050565b60006107a684848461414c565b60608142811015611e145760405162461bcd60e51b81526004016106bd90615722565b611e727f00000000000000000000000000000000000000000000000000000000000000008988888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061398392505050565b91508682600081518110611e8257fe5b60200260200101511115610cb35760405162461bcd60e51b81526004016106bd90615786565b6000546001600160a01b031690565b6000610ab77f000000000000000000000000000000000000000000000000000000000000000084846135c3565b60006107a68484846141e6565b60008142811015611f145760405162461bcd60e51b81526004016106bd90615722565b611f43887f00000000000000000000000000000000000000000000000000000000000000008989893089612371565b6040516370a0823160e01b8152909350611fd09150899086906001600160a01b038316906370a0823190611f7b90309060040161500d565b60206040518083038186803b158015611f9357600080fd5b505afa158015611fa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fcb9190614df3565b613292565b604051632e1a7d4d60e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690632e1a7d4d9061201c908590600401615902565b600060405180830381600087803b15801561203657600080fd5b505af115801561204a573d6000803e3d6000fd5b50505050610a7f8483613380565b80428110156120795760405162461bcd60e51b81526004016106bd90615722565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316858560008181106120b057fe5b90506020020160208101906120c59190614825565b6001600160a01b0316146120eb5760405162461bcd60e51b81526004016106bd906157c8565b60003490507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561214b57600080fd5b505af115801561215f573d6000803e3d6000fd5b50505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb6121c47f00000000000000000000000000000000000000000000000000000000000000008989600081811061116b57fe5b836040518363ffffffff1660e01b81526004016121e2929190615127565b602060405180830381600087803b1580156121fc57600080fd5b505af1158015612210573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122349190614d83565b61223a57fe5b60008686600019810181811061224c57fe5b90506020020160208101906122619190614825565b6001600160a01b03166370a08231866040518263ffffffff1660e01b815260040161228c919061500d565b60206040518083038186803b1580156122a457600080fd5b505afa1580156122b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122dc9190614df3565b905061231c878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250613c80915050565b8761131a828989600019810181811061233157fe5b90506020020160208101906123469190614825565b6001600160a01b03166370a08231896040518263ffffffff1660e01b81526004016112ca919061500d565b60008082428110156123955760405162461bcd60e51b81526004016106bd90615722565b60006123c27f00000000000000000000000000000000000000000000000000000000000000008c8c6135c3565b6040516323b872dd60e01b81529091506001600160a01b038216906323b872dd906123f590339085908e9060040161508c565b602060405180830381600087803b15801561240f57600080fd5b505af1158015612423573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124479190614d83565b50600080826001600160a01b03166389afcb44896040518263ffffffff1660e01b8152600401612477919061500d565b6040805180830381600087803b15801561249057600080fd5b505af11580156124a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124c89190614eb5565b9150915060006124d88e8e61424e565b509050806001600160a01b03168e6001600160a01b0316146124fb5781836124fe565b82825b90975095508a8710156125235760405162461bcd60e51b81526004016106bd90615843565b898610156125435760405162461bcd60e51b81526004016106bd90615598565b505050505097509795505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000814281101561259b5760405162461bcd60e51b81526004016106bd90615722565b60008651116125bc5760405162461bcd60e51b81526004016106bd906151c6565b86518651146125dd5760405162461bcd60e51b81526004016106bd90615328565b60018551038651146126015760405162461bcd60e51b81526004016106bd906152e6565b600088116126215760405162461bcd60e51b81526004016106bd906155d9565b8a8a8a60006126308333613a8a565b9050612656338a60008151811061264357fe5b6020026020010151868561170189613b2e565b60005b8a518110156127b4576001891661270b578b818151811061267657fe5b60200260200101516001600160a01b03166330e6ae318b836001018151811061269b57fe5b60200260200101518d84815181106126af57fe5b60200260200101516040518363ffffffff1660e01b81526004016126d49291906150fe565b600060405180830381600087803b1580156126ee57600080fd5b505af1158015612702573d6000803e3d6000fd5b505050506127a8565b8b818151811061271757fe5b60200260200101516001600160a01b0316636f7929f28b836001018151811061273c57fe5b60200260200101518d848151811061275057fe5b60200260200101516040518363ffffffff1660e01b81526004016127759291906150fe565b600060405180830381600087803b15801561278f57600080fd5b505af11580156127a3573d6000803e3d6000fd5b505050505b600198891c9801612659565b506127be83613b2e565b15612913576040516370a0823160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a082319061280f90309060040161500d565b60206040518083038186803b15801561282757600080fd5b505afa15801561283b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061285f9190614df3565b604051632e1a7d4d60e01b81529096506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690632e1a7d4d906128ae908990600401615902565b600060405180830381600087803b1580156128c857600080fd5b505af11580156128dc573d6000803e3d6000fd5b505060405133925088156108fc02915088906000818181858888f1935050505015801561290d573d6000803e3d6000fd5b50612924565b61292181610e6485336140cd565b95505b8b8610156129445760405162461bcd60e51b81526004016106bd90615884565b7fa6db55cf507cc79bb5dc65a3eef34c88e86b85796bcdcad78d4c1668ce7adda88f8f33858a60405161297b9594939291906150ca565b60405180910390a150505050509998505050505050505050565b6060610ab77f000000000000000000000000000000000000000000000000000000000000000084846134ac565b6000806000612a127f00000000000000000000000000000000000000000000000000000000000000008e7f00000000000000000000000000000000000000000000000000000000000000006135c3565b9050600087612a21578c612a25565b6000195b60405163d505accf60e01b81529091506001600160a01b0383169063d505accf90612a60903390309086908f908e908e908e90600401615021565b600060405180830381600087803b158015612a7a57600080fd5b505af1158015612a8e573d6000803e3d6000fd5b50505050612aa08e8e8e8e8e8e610699565b909f909e509c50505050505050505050505050565b612abd613a86565b6001600160a01b0316612ace611ea8565b6001600160a01b031614612af45760405162461bcd60e51b81526004016106bd9061551d565b6001600160a01b03166000908152600260205260409020805460ff19166001179055565b60008060008342811015612b3e5760405162461bcd60e51b81526004016106bd90615722565b612b4c8c8c8c8c8c8c6142d8565b90945092506000612b7e7f00000000000000000000000000000000000000000000000000000000000000008e8e6135c3565b9050612b8c8d338388613633565b612b988c338387613633565b6040516335313c2160e11b81526001600160a01b03821690636a62784290612bc4908a9060040161500d565b602060405180830381600087803b158015612bde57600080fd5b505af1158015612bf2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c169190614df3565b92505050985098509895505050505050565b612c30613a86565b6001600160a01b0316612c41611ea8565b6001600160a01b031614612c675760405162461bcd60e51b81526004016106bd9061551d565b6001600160a01b038116612c8d5760405162461bcd60e51b81526004016106bd906151fd565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008342811015612d0e5760405162461bcd60e51b81526004016106bd90615722565b612d3c8a7f00000000000000000000000000000000000000000000000000000000000000008b348c8c6142d8565b90945092506000612d8e7f00000000000000000000000000000000000000000000000000000000000000008c7f00000000000000000000000000000000000000000000000000000000000000006135c3565b9050612d9c8b338388613633565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b158015612df757600080fd5b505af1158015612e0b573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016935063a9059cbb9250612e5e915084908890600401615127565b602060405180830381600087803b158015612e7857600080fd5b505af1158015612e8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612eb09190614d83565b612eb657fe5b6040516335313c2160e11b81526001600160a01b03821690636a62784290612ee2908a9060040161500d565b602060405180830381600087803b158015612efc57600080fd5b505af1158015612f10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f349190614df3565b925083341115612f4a57612f4a33853403613380565b505096509650969350505050565b60608142811015612f7b5760405162461bcd60e51b81526004016106bd90615722565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031686866000818110612fb257fe5b9050602002016020810190612fc79190614825565b6001600160a01b031614612fed5760405162461bcd60e51b81526004016106bd906157c8565b61304b7f00000000000000000000000000000000000000000000000000000000000000008888888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061398392505050565b9150348260008151811061305b57fe5b602002602001015111156130815760405162461bcd60e51b81526004016106bd90615786565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0836000815181106130bd57fe5b60200260200101516040518263ffffffff1660e01b81526004016000604051808303818588803b1580156130f057600080fd5b505af1158015613104573d6000803e3d6000fd5b50505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb6131697f00000000000000000000000000000000000000000000000000000000000000008989600081811061116b57fe5b8460008151811061317657fe5b60200260200101516040518363ffffffff1660e01b815260040161319b929190615127565b602060405180830381600087803b1580156131b557600080fd5b505af11580156131c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131ed9190614d83565b6131f357fe5b61323282878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250613724915050565b8160008151811061323f57fe5b6020026020010151341115611dda57611dda338360008151811061325f57fe5b60200260200101513403613380565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006060846001600160a01b031663a9059cbb85856040516024016132b8929190615127565b6040516020818303038152906040529060e01b6020820180516001600160e01b0383818316178352505050506040516132f19190614f9b565b6000604051808303816000865af19150503d806000811461332e576040519150601f19603f3d011682016040523d82523d6000602084013e613333565b606091505b509150915081801561335d57508051158061335d57508080602001905181019061335d9190614d83565b6133795760405162461bcd60e51b81526004016106bd9061518f565b5050505050565b604080516000808252602082019092526001600160a01b0384169083906040516133aa9190614f9b565b60006040518083038185875af1925050503d80600081146133e7576040519150601f19603f3d011682016040523d82523d6000602084013e6133ec565b606091505b505090508061340d5760405162461bcd60e51b81526004016106bd906156df565b505050565b60008084116134335760405162461bcd60e51b81526004016106bd90615552565b6000831180156134435750600082115b61345f5760405162461bcd60e51b81526004016106bd90615499565b600061346d856103e5614061565b9050600061347b8285614061565b905060006134958361348f886103e8614061565b9061450d565b90508082816134a057fe5b04979650505050505050565b60606002825110156134d05760405162461bcd60e51b81526004016106bd9061574f565b815167ffffffffffffffff811180156134e857600080fd5b50604051908082528060200260200182016040528015613512578160200160208202803683370190505b509050828160008151811061352357fe5b60200260200101818152505060005b60018351038110156135bb576000806135758786858151811061355157fe5b602002602001015187866001018151811061356857fe5b6020026020010151614532565b9150915061359784848151811061358857fe5b60200260200101518383613412565b8484600101815181106135a657fe5b60209081029190910101525050600101613532565b509392505050565b60008060006135d2858561424e565b915091508582826040516020016135ea929190614f74565b60405160208183030381529060405280519060200120604051602001613611929190614fb7565b60408051601f1981840301815291905280516020909101209695505050505050565b60006060856001600160a01b03166323b872dd86868660405160240161365b9392919061508c565b6040516020818303038152906040529060e01b6020820180516001600160e01b0383818316178352505050506040516136949190614f9b565b6000604051808303816000865af19150503d80600081146136d1576040519150601f19603f3d011682016040523d82523d6000602084013e6136d6565b606091505b50915091508180156137005750805115806137005750808060200190518101906137009190614d83565b61371c5760405162461bcd60e51b81526004016106bd906157ff565b505050505050565b60005b600183510381101561397d5760008084838151811061374257fe5b602002602001015185846001018151811061375957fe5b6020026020010151915091506000613771838361424e565b509050600087856001018151811061378557fe5b60209081029190910101516001549091506001600160a01b03161561382e5760015460405163152cf14360e31b81526001600160a01b039091169063a9678a18906137da903390889088908790600401615062565b602060405180830381600087803b1580156137f457600080fd5b505af1158015613808573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061382c9190614d83565b505b600080836001600160a01b0316866001600160a01b03161461385257826000613856565b6000835b91509150600060028a5103881061386d57886138ae565b6138ae7f0000000000000000000000000000000000000000000000000000000000000000878c8b600201815181106138a157fe5b60200260200101516135c3565b90506138db7f000000000000000000000000000000000000000000000000000000000000000088886135c3565b6001600160a01b031663022c0d9f84848460006040519080825280601f01601f191660200182016040528015613918576020820181803683370190505b506040518563ffffffff1660e01b81526004016139389493929190615919565b600060405180830381600087803b15801561395257600080fd5b505af1158015613966573d6000803e3d6000fd5b505060019099019850613727975050505050505050565b50505050565b60606002825110156139a75760405162461bcd60e51b81526004016106bd9061574f565b815167ffffffffffffffff811180156139bf57600080fd5b506040519080825280602002602001820160405280156139e9578160200160208202803683370190505b50905082816001835103815181106139fd57fe5b60209081029190910101528151600019015b80156135bb57600080613a3f87866001860381518110613a2b57fe5b602002602001015187868151811061356857fe5b91509150613a61848481518110613a5257fe5b6020026020010151838361414c565b846001850381518110613a7057fe5b6020908102919091010152505060001901613a0f565b3390565b6000613a9583613b2e565b15613aab57506001600160a01b03811631610aba565b6040516370a0823160e01b81526001600160a01b038416906370a0823190613ad790859060040161500d565b60206040518083038186803b158015613aef57600080fd5b505afa158015613b03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b279190614df3565b9050610aba565b6001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14919050565b604051636eb1769f60e11b81526000906001600160a01b0385169063dd62ed3e90613b8490309087906004016150b0565b60206040518083038186803b158015613b9c57600080fd5b505afa158015613bb0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613bd49190614df3565b90508181101561397d578015613bf057613bf08484600061460b565b61397d848460001961460b565b801561340d57613c0c83613b2e565b15613c4d576040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015613c47573d6000803e3d6000fd5b5061340d565b61340d838383613292565b600082821115613c7a5760405162461bcd60e51b81526004016106bd9061536a565b50900390565b60005b600183510381101561340d57600080848381518110613c9e57fe5b6020026020010151858460010181518110613cb557fe5b6020026020010151915091506000613ccd838361424e565b5090506000613cfd7f000000000000000000000000000000000000000000000000000000000000000085856135c3565b9050600080600080846001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015613d3e57600080fd5b505afa158015613d52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d769190614d9f565b506001600160701b031691506001600160701b03169150600080876001600160a01b03168a6001600160a01b031614613db0578284613db3565b83835b91509150613de7828b6001600160a01b03166370a082318a6040518263ffffffff1660e01b81526004016112ca919061500d565b9550613df4868383613412565b6001549095506001600160a01b0316159350613e98925050505760015460405163152cf14360e31b81526001600160a01b039091169063a9678a1890613e449033908a908a908790600401615062565b602060405180830381600087803b158015613e5e57600080fd5b505af1158015613e72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e969190614d83565b505b600080856001600160a01b0316886001600160a01b031614613ebc57826000613ec0565b6000835b91509150600060028c51038a10613ed7578a613f0b565b613f0b7f0000000000000000000000000000000000000000000000000000000000000000898e8d600201815181106138a157fe5b6040805160008152602081019182905263022c0d9f60e01b9091529091506001600160a01b0387169063022c0d9f90613f4d9086908690869060248101615919565b600060405180830381600087803b158015613f6757600080fd5b505af1158015613f7b573d6000803e3d6000fd5b50506001909b019a50613c839950505050505050505050565b8015614055578115614050577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b158015613ffb57600080fd5b505af115801561400f573d6000803e3d6000fd5b505050506001600160a01b03851630149050614050576140507f00000000000000000000000000000000000000000000000000000000000000008584613292565b613379565b61337983868685613633565b60008261407057506000610aba565b8282028284828161407d57fe5b0414610ab75760405162461bcd60e51b81526004016106bd906154dc565b60008082116140bc5760405162461bcd60e51b81526004016106bd906153a1565b8183816140c557fe5b049392505050565b6040516370a0823160e01b81526000906001600160a01b038416906370a08231906140fc90859060040161500d565b60206040518083038186803b15801561411457600080fd5b505afa158015614128573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab79190614df3565b600080841161416d5760405162461bcd60e51b81526004016106bd90615656565b60008311801561417d5750600082115b6141995760405162461bcd60e51b81526004016106bd90615499565b60006141b16103e86141ab8688614061565b90614061565b905060006141c56103e56141ab8689613c58565b90506141dc60018284816141d557fe5b049061450d565b9695505050505050565b60008084116142075760405162461bcd60e51b81526004016106bd90615422565b6000831180156142175750600082115b6142335760405162461bcd60e51b81526004016106bd90615499565b8261423e8584614061565b8161424557fe5b04949350505050565b600080826001600160a01b0316846001600160a01b031614156142835760405162461bcd60e51b81526004016106bd9061527a565b826001600160a01b0316846001600160a01b0316106142a35782846142a6565b83835b90925090506001600160a01b0382166142d15760405162461bcd60e51b81526004016106bd906158cb565b9250929050565b60405163e6a4390560e01b8152600090819081907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e6a439059061432d908c908c906004016150b0565b60206040518083038186803b15801561434557600080fd5b505afa158015614359573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061437d9190614841565b6001600160a01b0316141561442e576040516364e329cb60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c9c65396906143da908b908b906004016150b0565b602060405180830381600087803b1580156143f457600080fd5b505af1158015614408573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061442c9190614841565b505b60008061445c7f00000000000000000000000000000000000000000000000000000000000000008b8b614532565b9150915081600014801561446e575080155b1561447e57879350869250614500565b600061448b8984846141e6565b90508781116144bf57858110156144b45760405162461bcd60e51b81526004016106bd90615598565b8894509250826144fe565b60006144cc8984866141e6565b9050898111156144d857fe5b878110156144f85760405162461bcd60e51b81526004016106bd90615843565b94508793505b505b5050965096945050505050565b600082820183811015610ab75760405162461bcd60e51b81526004016106bd90615243565b6000806000614541858561424e565b5090506000806145528888886135c3565b6001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561458a57600080fd5b505afa15801561459e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145c29190614d9f565b506001600160701b031691506001600160701b03169150826001600160a01b0316876001600160a01b0316146145f95780826145fc565b81815b90999098509650505050505050565b60006060846001600160a01b031663095ea7b38585604051602401614631929190615127565b6040516020818303038152906040529060e01b6020820180516001600160e01b03838183161783525050505060405161466a9190614f9b565b6000604051808303816000865af19150503d80600081146146a7576040519150601f19603f3d011682016040523d82523d6000602084013e6146ac565b606091505b50915091508180156146d65750805115806146d65750808060200190518101906146d69190614d83565b6133795760405162461bcd60e51b81526004016106bd906152af565b8035610aba816159f2565b60008083601f84011261470e578182fd5b50813567ffffffffffffffff811115614725578182fd5b60208301915083602080830285010111156142d157600080fd5b600082601f83011261474f578081fd5b813561476261475d826159a6565b61597f565b81815291506020808301908481018184028601820187101561478357600080fd5b60005b848110156147ab578135614799816159f2565b84529282019290820190600101614786565b505050505092915050565b600082601f8301126147c6578081fd5b81356147d461475d826159a6565b8181529150602080830190848101818402860182018710156147f557600080fd5b60005b848110156147ab578135845292820192908201906001016147f8565b803560ff81168114610aba57600080fd5b600060208284031215614836578081fd5b8135610ab7816159f2565b600060208284031215614852578081fd5b8151610ab7816159f2565b6000806040838503121561486f578081fd5b823561487a816159f2565b9150602083013561488a816159f2565b809150509250929050565b600080600080600080600080610100898b0312156148b1578384fd5b88356148bc816159f2565b97506020898101356148cd816159f2565b975060408a01356148dd816159f2565b965060608a01356148ed816159f2565b955060808a0135945060a08a0135935060c08a013567ffffffffffffffff80821115614917578485fd5b818c0191508c601f83011261492a578485fd5b813581811115614938578586fd5b61494a601f8201601f1916850161597f565b91508082528d8482850101111561495f578586fd5b8084840185840137810190920193909352979a969950949793969295919450919260e001359150565b60008060008060008060008060006101208a8c0312156149a6578081fd5b6149b08b8b6146f2565b98506149bf8b60208c016146f2565b975060408a0135965060608a0135955060808a013567ffffffffffffffff808211156149e9578283fd5b6149f58d838e0161473f565b965060a08c0135915080821115614a0a578283fd5b614a168d838e0161473f565b955060c08c0135915080821115614a2b578283fd5b50614a388c828d0161473f565b93505060e08a013591506101008a013590509295985092959850929598565b60008060008060008060008060006101208a8c031215614a75578485fd5b614a7f8b8b6146f2565b9850614a8e8b60208c016146f2565b975060408a0135965060608a0135955060808a013567ffffffffffffffff80821115614ab8578687fd5b614ac48d838e016147b6565b965060a08c0135915080821115614ad9578586fd5b614ae58d838e0161473f565b955060c08c0135915080821115614a2b578485fd5b600080600080600080600060e0888a031215614b14578081fd5b8735614b1f816159f2565b96506020880135614b2f816159f2565b955060408801359450606088013593506080880135925060a0880135614b54816159f2565b8092505060c0880135905092959891949750929550565b60008060008060008060008060008060006101608c8e031215614b8c578485fd5b8b35614b97816159f2565b9a5060208c0135614ba7816159f2565b995060408c0135985060608c0135975060808c0135965060a08c0135614bcc816159f2565b955060c08c0135945060e08c0135614be381615a0a565b9350614bf38d6101008e01614814565b92506101208c013591506101408c013590509295989b509295989b9093969950565b600080600080600080600080610100898b031215614c31578182fd5b8835614c3c816159f2565b97506020890135614c4c816159f2565b965060408901359550606089013594506080890135935060a0890135925060c0890135614c78816159f2565b8092505060e089013590509295985092959890939650565b60008060008060008060c08789031215614ca8578384fd5b8635614cb3816159f2565b95506020870135945060408701359350606087013592506080870135614cd8816159f2565b8092505060a087013590509295509295509295565b6000806000806000806000806000806101408b8d031215614d0c578384fd5b8a35614d17816159f2565b995060208b0135985060408b0135975060608b0135965060808b0135614d3c816159f2565b955060a08b0135945060c08b0135614d5381615a0a565b9350614d628c60e08d01614814565b92506101008b013591506101208b013590509295989b9194979a5092959850565b600060208284031215614d94578081fd5b8151610ab781615a0a565b600080600060608486031215614db3578081fd5b8351614dbe81615a18565b6020850151909350614dcf81615a18565b604085015190925063ffffffff81168114614de8578182fd5b809150509250925092565b600060208284031215614e04578081fd5b5051919050565b600080600080600060808688031215614e22578283fd5b85359450602086013567ffffffffffffffff811115614e3f578384fd5b614e4b888289016146fd565b9095509350506040860135614e5f816159f2565b949793965091946060013592915050565b60008060408385031215614e82578182fd5b82359150602083013567ffffffffffffffff811115614e9f578182fd5b614eab8582860161473f565b9150509250929050565b60008060408385031215614ec7578182fd5b505080516020909101519092909150565b60008060008060008060a08789031215614ef0578384fd5b8635955060208701359450604087013567ffffffffffffffff811115614f14578485fd5b614f2089828a016146fd565b9095509350506060870135614f34816159f2565b80925050608087013590509295509295509295565b600080600060608486031215614f5d578081fd5b505081359360208301359350604090920135919050565b6bffffffffffffffffffffffff19606093841b811682529190921b16601482015260280190565b60008251614fad8184602087016159c6565b9190910192915050565b6001600160f81b0319815260609290921b6bffffffffffffffffffffffff1916600183015260158201527f772d76e02b5a3aeeef00b07a18a744c893227f52ecb6e3d431da85a229ed6a1d603582015260550190565b6001600160a01b0391909116815260200190565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b6001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03958616815293851660208501529190931660408301526060820192909252608081019190915260a00190565b6001600160a01b0392831681529116602082015260606040820181905260009082015260800190565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b818110156151785783518352928401929184019160010161515c565b50909695505050505050565b901515815260200190565b6020808252601f908201527f5472616e7366657248656c7065723a205452414e534645525f4641494c454400604082015260600190565b60208082526017908201527f53776170526f757465723a2050414952535f454d505459000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252818101527f537761704c6962726172793a204944454e544943414c5f414444524553534553604082015260600190565b6020808252601e908201527f5472616e7366657248656c7065723a20415050524f56455f4641494c45440000604082015260600190565b60208082526022908201527f53776170526f757465723a20504149525f4153534554544f5f4e4f545f4d4154604082015261086960f31b606082015260800190565b60208082526022908201527f53776170526f757465723a20504149525f414441505445525f4e4f545f4d4154604082015261086960f31b606082015260800190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252602a908201527f53776170526f757465723a2045787465726e616c2053776170206578656375746040820152691a5bdb8811985a5b195960b21b606082015260800190565b6020808252818101527f537761704c6962726172793a20494e53554646494349454e545f414d4f554e54604082015260600190565b60208082526022908201527f53776170526f757465723a20504f4f4c5f414441505445525f4e4f545f4d4154604082015261086960f31b606082015260800190565b60208082526023908201527f537761704c6962726172793a20494e53554646494349454e545f4c495155494460408201526249545960e81b606082015260800190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526026908201527f537761704c6962726172793a20494e53554646494349454e545f494e5055545f604082015265105353d5539560d21b606082015260800190565b60208082526021908201527f53776170526f757465723a20494e53554646494349454e545f425f414d4f554e6040820152601560fa1b606082015260800190565b6020808252601e908201527f53776170526f757465723a2052455455524e5f414d4f554e545f5a45524f0000604082015260600190565b60208082526026908201527f53776170526f757465723a20494e53554646494349454e545f4f55545055545f604082015265105353d5539560d21b606082015260800190565b60208082526027908201527f537761704c6962726172793a20494e53554646494349454e545f4f555450555460408201526617d05353d5539560ca1b606082015260800190565b60208082526022908201527f53776170526f757465723a204e6f742057686974656c69737420436f6e74726160408201526118dd60f21b606082015260800190565b60208082526023908201527f5472616e7366657248656c7065723a204554485f5452414e534645525f46414960408201526213115160ea1b606082015260800190565b60208082526013908201527214ddd85c149bdd5d195c8e8811561412549151606a1b604082015260600190565b60208082526019908201527f537761704c6962726172793a20494e56414c49445f5041544800000000000000604082015260600190565b60208082526022908201527f53776170526f757465723a204558434553534956455f494e5055545f414d4f55604082015261139560f21b606082015260800190565b60208082526018908201527f53776170526f757465723a20494e56414c49445f504154480000000000000000604082015260600190565b60208082526024908201527f5472616e7366657248656c7065723a205452414e534645525f46524f4d5f46416040820152631253115160e21b606082015260800190565b60208082526021908201527f53776170526f757465723a20494e53554646494349454e545f415f414d4f554e6040820152601560fa1b606082015260800190565b60208082526027908201527f53776170526f757465723a2052657475726e20616d6f756e74206973206e6f74604082015266040cadcdeeaced60cb1b606082015260800190565b60208082526019908201527f537761704c6962726172793a205a45524f5f4144445245535300000000000000604082015260600190565b90815260200190565b918252602082015260400190565b600085825284602083015260018060a01b03841660408301526080606083015282518060808401526159528160a08501602087016159c6565b601f01601f19169190910160a00195945050505050565b9283526020830191909152604082015260600190565b60405181810167ffffffffffffffff8111828210171561599e57600080fd5b604052919050565b600067ffffffffffffffff8211156159bc578081fd5b5060209081020190565b60005b838110156159e15781810151838201526020016159c9565b8381111561397d5750506000910152565b6001600160a01b0381168114615a0757600080fd5b50565b8015158114615a0757600080fd5b6001600160701b0381168114615a0757600080fdfea26469706673582212202bb08419765e2558422b8df8cd93a462d8f5577dc5e7deb8f263f8c4a9b8b4a164736f6c634300060c003300000000000000000000000073d9f93d53505cb8c4c7f952ae42450d9e859d10000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000073d9f93d53505cb8c4c7f952ae42450d9e859d10000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c

-----Decoded View---------------
Arg [0] : _factory (address): 0x73d9f93d53505cb8c4c7f952ae42450d9e859d10
Arg [1] : _WOKT (address): 0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000073d9f93d53505cb8c4c7f952ae42450d9e859d10
Arg [1] : 000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.