Contract 0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd06

Contract Overview

Balance:
0 HT

HT Value:
$0.00

Token:
Txn Hash
Block
From
To
Value [Txn Fee]
0x8a00aad0b834af49fa073df670c7af1f894bd5e586f0d6689ca21cd06305aa8870190332021-08-03 0:34:252 mins ago0xd22aaea582c1d2bf6d0daa0970d740d73808c295 IN  0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060 HT0.00026832825
0x1d6d2dac39882a70f433049a97e74dbf944417e7c86e81e51ea7255b45fc8a5a70187372021-08-03 0:19:3716 mins ago0xe9db85c1d8c73291a51c3c83eebf2044193963e2 IN  0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060 HT0.0004574025
0x37fc47d6a067adc9a932d29398185dcf1ac24134f5e698ab4c9606d019d125cf70180042021-08-02 23:42:5853 mins ago0xcfec3db9dc59215b3569234ccb395cbd71a275a7 IN  0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060 HT0.00022854825
0x465bfca8c9b0f9f9557b77d981c717ff7b074e892683ef71507272d752d3bd3270179392021-08-02 23:39:4356 mins ago0x0ba3e882e5a212be3bb774b18c1d54fdd0b3e66c IN  0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060 HT0.0004313655
0xeb907688e87ad58acb692f5c9e25c1a71e72d2917416d33791c6511250ac9b4f70176382021-08-02 23:24:401 hr 11 mins ago0xc77c3efb55bd7b0e44c13eb27eb33c98597f0a68 IN  0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060 HT0.000431541
0x3cdc3f1696489d7f7869fea3b221d682b03c048a941b783bda6497297fed90c670165352021-08-02 22:29:312 hrs 7 mins ago0x29919fa84478fde75dfb7efa680f14bd603783d1 IN  0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060 HT0.0003985065
0xe5677ac697bdd24838cfedcc0ea871ece8f168f350763470682867b5235fc3f170164962021-08-02 22:27:342 hrs 8 mins ago0x29919fa84478fde75dfb7efa680f14bd603783d1 IN  0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060 HT0.0004911525
0xd8a61aa6ce0993271f94d621dc91bd355c282da3fd903951fb27dfdadbab7a6070151632021-08-02 21:20:553 hrs 15 mins ago0x2dc61518c92e4d6c4af4d8fdebcb7e97554d43a8 IN  0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060 HT0.00041745375
0x73a43ac2a2c01e313c805aa236f947981d916592881266afbfe8c4e38fde709c70150512021-08-02 21:15:193 hrs 21 mins ago0xc77c3efb55bd7b0e44c13eb27eb33c98597f0a68 IN  0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060 HT0.000431541
0x18e849d9db265b47e1a36964c4087ad27b04a10db842962cb35b9a7e94a85e5470149482021-08-02 21:10:103 hrs 26 mins ago0x5abdd2f92423209e6b942e53e0fc5a7791c23eef IN  0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060 HT0.0004911255
0x45f5f2ecf13e8726b8ab37fcf474fea2b8367148caf933e445b9b60274ef97b970132682021-08-02 19:46:104 hrs 50 mins ago0xff269a53e142ca6256dd90e303c47ecfdbbec72c IN  0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd0630 HT0.00026023725
0xd6c732ff40e7e99383b9fd3d8b7182ac984b3005c3840708a26c69b527ba1a5470130662021-08-02 19:36:045 hrs ago0xff269a53e142ca6256dd90e303c47ecfdbbec72c IN  0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd0650 HT0.00026023725
0x1b9e720266e350651a3a08a22f0fda52db39f5575b6a81f7b908ac596655ad9270128352021-08-02 19:24:315 hrs 12 mins ago0x2548aff52a4b4d8e1cc7b8872f14d5be8f3931f7 IN  0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060 HT0.000465183
0x3c2888f946da4d2b880a7cee5a56fdd9ab7f278d4969d92f5dc0f5ba1485cf3270121562021-08-02 18:50:345 hrs 45 mins ago0x5abdd2f92423209e6b942e53e0fc5a7791c23eef IN  0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060.286449908700913 HT0.000408996
0x91747636be170d54f255e2b75edf3dcdb4a7d5103801e89dc3e39da50a8e693270121352021-08-02 18:49:315 hrs 47 mins ago0x5abdd2f92423209e6b942e53e0fc5a7791c23eef IN  0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060 HT0.0002281905
0x4ae23dcd0a1b3a1c885f9d8bdf178364560f5ff90e2ffdd8562daab471ccc66c70116702021-08-02 18:26:166 hrs 10 mins ago0xf0b0478077739440839013b40b842513fe4e67a1 IN  0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060 HT0.0004574025
0xbc788888eff39d7d258e68bc73f8405007c3a792d6ffdec71786786b91237f8870110232021-08-02 17:53:556 hrs 42 mins ago0xdc6e4ea911615ba86e1387d7c5514d97de6edd13 IN  0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060 HT0.0004651155
0xb4b9751284769e621fe6230a19d38f4befd2b3668110b670e2eb00b1c2c3b18170103492021-08-02 17:20:137 hrs 16 mins ago0x388b9e42247c6450f9deb74bbbbefe3f32797dbc IN  0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060 HT0.000465237
0xb2a1c0552f4cef6603d4bce780cdea4f1f12ae083e282aea12930e5ed80288ad70102422021-08-02 17:14:527 hrs 21 mins ago0xa28b72ffe362b34279aa60f5de574692ffcf1af2 IN  0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060 HT0.0002281905
0xd50627599cfd3cc264e8a0be26a5afa140f74f5fec1c576b4089962bb8726e4570101502021-08-02 17:10:167 hrs 26 mins ago0xa28b72ffe362b34279aa60f5de574692ffcf1af2 IN  0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060 HT0.0004652235
0x818ca64d6ca4daff5a72d5d4f5114228061644bdb61f75a5817728fdd28ba92f70101292021-08-02 17:09:137 hrs 27 mins ago0xa28b72ffe362b34279aa60f5de574692ffcf1af2 IN  0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060 HT0.000420912
0xeeb7b6354aeb95d660db6f13788b648c132b9832e9b7145fc1536a98c43486ce70101182021-08-02 17:08:407 hrs 27 mins ago0xa28b72ffe362b34279aa60f5de574692ffcf1af2 IN  0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060 HT0.000305847
0xdbf28f026ec92eb5bf1e9a709c297029c48f686180e084590f2c34974924013470099022021-08-02 16:57:527 hrs 38 mins ago0x5abdd2f92423209e6b942e53e0fc5a7791c23eef IN  0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060 HT0.0004314195
0xf73949922d096f249bc9f6c70289bbecef1e192c852261588fc14f4beb27fff970098742021-08-02 16:56:287 hrs 40 mins ago0x5abdd2f92423209e6b942e53e0fc5a7791c23eef IN  0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060 HT0.0002619135
0x419ed7ec816028847c440da6487fc8b3ad001b569040ec330ec76e8c26b2493570097032021-08-02 16:47:557 hrs 48 mins ago0x4965d20e5d030cb94eac01e3b737b9cd1c87ee41 IN  0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060 HT0.0003639735
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x8a00aad0b834af49fa073df670c7af1f894bd5e586f0d6689ca21cd06305aa8870190332021-08-03 0:34:252 mins ago 0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060xd22aaea582c1d2bf6d0daa0970d740d73808c2950.044970677175828247 HT
0x8a00aad0b834af49fa073df670c7af1f894bd5e586f0d6689ca21cd06305aa8870190332021-08-03 0:34:252 mins ago Huobi: Wrapped Huobi Token 0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060.044970677175828247 HT
0xd8a61aa6ce0993271f94d621dc91bd355c282da3fd903951fb27dfdadbab7a6070151632021-08-02 21:20:553 hrs 15 mins ago 0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060x2dc61518c92e4d6c4af4d8fdebcb7e97554d43a80.620937544331948936 HT
0xd8a61aa6ce0993271f94d621dc91bd355c282da3fd903951fb27dfdadbab7a6070151632021-08-02 21:20:553 hrs 15 mins ago Huobi: Wrapped Huobi Token 0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060.620937544331948936 HT
0x45f5f2ecf13e8726b8ab37fcf474fea2b8367148caf933e445b9b60274ef97b970132682021-08-02 19:46:104 hrs 50 mins ago 0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd06 Huobi: Wrapped Huobi Token30 HT
0xd6c732ff40e7e99383b9fd3d8b7182ac984b3005c3840708a26c69b527ba1a5470130662021-08-02 19:36:045 hrs ago 0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd06 Huobi: Wrapped Huobi Token50 HT
0x3c2888f946da4d2b880a7cee5a56fdd9ab7f278d4969d92f5dc0f5ba1485cf3270121562021-08-02 18:50:345 hrs 45 mins ago 0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd06 Huobi: Wrapped Huobi Token0.286449908700913207 HT
0xfdc60202994644b7b380c6f9814d47482613a45aa680985d04ba9256a960bbdb70096182021-08-02 16:43:407 hrs 52 mins ago 0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060x6c90ea2fa53cbfc56aabc8605aac061c85baf5940.864854672371884098 HT
0xfdc60202994644b7b380c6f9814d47482613a45aa680985d04ba9256a960bbdb70096182021-08-02 16:43:407 hrs 52 mins ago Huobi: Wrapped Huobi Token 0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060.864854672371884098 HT
0x672095847cb886e35283a05fe2ab6fef5b6db88145e3ce70f21b48d81279379470095602021-08-02 16:40:467 hrs 55 mins ago 0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd06 Huobi: Wrapped Huobi Token0.864854672371884098 HT
0xca5b629b308e6442af61d4541bb16f8ef4ecf6af0948ef99292e831570b306aa70090622021-08-02 16:15:528 hrs 20 mins ago 0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060x7a10a3cc061499aba528e646313f7fd27e1bd65f0.09940090030471409 HT
0xca5b629b308e6442af61d4541bb16f8ef4ecf6af0948ef99292e831570b306aa70090622021-08-02 16:15:528 hrs 20 mins ago Huobi: Wrapped Huobi Token 0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060.09940090030471409 HT
0xac08e6e0e1ac08287b6014b71c5e24a20d34b7fc2055f0904271cc9651167a6670090472021-08-02 16:15:078 hrs 21 mins ago 0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd06 Huobi: Wrapped Huobi Token0.1 HT
0xcd7295626aa51d1cc333e8307ee3c6c2d29ca75d44572a547d15bc211157de1470089702021-08-02 16:11:168 hrs 25 mins ago 0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060xa58cc2ba0078b698c24e001362ee4dc809d0dd1f0.000124198662730117 HT
0xcd7295626aa51d1cc333e8307ee3c6c2d29ca75d44572a547d15bc211157de1470089702021-08-02 16:11:168 hrs 25 mins ago Huobi: Wrapped Huobi Token 0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060.000124198662730117 HT
0x7e01b76d8bf95c8dad2eb8d3962e86740d2b2a40c31f616d623a4ba989280a5b70082882021-08-02 15:37:108 hrs 59 mins ago 0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd06 Huobi: Wrapped Huobi Token1.3 HT
0x05c852ce1157760bede04868ab350e31f393789981ba0d0c6f87bf578019190b70080802021-08-02 15:26:469 hrs 9 mins ago 0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060x2dc61518c92e4d6c4af4d8fdebcb7e97554d43a80.29155361305526584 HT
0x05c852ce1157760bede04868ab350e31f393789981ba0d0c6f87bf578019190b70080802021-08-02 15:26:469 hrs 9 mins ago Huobi: Wrapped Huobi Token 0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060.29155361305526584 HT
0xe09d7e6bf6b8e68390c7f39b7b0239b5085daa20a4242c8342d7456aa7344bfd70074512021-08-02 14:55:199 hrs 41 mins ago 0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060xc11d3d495cb49296b684bafb4e894d2b4fea1afb89.999485271772794167 HT
0xe09d7e6bf6b8e68390c7f39b7b0239b5085daa20a4242c8342d7456aa7344bfd70074512021-08-02 14:55:199 hrs 41 mins ago Huobi: Wrapped Huobi Token 0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd0689.999485271772794167 HT
0x84f7c2ca64d7f3f5e7431fde45dba8be22059f94cede9f0bbbdeb16ff7df734070067482021-08-02 14:20:1010 hrs 16 mins ago 0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd06 Huobi: Wrapped Huobi Token1 HT
0xdf643efe9b26b6b3db435443ad41dbb605c09066acb0d5a03eeaeeeac1729b9170063092021-08-02 13:58:1310 hrs 38 mins ago 0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd06 Huobi: Wrapped Huobi Token2.742173245812398089 HT
0xbf18d77365f27bf0519074b2fe7e3b2c1661daeebd8be056ded8fcd3f1b9196b70062402021-08-02 13:54:4610 hrs 41 mins ago 0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060x2dc61518c92e4d6c4af4d8fdebcb7e97554d43a83.5 HT
0xbf18d77365f27bf0519074b2fe7e3b2c1661daeebd8be056ded8fcd3f1b9196b70062402021-08-02 13:54:4610 hrs 41 mins ago Huobi: Wrapped Huobi Token 0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd063.5 HT
0xd5b7296bea9d0d51948324f8bffaf924b5dbe0eff1abaee26d5ccbe3a03b8f5d70048432021-08-02 12:44:5511 hrs 51 mins ago 0x7b7fb50541dc2a5f9ce06a67408db0e0e677cd060x2dc61518c92e4d6c4af4d8fdebcb7e97554d43a80.233257274727110788 HT
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
HdexRouter

Compiler Version
v0.6.6+commit.6c089d02

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 11 : HdexRouter.sol
// SPDX-License-Identifier: MIT

pragma solidity =0.6.6;

import '../interfaces/IHdexFactory.sol';
import '../libraries/TransferHelper.sol';
import '../libraries/HdexLibrary.sol';
import '../libraries/SafeMath.sol';
import '../libraries/Ownable.sol';

import '../interfaces/IHdexRouter.sol';
import '../interfaces/IERC20.sol';
import '../interfaces/IWHT.sol';
import '../interfaces/ISwapMining.sol';


contract HdexRouter is IHdexRouter, Ownable {
    using SafeMath for uint;

    address public immutable override factory;
    address public immutable override WHT;
    address public override swapMining;

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

    constructor(address _factory, address _WHT) public {
        factory = _factory;
        WHT = _WHT;
    }

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

    // 设置交易挖矿合约地址
    function setSwapMining(address _swapMining) public override onlyOwner {
        swapMining = _swapMining;
    }

    // **** ADD LIQUIDITY ****
    function _addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin
    ) internal virtual returns (uint amountA, uint amountB) {
        // create the pair if it doesn't exist yet
        if (IHdexFactory(factory).getPair(tokenA, tokenB) == address(0)) {
            // 判断是否在白名单中
            if(IHdexFactory(factory).isCheck()){
                require(IHdexFactory(factory).isInWhitelist(msg.sender), "HdexRouter: NOT_IN_WHITELIST");
            }
            IHdexFactory(factory).createPair(tokenA, tokenB);
        }
        (uint reserveA, uint reserveB) = HdexLibrary.getReserves(factory, tokenA, tokenB);
        if (reserveA == 0 && reserveB == 0) {
            (amountA, amountB) = (amountADesired, amountBDesired);
        } else {
            uint amountBOptimal = HdexLibrary.quote(amountADesired, reserveA, reserveB);
            if (amountBOptimal <= amountBDesired) {
                require(amountBOptimal >= amountBMin, 'HdexRouter: INSUFFICIENT_B_AMOUNT');
                (amountA, amountB) = (amountADesired, amountBOptimal);
            } else {
                uint amountAOptimal = HdexLibrary.quote(amountBDesired, reserveB, reserveA);
                assert(amountAOptimal <= amountADesired);
                require(amountAOptimal >= amountAMin, 'HdexRouter: INSUFFICIENT_A_AMOUNT');
                (amountA, amountB) = (amountAOptimal, amountBDesired);
            }
        }
    }
    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external virtual override ensure(deadline) returns (uint amountA, uint amountB, uint liquidity) {
        (amountA, amountB) = _addLiquidity(tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin);
        address pair = HdexLibrary.pairFor(factory, tokenA, tokenB);
        TransferHelper.safeTransferFrom(tokenA, msg.sender, pair, amountA);
        TransferHelper.safeTransferFrom(tokenB, msg.sender, pair, amountB);
        liquidity = IHdexPair(pair).mint(to);
    }
    function addLiquidityHT(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountHTMin,
        address to,
        uint deadline
    ) external virtual override payable ensure(deadline) returns (uint amountToken, uint amountHT, uint liquidity) {
        (amountToken, amountHT) = _addLiquidity(
            token,
            WHT,
            amountTokenDesired,
            msg.value,
            amountTokenMin,
            amountHTMin
        );
        address pair = HdexLibrary.pairFor(factory, token, WHT);
        TransferHelper.safeTransferFrom(token, msg.sender, pair, amountToken);
        IWHT(WHT).deposit{value: amountHT}();
        assert(IWHT(WHT).transfer(pair, amountHT));
        liquidity = IHdexPair(pair).mint(to);
        // refund dust ht, if any
        if (msg.value > amountHT) TransferHelper.safeTransferHT(msg.sender, msg.value - amountHT);
    }

    // **** REMOVE LIQUIDITY ****
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) public virtual override ensure(deadline) returns (uint amountA, uint amountB) {
        address pair = HdexLibrary.pairFor(factory, tokenA, tokenB);
        IHdexPair(pair).transferFrom(msg.sender, pair, liquidity); // send liquidity to pair
        (uint amount0, uint amount1) = IHdexPair(pair).burn(to);
        (address token0,) = HdexLibrary.sortTokens(tokenA, tokenB);
        (amountA, amountB) = tokenA == token0 ? (amount0, amount1) : (amount1, amount0);
        require(amountA >= amountAMin, 'HdexRouter: INSUFFICIENT_A_AMOUNT');
        require(amountB >= amountBMin, 'HdexRouter: INSUFFICIENT_B_AMOUNT');
    }
    function removeLiquidityHT(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountHTMin,
        address to,
        uint deadline
    ) public virtual override ensure(deadline) returns (uint amountToken, uint amountHT) {
        (amountToken, amountHT) = removeLiquidity(
            token,
            WHT,
            liquidity,
            amountTokenMin,
            amountHTMin,
            address(this),
            deadline
        );
        TransferHelper.safeTransfer(token, to, amountToken);
        IWHT(WHT).withdraw(amountHT);
        TransferHelper.safeTransferHT(to, amountHT);
    }
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external virtual override returns (uint amountA, uint amountB) {
        address pair = HdexLibrary.pairFor(factory, tokenA, tokenB);
        uint value = approveMax ? uint(-1) : liquidity;
        IHdexPair(pair).permit(msg.sender, address(this), value, deadline, v, r, s);
        (amountA, amountB) = removeLiquidity(tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline);
    }
    function removeLiquidityHTWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountHTMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external virtual override returns (uint amountToken, uint amountHT) {
        address pair = HdexLibrary.pairFor(factory, token, WHT);
        uint value = approveMax ? uint(-1) : liquidity;
        IHdexPair(pair).permit(msg.sender, address(this), value, deadline, v, r, s);
        (amountToken, amountHT) = removeLiquidityHT(token, liquidity, amountTokenMin, amountHTMin, to, deadline);
    }

    // **** REMOVE LIQUIDITY (supporting fee-on-transfer tokens) ****
    function removeLiquidityHTSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountHTMin,
        address to,
        uint deadline
    ) public virtual override ensure(deadline) returns (uint amountHT) {
        (, amountHT) = removeLiquidity(
            token,
            WHT,
            liquidity,
            amountTokenMin,
            amountHTMin,
            address(this),
            deadline
        );
        TransferHelper.safeTransfer(token, to, IERC20(token).balanceOf(address(this)));
        IWHT(WHT).withdraw(amountHT);
        TransferHelper.safeTransferHT(to, amountHT);
    }
    function removeLiquidityHTWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountHTMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external virtual override returns (uint amountHT) {
        address pair = HdexLibrary.pairFor(factory, token, WHT);
        uint value = approveMax ? uint(-1) : liquidity;
        IHdexPair(pair).permit(msg.sender, address(this), value, deadline, v, r, s);
        amountHT = removeLiquidityHTSupportingFeeOnTransferTokens(
            token, liquidity, amountTokenMin, amountHTMin, to, deadline
        );
    }

    // **** SWAP ****
    // requires the initial amount to have already been sent to the first pair
    function _swap(uint[] memory amounts, address[] memory path, address _to) internal virtual {
        for (uint i; i < path.length - 1; i++) {
            (address input, address output) = (path[i], path[i + 1]);
            (address token0,) = HdexLibrary.sortTokens(input, output);
            uint amountOut = amounts[i + 1];
            if (swapMining != address(0)) {
                // swapMining
                ISwapMining(swapMining).swap(msg.sender, input, output, amountOut);
            }
            (uint amount0Out, uint amount1Out) = input == token0 ? (uint(0), amountOut) : (amountOut, uint(0));
            address to = i < path.length - 2 ? HdexLibrary.pairFor(factory, output, path[i + 2]) : _to;
            IHdexPair(HdexLibrary.pairFor(factory, input, output)).swap(
                amount0Out, amount1Out, to, new bytes(0)
            );
        }
    }
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external virtual override ensure(deadline) returns (uint[] memory amounts) {
        amounts = HdexLibrary.getAmountsOut(factory, amountIn, path);
        require(amounts[amounts.length - 1] >= amountOutMin, 'HdexRouter: INSUFFICIENT_OUTPUT_AMOUNT');
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, HdexLibrary.pairFor(factory, path[0], path[1]), amounts[0]
        );
        _swap(amounts, path, to);
    }
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external virtual override ensure(deadline) returns (uint[] memory amounts) {
        amounts = HdexLibrary.getAmountsIn(factory, amountOut, path);
        require(amounts[0] <= amountInMax, 'HdexRouter: EXCESSIVE_INPUT_AMOUNT');
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, HdexLibrary.pairFor(factory, path[0], path[1]), amounts[0]
        );
        _swap(amounts, path, to);
    }
    function swapExactHTForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        virtual
        override
        payable
        ensure(deadline)
        returns (uint[] memory amounts)
    {
        require(path[0] == WHT, 'HdexRouter: INVALID_PATH');
        amounts = HdexLibrary.getAmountsOut(factory, msg.value, path);
        require(amounts[amounts.length - 1] >= amountOutMin, 'HdexRouter: INSUFFICIENT_OUTPUT_AMOUNT');
        IWHT(WHT).deposit{value: amounts[0]}();
        assert(IWHT(WHT).transfer(HdexLibrary.pairFor(factory, path[0], path[1]), amounts[0]));
        _swap(amounts, path, to);
    }
    function swapTokensForExactHT(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        virtual
        override
        ensure(deadline)
        returns (uint[] memory amounts)
    {
        require(path[path.length - 1] == WHT, 'HdexRouter: INVALID_PATH');
        amounts = HdexLibrary.getAmountsIn(factory, amountOut, path);
        require(amounts[0] <= amountInMax, 'HdexRouter: EXCESSIVE_INPUT_AMOUNT');
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, HdexLibrary.pairFor(factory, path[0], path[1]), amounts[0]
        );
        _swap(amounts, path, address(this));
        IWHT(WHT).withdraw(amounts[amounts.length - 1]);
        TransferHelper.safeTransferHT(to, amounts[amounts.length - 1]);
    }
    function swapExactTokensForHT(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        virtual
        override
        ensure(deadline)
        returns (uint[] memory amounts)
    {
        require(path[path.length - 1] == WHT, 'HdexRouter: INVALID_PATH');
        amounts = HdexLibrary.getAmountsOut(factory, amountIn, path);
        require(amounts[amounts.length - 1] >= amountOutMin, 'HdexRouter: INSUFFICIENT_OUTPUT_AMOUNT');
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, HdexLibrary.pairFor(factory, path[0], path[1]), amounts[0]
        );
        _swap(amounts, path, address(this));
        IWHT(WHT).withdraw(amounts[amounts.length - 1]);
        TransferHelper.safeTransferHT(to, amounts[amounts.length - 1]);
    }
    function swapHTForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        virtual
        override
        payable
        ensure(deadline)
        returns (uint[] memory amounts)
    {
        require(path[0] == WHT, 'HdexRouter: INVALID_PATH');
        amounts = HdexLibrary.getAmountsIn(factory, amountOut, path);
        require(amounts[0] <= msg.value, 'HdexRouter: EXCESSIVE_INPUT_AMOUNT');
        IWHT(WHT).deposit{value: amounts[0]}();
        assert(IWHT(WHT).transfer(HdexLibrary.pairFor(factory, path[0], path[1]), amounts[0]));
        _swap(amounts, path, to);
        // refund dust ht, if any
        if (msg.value > amounts[0]) TransferHelper.safeTransferHT(msg.sender, msg.value - amounts[0]);
    }

    // **** SWAP (supporting fee-on-transfer tokens) ****
    // requires the initial amount to have already been sent to the first pair
    function _swapSupportingFeeOnTransferTokens(address[] memory path, address _to) internal virtual {
        for (uint i; i < path.length - 1; i++) {
            (address input, address output) = (path[i], path[i + 1]);
            (address token0,) = HdexLibrary.sortTokens(input, output);
            IHdexPair pair = IHdexPair(HdexLibrary.pairFor(factory, input, output));
            uint amountInput;
            uint amountOutput;
            { // scope to avoid stack too deep errors
            (uint reserve0, uint reserve1,) = pair.getReserves();
            (uint reserveInput, uint reserveOutput) = input == token0 ? (reserve0, reserve1) : (reserve1, reserve0);
            amountInput = IERC20(input).balanceOf(address(pair)).sub(reserveInput);
            amountOutput = HdexLibrary.getAmountOut(amountInput, reserveInput, reserveOutput);
            }
            if (swapMining != address(0)) {
                // swapMining
                ISwapMining(swapMining).swap(msg.sender, input, output, amountOutput);
            }
            (uint amount0Out, uint amount1Out) = input == token0 ? (uint(0), amountOutput) : (amountOutput, uint(0));
            address to = i < path.length - 2 ? HdexLibrary.pairFor(factory, output, path[i + 2]) : _to;
            pair.swap(amount0Out, amount1Out, to, new bytes(0));
        }
    }
    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external virtual override ensure(deadline) {
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, HdexLibrary.pairFor(factory, path[0], path[1]), amountIn
        );
        uint balanceBefore = IERC20(path[path.length - 1]).balanceOf(to);
        _swapSupportingFeeOnTransferTokens(path, to);
        require(
            IERC20(path[path.length - 1]).balanceOf(to).sub(balanceBefore) >= amountOutMin,
            'HdexRouter: INSUFFICIENT_OUTPUT_AMOUNT'
        );
    }
    function swapExactHTForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    )
        external
        virtual
        override
        payable
        ensure(deadline)
    {
        require(path[0] == WHT, 'HdexRouter: INVALID_PATH');
        uint amountIn = msg.value;
        IWHT(WHT).deposit{value: amountIn}();
        assert(IWHT(WHT).transfer(HdexLibrary.pairFor(factory, path[0], path[1]), amountIn));
        uint balanceBefore = IERC20(path[path.length - 1]).balanceOf(to);
        _swapSupportingFeeOnTransferTokens(path, to);
        require(
            IERC20(path[path.length - 1]).balanceOf(to).sub(balanceBefore) >= amountOutMin,
            'HdexRouter: INSUFFICIENT_OUTPUT_AMOUNT'
        );
    }
    function swapExactTokensForHTSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    )
        external
        virtual
        override
        ensure(deadline)
    {
        require(path[path.length - 1] == WHT, 'HdexRouter: INVALID_PATH');
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, HdexLibrary.pairFor(factory, path[0], path[1]), amountIn
        );
        _swapSupportingFeeOnTransferTokens(path, address(this));
        uint amountOut = IERC20(WHT).balanceOf(address(this));
        require(amountOut >= amountOutMin, 'HdexRouter: INSUFFICIENT_OUTPUT_AMOUNT');
        IWHT(WHT).withdraw(amountOut);
        TransferHelper.safeTransferHT(to, amountOut);
    }

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

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

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

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

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

File 2 of 11 : IHdexFactory.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.5.0;

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

    function isCheck() external view returns (bool);
    function feeTo() external view returns (address);
    function feeToRate() external view returns (uint256);
    function isFlashSwapOn() external view returns (bool);
    function isInWhitelist(address _user) external view returns(bool);

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

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

    function setFeeTo(address) external;
    function setFeeToRate(uint256) external;
    function setFlashSwap(bool _isFlashSwapOn) external;
    function setRouter(address _router) external;
}

File 3 of 11 : TransferHelper.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0;

// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {
    function safeApprove(
        address token,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('approve(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            'TransferHelper::safeApprove: 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::safeTransfer: 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::transferFrom: transferFrom failed'
        );
    }

    function safeTransferHT(address to, uint256 value) internal {
        (bool success, ) = to.call{value: value}(new bytes(0));
        require(success, 'TransferHelper::safeTransferHT: HT transfer failed');
    }
}

File 4 of 11 : HdexLibrary.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.5.0;

import '../interfaces/IHdexPair.sol';
import "./SafeMath.sol";

library HdexLibrary {
    using SafeMath for uint;

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

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

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

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

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

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

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

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

File 5 of 11 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity =0.6.6;

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

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

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

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

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

pragma solidity ^0.6.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.
 */
contract Context {
    // Empty internal constructor, to prevent people from mistakenly deploying
    // an instance of this contract, which should be used via inheritance.
    constructor () internal { }

    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;
    }
}


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

File 7 of 11 : IHdexRouter.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2;

interface IHdexRouter {
    function factory() external pure returns (address);
    function WHT() external pure returns (address);
    function swapMining() external pure returns (address);

    function setSwapMining(address _swapMining) external;

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
    function addLiquidityHT(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountHTMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountHT, uint liquidity);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityHT(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountHTMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountHT);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityHTWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountHTMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountHT);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapExactHTForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
    external
    payable
    returns (uint[] memory amounts);
    function swapTokensForExactHT(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
    external
    returns (uint[] memory amounts);
    function swapExactTokensForHT(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
    external
    returns (uint[] memory amounts);
    function swapHTForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
    external
    payable
    returns (uint[] memory amounts);

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

    function removeLiquidityHTSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountHTMin,
        address to,
        uint deadline
    ) external returns (uint amountHT);
    function removeLiquidityHTWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountHTMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountHT);

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

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

pragma solidity >=0.5.0;

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

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

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

File 9 of 11 : IWHT.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.5.0;

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

File 10 of 11 : ISwapMining.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

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

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

pragma solidity >=0.5.0;

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

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

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

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

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

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

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

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

    function initialize(address, address) external;
}

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_WHT","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"WHT","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":"amountHTMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"addLiquidityHT","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountHT","type":"uint256"},{"internalType":"uint256","name":"liquidity","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":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":"amountHTMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"removeLiquidityHT","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountHT","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":"amountHTMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"removeLiquidityHTSupportingFeeOnTransferTokens","outputs":[{"internalType":"uint256","name":"amountHT","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":"amountHTMin","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":"removeLiquidityHTWithPermit","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountHT","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":"amountHTMin","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":"removeLiquidityHTWithPermitSupportingFeeOnTransferTokens","outputs":[{"internalType":"uint256","name":"amountHT","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":"_swapMining","type":"address"}],"name":"setSwapMining","outputs":[],"stateMutability":"nonpayable","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":"swapExactHTForTokens","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":"swapExactHTForTokensSupportingFeeOnTransferTokens","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":"swapExactTokensForHT","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":"swapExactTokensForHTSupportingFeeOnTransferTokens","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":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapHTForExactTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"swapMining","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":"swapTokensForExactHT","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":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60c06040523480156200001157600080fd5b5060405162004f2d38038062004f2d833981810160405260408110156200003757600080fd5b5080516020909101516000620000556001600160e01b03620000be16565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001600160601b0319606092831b8116608052911b1660a052620000c2565b3390565b60805160601c60a05160601c614d33620001fa600039806101cb5280610f4452806110ca5280611180528061123c528061155352806116f252806117fa52806118a952806119875280611db05280611dfc5280611f375280611f8d5280611fc1528061203552806121dd528061233252806123ba528061269e528061274552806127b95280612a585280612a935280612e2b5280612f83528061300b525080610dc55280610dfe5280611005528061121a5280611377528061144e52806115f35280611a275280611dda5280611f6b528061228252806123ec528061259352806127eb5280612b7b5280612d8c5280612db55280612ed0528061303d52806131a952806138775280613aa25280613f815280613fb7528061433352806143b9528061447a528061458052806146005250614d336000f3fe6080604052600436106101bb5760003560e01c806379836890116100ec578063b08700c61161008a578063d06ca61f11610064578063d06ca61f14610bd7578063de6b825614610c8e578063e8e3370014610d14578063f2fde38b14610d76576101f4565b8063b08700c614610b12578063baa2abde14610b65578063c45a015514610bc2576101f4565b80638803dbee116100c65780638803dbee146109a95780638da5cb5b14610a41578063a223880b14610a56578063ad615dec14610adc576101f4565b806379836890146108895780637edecb45146108ed57806385f8c25914610973576101f4565b80634883f12a116101595780634f887183116101335780634f887183146107365780635c11d795146107695780635cb4859214610801578063613fc24914610816576101f4565b80634883f12a1461061a5780634b3612081461066d5780634e5eda1114610705576101f4565b806325ae1cda1161019557806325ae1cda146103df57806329dd23271461047757806338ed1739146104ea57806346eb605114610582576101f4565b8063054d50d4146101f95780631f00ca74146102415780632195995c14610348576101f4565b366101f457336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101f257fe5b005b600080fd5b34801561020557600080fd5b5061022f6004803603606081101561021c57600080fd5b5080359060208101359060400135610da9565b60408051918252519081900360200190f35b34801561024d57600080fd5b506102f86004803603604081101561026457600080fd5b8135919081019060408101602082013564010000000081111561028657600080fd5b82018360208201111561029857600080fd5b803590602001918460208302840111640100000000831117156102ba57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610dbe945050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561033457818101518382015260200161031c565b505050509050019250505060405180910390f35b34801561035457600080fd5b506103c6600480360361016081101561036c57600080fd5b506001600160a01b038135811691602081013582169160408201359160608101359160808201359160a08101359091169060c08101359060e081013515159060ff6101008201351690610120810135906101400135610df4565b6040805192835260208301919091528051918290030190f35b3480156103eb57600080fd5b506101f2600480360360a081101561040257600080fd5b81359160208101359181019060608101604082013564010000000081111561042957600080fd5b82018360208201111561043b57600080fd5b8035906020019184602083028401116401000000008311171561045d57600080fd5b91935091506001600160a01b038135169060200135610eee565b34801561048357600080fd5b506103c6600480360361014081101561049b57600080fd5b506001600160a01b0381358116916020810135916040820135916060810135916080820135169060a08101359060c081013515159060ff60e08201351690610100810135906101200135611210565b3480156104f657600080fd5b506102f8600480360360a081101561050d57600080fd5b81359160208101359181019060608101604082013564010000000081111561053457600080fd5b82018360208201111561054657600080fd5b8035906020019184602083028401116401000000008311171561056857600080fd5b91935091506001600160a01b038135169060200135611324565b34801561058e57600080fd5b506102f8600480360360a08110156105a557600080fd5b8135916020810135918101906060810160408201356401000000008111156105cc57600080fd5b8201836020820111156105de57600080fd5b8035906020019184602083028401116401000000008311171561060057600080fd5b91935091506001600160a01b0381351690602001356114fb565b34801561062657600080fd5b5061022f600480360360c081101561063d57600080fd5b506001600160a01b0381358116916020810135916040820135916060810135916080820135169060a001356117a6565b34801561067957600080fd5b506102f8600480360360a081101561069057600080fd5b8135916020810135918101906060810160408201356401000000008111156106b757600080fd5b8201836020820111156106c957600080fd5b803590602001918460208302840111640100000000831117156106eb57600080fd5b91935091506001600160a01b03813516906020013561192f565b34801561071157600080fd5b5061071a611ad8565b604080516001600160a01b039092168252519081900360200190f35b34801561074257600080fd5b506101f26004803603602081101561075957600080fd5b50356001600160a01b0316611ae7565b34801561077557600080fd5b506101f2600480360360a081101561078c57600080fd5b8135916020810135918101906060810160408201356401000000008111156107b357600080fd5b8201836020820111156107c557600080fd5b803590602001918460208302840111640100000000831117156107e757600080fd5b91935091506001600160a01b038135169060200135611b80565b34801561080d57600080fd5b5061071a611dae565b34801561082257600080fd5b5061022f600480360361014081101561083a57600080fd5b506001600160a01b0381358116916020810135916040820135916060810135916080820135169060a08101359060c081013515159060ff60e08201351690610100810135906101200135611dd2565b6108cf600480360360c081101561089f57600080fd5b506001600160a01b0381358116916020810135916040820135916060810135916080820135169060a00135611ee0565b60408051938452602084019290925282820152519081900360600190f35b6102f86004803603608081101561090357600080fd5b8135919081019060408101602082013564010000000081111561092557600080fd5b82018360208201111561093757600080fd5b8035906020019184602083028401116401000000008311171561095957600080fd5b91935091506001600160a01b03813516906020013561218d565b34801561097f57600080fd5b5061022f6004803603606081101561099657600080fd5b5080359060208101359060400135612533565b3480156109b557600080fd5b506102f8600480360360a08110156109cc57600080fd5b8135916020810135918101906060810160408201356401000000008111156109f357600080fd5b820183602082011115610a0557600080fd5b80359060200191846020830284011164010000000083111715610a2757600080fd5b91935091506001600160a01b038135169060200135612540565b348015610a4d57600080fd5b5061071a612641565b6101f260048036036080811015610a6c57600080fd5b81359190810190604081016020820135640100000000811115610a8e57600080fd5b820183602082011115610aa057600080fd5b80359060200191846020830284011164010000000083111715610ac257600080fd5b91935091506001600160a01b038135169060200135612650565b348015610ae857600080fd5b5061022f60048036036060811015610aff57600080fd5b50803590602081013590604001356129f6565b348015610b1e57600080fd5b506103c6600480360360c0811015610b3557600080fd5b506001600160a01b0381358116916020810135916040820135916060810135916080820135169060a00135612a03565b348015610b7157600080fd5b506103c6600480360360e0811015610b8857600080fd5b506001600160a01b038135811691602081013582169160408201359160608101359160808201359160a08101359091169060c00135612b25565b348015610bce57600080fd5b5061071a612d8a565b348015610be357600080fd5b506102f860048036036040811015610bfa57600080fd5b81359190810190604081016020820135640100000000811115610c1c57600080fd5b820183602082011115610c2e57600080fd5b80359060200191846020830284011164010000000083111715610c5057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550612dae945050505050565b6102f860048036036080811015610ca457600080fd5b81359190810190604081016020820135640100000000811115610cc657600080fd5b820183602082011115610cd857600080fd5b80359060200191846020830284011164010000000083111715610cfa57600080fd5b91935091506001600160a01b038135169060200135612ddb565b348015610d2057600080fd5b506108cf6004803603610100811015610d3857600080fd5b506001600160a01b038135811691602081013582169160408201359160608101359160808201359160a08101359160c0820135169060e0013561313e565b348015610d8257600080fd5b506101f260048036036020811015610d9957600080fd5b50356001600160a01b0316613282565b6000610db6848484613399565b949350505050565b6060610deb7f00000000000000000000000000000000000000000000000000000000000000008484613489565b90505b92915050565b6000806000610e247f00000000000000000000000000000000000000000000000000000000000000008f8f6135d6565b9050600087610e33578c610e37565b6000195b6040805163d505accf60e01b815233600482015230602482015260448101839052606481018c905260ff8a16608482015260a4810189905260c4810188905290519192506001600160a01b0384169163d505accf9160e48082019260009290919082900301818387803b158015610ead57600080fd5b505af1158015610ec1573d6000803e3d6000fd5b50505050610ed48f8f8f8f8f8f8f612b25565b809450819550505050509b509b9950505050505050505050565b8042811015610f3a576040805162461bcd60e51b81526020600482015260136024820152721219195e149bdd5d195c8e8811561412549151606a1b604482015290519081900360640190fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001685856000198101818110610f7457fe5b905060200201356001600160a01b03166001600160a01b031614610fdf576040805162461bcd60e51b815260206004820152601860248201527f48646578526f757465723a20494e56414c49445f504154480000000000000000604482015290519081900360640190fd5b61106985856000818110610fef57fe5b905060200201356001600160a01b0316336110637f00000000000000000000000000000000000000000000000000000000000000008989600081811061103157fe5b905060200201356001600160a01b03168a8a600181811061104e57fe5b905060200201356001600160a01b03166135d6565b8a6136ae565b6110a7858580806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250309250613820915050565b604080516370a0823160e01b815230600482015290516000916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a0823191602480820192602092909190829003018186803b15801561111157600080fd5b505afa158015611125573d6000803e3d6000fd5b505050506040513d602081101561113b57600080fd5b505190508681101561117e5760405162461bcd60e51b8152600401808060200182810382526026815260200180614b956026913960400191505060405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156111e457600080fd5b505af11580156111f8573d6000803e3d6000fd5b505050506112068482613c02565b5050505050505050565b60008060006112607f00000000000000000000000000000000000000000000000000000000000000008e7f00000000000000000000000000000000000000000000000000000000000000006135d6565b905060008761126f578c611273565b6000195b6040805163d505accf60e01b815233600482015230602482015260448101839052606481018c905260ff8a16608482015260a4810189905260c4810188905290519192506001600160a01b0384169163d505accf9160e48082019260009290919082900301818387803b1580156112e957600080fd5b505af11580156112fd573d6000803e3d6000fd5b5050505061130f8e8e8e8e8e8e612a03565b909f909e509c50505050505050505050505050565b60608142811015611372576040805162461bcd60e51b81526020600482015260136024820152721219195e149bdd5d195c8e8811561412549151606a1b604482015290519081900360640190fd5b6113d07f000000000000000000000000000000000000000000000000000000000000000089888880806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250613cf592505050565b915086826001845103815181106113e357fe5b602002602001015110156114285760405162461bcd60e51b8152600401808060200182810382526026815260200180614b956026913960400191505060405180910390fd5b6114b18686600081811061143857fe5b905060200201356001600160a01b0316336114977f00000000000000000000000000000000000000000000000000000000000000008a8a600081811061147a57fe5b905060200201356001600160a01b03168b8b600181811061104e57fe5b856000815181106114a457fe5b60200260200101516136ae565b6114f082878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250613e2c915050565b509695505050505050565b60608142811015611549576040805162461bcd60e51b81526020600482015260136024820152721219195e149bdd5d195c8e8811561412549151606a1b604482015290519081900360640190fd5b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168686600019810181811061158357fe5b905060200201356001600160a01b03166001600160a01b0316146115ee576040805162461bcd60e51b815260206004820152601860248201527f48646578526f757465723a20494e56414c49445f504154480000000000000000604482015290519081900360640190fd5b61164c7f00000000000000000000000000000000000000000000000000000000000000008988888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061348992505050565b9150868260008151811061165c57fe5b602002602001015111156116a15760405162461bcd60e51b8152600401808060200182810382526022815260200180614c656022913960400191505060405180910390fd5b6116b18686600081811061143857fe5b6116f082878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250309250613e2c915050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632e1a7d4d8360018551038151811061172f57fe5b60200260200101516040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561176d57600080fd5b505af1158015611781573d6000803e3d6000fd5b505050506114f0848360018551038151811061179957fe5b6020026020010151613c02565b600081428110156117f4576040805162461bcd60e51b81526020600482015260136024820152721219195e149bdd5d195c8e8811561412549151606a1b604482015290519081900360640190fd5b611823887f00000000000000000000000000000000000000000000000000000000000000008989893089612b25565b604080516370a0823160e01b815230600482015290519194506118a792508a9187916001600160a01b038416916370a0823191602480820192602092909190829003018186803b15801561187657600080fd5b505afa15801561188a573d6000803e3d6000fd5b505050506040513d60208110156118a057600080fd5b505161410b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632e1a7d4d836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561190d57600080fd5b505af1158015611921573d6000803e3d6000fd5b505050506114f08483613c02565b6060814281101561197d576040805162461bcd60e51b81526020600482015260136024820152721219195e149bdd5d195c8e8811561412549151606a1b604482015290519081900360640190fd5b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016868660001981018181106119b757fe5b905060200201356001600160a01b03166001600160a01b031614611a22576040805162461bcd60e51b815260206004820152601860248201527f48646578526f757465723a20494e56414c49445f504154480000000000000000604482015290519081900360640190fd5b611a807f000000000000000000000000000000000000000000000000000000000000000089888880806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250613cf592505050565b91508682600184510381518110611a9357fe5b602002602001015110156116a15760405162461bcd60e51b8152600401808060200182810382526026815260200180614b956026913960400191505060405180910390fd5b6001546001600160a01b031681565b611aef61428d565b6000546001600160a01b03908116911614611b51576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b8042811015611bcc576040805162461bcd60e51b81526020600482015260136024820152721219195e149bdd5d195c8e8811561412549151606a1b604482015290519081900360640190fd5b611bdc85856000818110610fef57fe5b600085856000198101818110611bee57fe5b905060200201356001600160a01b03166001600160a01b03166370a08231856040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015611c5357600080fd5b505afa158015611c67573d6000803e3d6000fd5b505050506040513d6020811015611c7d57600080fd5b50516040805160208881028281018201909352888252929350611cbf929091899189918291850190849080828437600092019190915250889250613820915050565b86611d718288886000198101818110611cd457fe5b905060200201356001600160a01b03166001600160a01b03166370a08231886040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015611d3957600080fd5b505afa158015611d4d573d6000803e3d6000fd5b505050506040513d6020811015611d6357600080fd5b50519063ffffffff61429116565b10156112065760405162461bcd60e51b8152600401808060200182810382526026815260200180614b956026913960400191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000081565b600080611e207f00000000000000000000000000000000000000000000000000000000000000008d7f00000000000000000000000000000000000000000000000000000000000000006135d6565b9050600086611e2f578b611e33565b6000195b6040805163d505accf60e01b815233600482015230602482015260448101839052606481018b905260ff8916608482015260a4810188905260c4810187905290519192506001600160a01b0384169163d505accf9160e48082019260009290919082900301818387803b158015611ea957600080fd5b505af1158015611ebd573d6000803e3d6000fd5b50505050611ecf8d8d8d8d8d8d6117a6565b9d9c50505050505050505050505050565b60008060008342811015611f31576040805162461bcd60e51b81526020600482015260136024820152721219195e149bdd5d195c8e8811561412549151606a1b604482015290519081900360640190fd5b611f5f8a7f00000000000000000000000000000000000000000000000000000000000000008b348c8c6142e9565b90945092506000611fb17f00000000000000000000000000000000000000000000000000000000000000008c7f00000000000000000000000000000000000000000000000000000000000000006135d6565b9050611fbf8b3383886136ae565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b15801561201a57600080fd5b505af115801561202e573d6000803e3d6000fd5b50505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb82866040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156120b357600080fd5b505af11580156120c7573d6000803e3d6000fd5b505050506040513d60208110156120dd57600080fd5b50516120e557fe5b806001600160a01b0316636a627842886040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050602060405180830381600087803b15801561213d57600080fd5b505af1158015612151573d6000803e3d6000fd5b505050506040513d602081101561216757600080fd5b505192503484101561217f5761217f33853403613c02565b505096509650969350505050565b606081428110156121db576040805162461bcd60e51b81526020600482015260136024820152721219195e149bdd5d195c8e8811561412549151606a1b604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168686600081811061221257fe5b905060200201356001600160a01b03166001600160a01b03161461227d576040805162461bcd60e51b815260206004820152601860248201527f48646578526f757465723a20494e56414c49445f504154480000000000000000604482015290519081900360640190fd5b6122db7f00000000000000000000000000000000000000000000000000000000000000008888888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061348992505050565b915034826000815181106122eb57fe5b602002602001015111156123305760405162461bcd60e51b8152600401808060200182810382526022815260200180614c656022913960400191505060405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db08360008151811061236c57fe5b60200260200101516040518263ffffffff1660e01b81526004016000604051808303818588803b15801561239f57600080fd5b505af11580156123b3573d6000803e3d6000fd5b50505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb6124187f00000000000000000000000000000000000000000000000000000000000000008989600081811061103157fe5b8460008151811061242557fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561247c57600080fd5b505af1158015612490573d6000803e3d6000fd5b505050506040513d60208110156124a657600080fd5b50516124ae57fe5b6124ed82878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250613e2c915050565b816000815181106124fa57fe5b602002602001015134111561252957612529338360008151811061251a57fe5b60200260200101513403613c02565b5095945050505050565b6000610db6848484614715565b6060814281101561258e576040805162461bcd60e51b81526020600482015260136024820152721219195e149bdd5d195c8e8811561412549151606a1b604482015290519081900360640190fd5b6125ec7f00000000000000000000000000000000000000000000000000000000000000008988888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061348992505050565b915086826000815181106125fc57fe5b602002602001015111156114285760405162461bcd60e51b8152600401808060200182810382526022815260200180614c656022913960400191505060405180910390fd5b6000546001600160a01b031690565b804281101561269c576040805162461bcd60e51b81526020600482015260136024820152721219195e149bdd5d195c8e8811561412549151606a1b604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316858560008181106126d357fe5b905060200201356001600160a01b03166001600160a01b03161461273e576040805162461bcd60e51b815260206004820152601860248201527f48646578526f757465723a20494e56414c49445f504154480000000000000000604482015290519081900360640190fd5b60003490507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561279e57600080fd5b505af11580156127b2573d6000803e3d6000fd5b50505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb6128177f00000000000000000000000000000000000000000000000000000000000000008989600081811061103157fe5b836040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561286757600080fd5b505af115801561287b573d6000803e3d6000fd5b505050506040513d602081101561289157600080fd5b505161289957fe5b6000868660001981018181106128ab57fe5b905060200201356001600160a01b03166001600160a01b03166370a08231866040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561291057600080fd5b505afa158015612924573d6000803e3d6000fd5b505050506040513d602081101561293a57600080fd5b5051604080516020898102828101820190935289825292935061297c9290918a918a918291850190849080828437600092019190915250899250613820915050565b87611d71828989600019810181811061299157fe5b905060200201356001600160a01b03166001600160a01b03166370a08231896040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015611d3957600080fd5b6000610db6848484614805565b6000808242811015612a52576040805162461bcd60e51b81526020600482015260136024820152721219195e149bdd5d195c8e8811561412549151606a1b604482015290519081900360640190fd5b612a81897f00000000000000000000000000000000000000000000000000000000000000008a8a8a308a612b25565b9093509150612a9189868561410b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632e1a7d4d836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015612af757600080fd5b505af1158015612b0b573d6000803e3d6000fd5b50505050612b198583613c02565b50965096945050505050565b6000808242811015612b74576040805162461bcd60e51b81526020600482015260136024820152721219195e149bdd5d195c8e8811561412549151606a1b604482015290519081900360640190fd5b6000612ba17f00000000000000000000000000000000000000000000000000000000000000008c8c6135d6565b604080516323b872dd60e01b81523360048201526001600160a01b03831660248201819052604482018d9052915192935090916323b872dd916064808201926020929091908290030181600087803b158015612bfc57600080fd5b505af1158015612c10573d6000803e3d6000fd5b505050506040513d6020811015612c2657600080fd5b5050604080517f89afcb440000000000000000000000000000000000000000000000000000000081526001600160a01b03888116600483015282516000938493928616926389afcb44926024808301939282900301818787803b158015612c8c57600080fd5b505af1158015612ca0573d6000803e3d6000fd5b505050506040513d6040811015612cb657600080fd5b50805160209091015190925090506000612cd08e8e6148c7565b509050806001600160a01b03168e6001600160a01b031614612cf3578183612cf6565b82825b90975095508a871015612d3a5760405162461bcd60e51b8152600401808060200182810382526021815260200180614b4e6021913960400191505060405180910390fd5b89861015612d795760405162461bcd60e51b8152600401808060200182810382526021815260200180614bec6021913960400191505060405180910390fd5b505050505097509795505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6060610deb7f00000000000000000000000000000000000000000000000000000000000000008484613cf5565b60608142811015612e29576040805162461bcd60e51b81526020600482015260136024820152721219195e149bdd5d195c8e8811561412549151606a1b604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031686866000818110612e6057fe5b905060200201356001600160a01b03166001600160a01b031614612ecb576040805162461bcd60e51b815260206004820152601860248201527f48646578526f757465723a20494e56414c49445f504154480000000000000000604482015290519081900360640190fd5b612f297f000000000000000000000000000000000000000000000000000000000000000034888880806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250613cf592505050565b91508682600184510381518110612f3c57fe5b60200260200101511015612f815760405162461bcd60e51b8152600401808060200182810382526026815260200180614b956026913960400191505060405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db083600081518110612fbd57fe5b60200260200101516040518263ffffffff1660e01b81526004016000604051808303818588803b158015612ff057600080fd5b505af1158015613004573d6000803e3d6000fd5b50505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb6130697f00000000000000000000000000000000000000000000000000000000000000008989600081811061103157fe5b8460008151811061307657fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156130cd57600080fd5b505af11580156130e1573d6000803e3d6000fd5b505050506040513d60208110156130f757600080fd5b50516130ff57fe5b61252982878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250613e2c915050565b6000806000834281101561318f576040805162461bcd60e51b81526020600482015260136024820152721219195e149bdd5d195c8e8811561412549151606a1b604482015290519081900360640190fd5b61319d8c8c8c8c8c8c6142e9565b909450925060006131cf7f00000000000000000000000000000000000000000000000000000000000000008e8e6135d6565b90506131dd8d3383886136ae565b6131e98c3383876136ae565b806001600160a01b0316636a627842886040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050602060405180830381600087803b15801561324157600080fd5b505af1158015613255573d6000803e3d6000fd5b505050506040513d602081101561326b57600080fd5b5051949d939c50939a509198505050505050505050565b61328a61428d565b6000546001600160a01b039081169116146132ec576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166133315760405162461bcd60e51b8152600401808060200182810382526026815260200180614b6f6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b60008084116133d95760405162461bcd60e51b8152600401808060200182810382526026815260200180614c3f6026913960400191505060405180910390fd5b6000831180156133e95750600082115b6134245760405162461bcd60e51b8152600401808060200182810382526023815260200180614c876023913960400191505060405180910390fd5b6000613438856103e563ffffffff6149bb16565b9050600061344c828563ffffffff6149bb16565b9050600061347283613466886103e863ffffffff6149bb16565b9063ffffffff614a2716565b905080828161347d57fe5b04979650505050505050565b60606002825110156134e2576040805162461bcd60e51b815260206004820152601960248201527f486465784c6962726172793a20494e56414c49445f5041544800000000000000604482015290519081900360640190fd5b815167ffffffffffffffff811180156134fa57600080fd5b50604051908082528060200260200182016040528015613524578160200160208202803683370190505b509050828160018351038151811061353857fe5b60209081029190910101528151600019015b80156135ce576000806135878786600186038151811061356657fe5b602002602001015187868151811061357a57fe5b6020026020010151614a7f565b915091506135a984848151811061359a57fe5b60200260200101518383614715565b8460018503815181106135b857fe5b602090810291909101015250506000190161354a565b509392505050565b60008060006135e585856148c7565b604080516bffffffffffffffffffffffff19606094851b811660208084019190915293851b81166034830152825160288184030181526048830184528051908501207fff0000000000000000000000000000000000000000000000000000000000000060688401529a90941b9093166069840152607d8301989098527f1b26148fea939f3c495c48af7be221ecb79391888cd95e6175b4c98bec1c6b5d609d808401919091528851808403909101815260bd909201909752805196019590952095945050505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166323b872dd60e01b17815292518251600094606094938a169392918291908083835b602083106137485780518252601f199092019160209182019101613729565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146137aa576040519150601f19603f3d011682016040523d82523d6000602084013e6137af565b606091505b50915091508180156137dd5750805115806137dd57508080602001905160208110156137da57600080fd5b50515b6138185760405162461bcd60e51b8152600401808060200182810382526031815260200180614bbb6031913960400191505060405180910390fd5b505050505050565b60005b6001835103811015613bfd5760008084838151811061383e57fe5b602002602001015185846001018151811061385557fe5b602002602001015191509150600061386d83836148c7565b509050600061389d7f000000000000000000000000000000000000000000000000000000000000000085856135d6565b9050600080600080846001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b1580156138de57600080fd5b505afa1580156138f2573d6000803e3d6000fd5b505050506040513d606081101561390857600080fd5b5080516020909101516dffffffffffffffffffffffffffff91821693501690506000806001600160a01b038a811690891614613945578284613948565b83835b915091506139a6828b6001600160a01b03166370a082318a6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015611d3957600080fd5b95506139b3868383613399565b6001549095506001600160a01b0316159350613a5e92505050576001546040805163152cf14360e31b81523360048201526001600160a01b0389811660248301528881166044830152606482018590529151919092169163a9678a189160848083019260209291908290030181600087803b158015613a3157600080fd5b505af1158015613a45573d6000803e3d6000fd5b505050506040513d6020811015613a5b57600080fd5b50505b600080856001600160a01b0316886001600160a01b031614613a8257826000613a86565b6000835b91509150600060028c51038a10613a9d578a613ade565b613ade7f0000000000000000000000000000000000000000000000000000000000000000898e8d60020181518110613ad157fe5b60200260200101516135d6565b60408051600080825260208201928390527f022c0d9f00000000000000000000000000000000000000000000000000000000835260248201878152604483018790526001600160a01b038086166064850152608060848501908152845160a48601819052969750908c169563022c0d9f958a958a958a9591949193919260c486019290918190849084905b83811015613b81578181015183820152602001613b69565b50505050905090810190601f168015613bae5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015613bd057600080fd5b505af1158015613be4573d6000803e3d6000fd5b50506001909b019a506138239950505050505050505050565b505050565b604080516000808252602082019092526001600160a01b0384169083906040518082805190602001908083835b60208310613c4e5780518252601f199092019160209182019101613c2f565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613cb0576040519150601f19603f3d011682016040523d82523d6000602084013e613cb5565b606091505b5050905080613bfd5760405162461bcd60e51b8152600401808060200182810382526032815260200180614c0d6032913960400191505060405180910390fd5b6060600282511015613d4e576040805162461bcd60e51b815260206004820152601960248201527f486465784c6962726172793a20494e56414c49445f5041544800000000000000604482015290519081900360640190fd5b815167ffffffffffffffff81118015613d6657600080fd5b50604051908082528060200260200182016040528015613d90578160200160208202803683370190505b5090508281600081518110613da157fe5b60200260200101818152505060005b60018351038110156135ce57600080613de687868581518110613dcf57fe5b602002602001015187866001018151811061357a57fe5b91509150613e08848481518110613df957fe5b60200260200101518383613399565b848460010181518110613e1757fe5b60209081029190910101525050600101613db0565b60005b600183510381101561410557600080848381518110613e4a57fe5b6020026020010151858460010181518110613e6157fe5b6020026020010151915091506000613e7983836148c7565b5090506000878560010181518110613e8d57fe5b60209081029190910101516001549091506001600160a01b031615613f3d576001546040805163152cf14360e31b81523360048201526001600160a01b0387811660248301528681166044830152606482018590529151919092169163a9678a189160848083019260209291908290030181600087803b158015613f1057600080fd5b505af1158015613f24573d6000803e3d6000fd5b505050506040513d6020811015613f3a57600080fd5b50505b600080836001600160a01b0316866001600160a01b031614613f6157826000613f65565b6000835b91509150600060028a51038810613f7c5788613fb0565b613fb07f0000000000000000000000000000000000000000000000000000000000000000878c8b60020181518110613ad157fe5b9050613fdd7f000000000000000000000000000000000000000000000000000000000000000088886135d6565b6001600160a01b031663022c0d9f84848460006040519080825280601f01601f19166020018201604052801561401a576020820181803683370190505b506040518563ffffffff1660e01b815260040180858152602001848152602001836001600160a01b03166001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561408b578181015183820152602001614073565b50505050905090810190601f1680156140b85780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156140da57600080fd5b505af11580156140ee573d6000803e3d6000fd5b505060019099019850613e2f975050505050505050565b50505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000178152925182516000946060949389169392918291908083835b602083106141b65780518252601f199092019160209182019101614197565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614218576040519150601f19603f3d011682016040523d82523d6000602084013e61421d565b606091505b509150915081801561424b57508051158061424b575080806020019051602081101561424857600080fd5b50515b6142865760405162461bcd60e51b815260040180806020018281038252602d815260200180614cd1602d913960400191505060405180910390fd5b5050505050565b3390565b80820382811115610dee576040805162461bcd60e51b815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b604080517fe6a439050000000000000000000000000000000000000000000000000000000081526001600160a01b03888116600483015287811660248301529151600092839283927f00000000000000000000000000000000000000000000000000000000000000009092169163e6a4390591604480820192602092909190829003018186803b15801561437c57600080fd5b505afa158015614390573d6000803e3d6000fd5b505050506040513d60208110156143a657600080fd5b50516001600160a01b031614156145f8577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb5ccc896040518163ffffffff1660e01b815260040160206040518083038186803b15801561441057600080fd5b505afa158015614424573d6000803e3d6000fd5b505050506040513d602081101561443a57600080fd5b50511561453d57604080517f09fd821200000000000000000000000000000000000000000000000000000000815233600482015290516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916309fd8212916024808301926020929190829003018186803b1580156144c057600080fd5b505afa1580156144d4573d6000803e3d6000fd5b505050506040513d60208110156144ea57600080fd5b505161453d576040805162461bcd60e51b815260206004820152601c60248201527f48646578526f757465723a204e4f545f494e5f57484954454c49535400000000604482015290519081900360640190fd5b604080517fc9c653960000000000000000000000000000000000000000000000000000000081526001600160a01b038a81166004830152898116602483015291517f00000000000000000000000000000000000000000000000000000000000000009092169163c9c65396916044808201926020929091908290030181600087803b1580156145cb57600080fd5b505af11580156145df573d6000803e3d6000fd5b505050506040513d60208110156145f557600080fd5b50505b6000806146267f00000000000000000000000000000000000000000000000000000000000000008b8b614a7f565b91509150816000148015614638575080155b1561464857879350869250614708565b6000614655898484614805565b90508781116146a8578581101561469d5760405162461bcd60e51b8152600401808060200182810382526021815260200180614bec6021913960400191505060405180910390fd5b889450925082614706565b60006146b5898486614805565b9050898111156146c157fe5b878110156147005760405162461bcd60e51b8152600401808060200182810382526021815260200180614b4e6021913960400191505060405180910390fd5b94508793505b505b5050965096945050505050565b60008084116147555760405162461bcd60e51b8152600401808060200182810382526027815260200180614caa6027913960400191505060405180910390fd5b6000831180156147655750600082115b6147a05760405162461bcd60e51b8152600401808060200182810382526023815260200180614c876023913960400191505060405180910390fd5b60006147c46103e86147b8868863ffffffff6149bb16565b9063ffffffff6149bb16565b905060006147de6103e56147b8868963ffffffff61429116565b90506147fb60018284816147ee57fe5b049063ffffffff614a2716565b9695505050505050565b600080841161485b576040805162461bcd60e51b815260206004820181905260248201527f486465784c6962726172793a20494e53554646494349454e545f414d4f554e54604482015290519081900360640190fd5b60008311801561486b5750600082115b6148a65760405162461bcd60e51b8152600401808060200182810382526023815260200180614c876023913960400191505060405180910390fd5b826148b7858463ffffffff6149bb16565b816148be57fe5b04949350505050565b600080826001600160a01b0316846001600160a01b03161415614931576040805162461bcd60e51b815260206004820181905260248201527f486465784c6962726172793a204944454e544943414c5f414444524553534553604482015290519081900360640190fd5b826001600160a01b0316846001600160a01b031610614951578284614954565b83835b90925090506001600160a01b0382166149b4576040805162461bcd60e51b815260206004820152601960248201527f486465784c6962726172793a205a45524f5f4144445245535300000000000000604482015290519081900360640190fd5b9250929050565b60008115806149d6575050808202828282816149d357fe5b04145b610dee576040805162461bcd60e51b815260206004820152601460248201527f64732d6d6174682d6d756c2d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b80820182811015610dee576040805162461bcd60e51b815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b6000806000614a8e85856148c7565b509050600080614a9f8888886135d6565b6001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015614ad757600080fd5b505afa158015614aeb573d6000803e3d6000fd5b505050506040513d6060811015614b0157600080fd5b5080516020909101516dffffffffffffffffffffffffffff91821693501690506001600160a01b0387811690841614614b3b578082614b3e565b81815b9099909850965050505050505056fe48646578526f757465723a20494e53554646494349454e545f415f414d4f554e544f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737348646578526f757465723a20494e53554646494349454e545f4f55545055545f414d4f554e545472616e7366657248656c7065723a3a7472616e7366657246726f6d3a207472616e7366657246726f6d206661696c656448646578526f757465723a20494e53554646494349454e545f425f414d4f554e545472616e7366657248656c7065723a3a736166655472616e7366657248543a204854207472616e73666572206661696c6564486465784c6962726172793a20494e53554646494349454e545f494e5055545f414d4f554e5448646578526f757465723a204558434553534956455f494e5055545f414d4f554e54486465784c6962726172793a20494e53554646494349454e545f4c4951554944495459486465784c6962726172793a20494e53554646494349454e545f4f55545055545f414d4f554e545472616e7366657248656c7065723a3a736166655472616e736665723a207472616e73666572206661696c6564a264697066735822122081244628f129f8a6e181f3f1ea4c64b53c68fba7beaa5fbfc5b1bc292793db8864736f6c6343000606003300000000000000000000000013d1ea691c8153f5bc9a491d41b927e2baf8a6b10000000000000000000000005545153ccfca01fbd7dd11c0b23ba694d9509a6f

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

00000000000000000000000013d1ea691c8153f5bc9a491d41b927e2baf8a6b10000000000000000000000005545153ccfca01fbd7dd11c0b23ba694d9509a6f

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000013d1ea691c8153f5bc9a491d41b927e2baf8a6b1
Arg [1] : 0000000000000000000000005545153ccfca01fbd7dd11c0b23ba694d9509a6f


Block Transaction Gas Used Reward
Age Block Fee Address Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading