ETH Price: $3,089.02 (-1.26%)

Contract

0x5e81b946b61F3C7F73Bf84dd961dE3A0A78E8c33
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Approve155016872022-09-09 8:17:08803 days ago1662711428IN
0x5e81b946...0A78E8c33
0 ETH0.000443999.55292673
Approve130287832021-08-15 8:58:011193 days ago1629017881IN
0x5e81b946...0A78E8c33
0 ETH0.0017405137.44899246
Approve128559892021-07-19 8:33:361220 days ago1626683616IN
0x5e81b946...0A78E8c33
0 ETH0.000790117
Approve127357192021-06-30 13:50:071238 days ago1625061007IN
0x5e81b946...0A78E8c33
0 ETH0.0007436316
Approve127257682021-06-29 0:26:551240 days ago1624926415IN
0x5e81b946...0A78E8c33
0 ETH0.0004647710
Approve120349712021-03-14 6:08:561347 days ago1615702136IN
0x5e81b946...0A78E8c33
0 ETH0.0044377100
Approve119235812021-02-25 2:15:021364 days ago1614219302IN
0x5e81b946...0A78E8c33
0 ETH0.0221885500
Approve118559922021-02-14 16:50:401374 days ago1613321440IN
0x5e81b946...0A78E8c33
0 ETH0.00470396106
Approve117510982021-01-29 13:35:101390 days ago1611927310IN
0x5e81b946...0A78E8c33
0 ETH0.00576901130
Approve117082832021-01-22 23:28:151397 days ago1611358095IN
0x5e81b946...0A78E8c33
0 ETH0.0036832983
Approve116954342021-01-20 23:49:511399 days ago1611186591IN
0x5e81b946...0A78E8c33
0 ETH0.0024851156
Approve116804172021-01-18 16:48:531401 days ago1610988533IN
0x5e81b946...0A78E8c33
0 ETH0.0022942951.7
Approve116641132021-01-16 4:27:381404 days ago1610771258IN
0x5e81b946...0A78E8c33
0 ETH0.002307652
Approve116621792021-01-15 21:30:531404 days ago1610746253IN
0x5e81b946...0A78E8c33
0 ETH0.002143448.3
Approve116388262021-01-12 7:33:461408 days ago1610436826IN
0x5e81b946...0A78E8c33
0 ETH0.0022632251.00000145
Approve116360422021-01-11 21:21:241408 days ago1610400084IN
0x5e81b946...0A78E8c33
0 ETH0.004038391
Approve116359992021-01-11 21:10:171408 days ago1610399417IN
0x5e81b946...0A78E8c33
0 ETH0.0030423775
Approve116064842021-01-07 8:33:481413 days ago1610008428IN
0x5e81b946...0A78E8c33
0 ETH0.00452645102
Sync115986032021-01-06 3:36:091414 days ago1609904169IN
0x5e81b946...0A78E8c33
0 ETH0.00730875139
Skim115986022021-01-06 3:35:511414 days ago1609904151IN
0x5e81b946...0A78E8c33
0 ETH0.00890684172
Approve115978772021-01-06 0:37:521414 days ago1609893472IN
0x5e81b946...0A78E8c33
0 ETH0.0042468795.7
Approve115852232021-01-04 2:13:061416 days ago1609726386IN
0x5e81b946...0A78E8c33
0 ETH0.00561369126.50000072
Approve115796502021-01-03 5:45:081417 days ago1609652708IN
0x5e81b946...0A78E8c33
0 ETH0.0039939390
Approve115707492021-01-01 20:57:301418 days ago1609534650IN
0x5e81b946...0A78E8c33
0 ETH0.0010070840
Approve115707452021-01-01 20:56:511418 days ago1609534611IN
0x5e81b946...0A78E8c33
0 ETH0.0017750840
View all transactions

Latest 2 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
113032782020-11-21 19:07:561459 days ago1605985676
0x5e81b946...0A78E8c33
 Contract Creation0 ETH
113032782020-11-21 19:07:561459 days ago1605985676  Contract Creation0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
KingSwapPair

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 10 : KingSwapPair.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity =0.6.12;

import "./KingSwapERC20.sol";
import "./libraries/Math.sol";
import "./libraries/UQ112x112.sol";
import "./interfaces/IERC20.sol";
import "../interfaces/IKingSwapFactory.sol";
import "./interfaces/IKingSwapCallee.sol";
import "../interfaces/IKingSwapPair.sol";
import "./KingSwapSlippageToken.sol";

interface IMigrator {
    // Return the desired amount of liquidity token that the migrator wants.
    function desiredLiquidity() external view returns (uint256);
}

contract KingSwapPair is KingSwapERC20 {
    using SafeMath for uint256;
    using UQ112x112 for uint224;

    uint256 public constant MINIMUM_LIQUIDITY = 10**3;
    bytes4 private constant SELECTOR = bytes4(keccak256(bytes("transfer(address,uint256)")));
    uint256 public constant DECAY_PERIOD = 5 minutes;
    uint256 public constant UQ112 = 2**112;

    address public factory;

    address public token0; // shares single storage slot with lockedIn0
    bool public lockedIn0; // if set, token0 gets locked in the contract

    address public token1;
    bool public lockedIn1;

    KingSwapSlippageToken public stoken;

    uint224 private virtualPrice; // token0 virtual price, uses single storage slot
    uint32 private lastPriceTime; // the latest exchange time

    uint112 private reserve0; // uses single storage slot, accessible via getReserves
    uint112 private reserve1; // uses single storage slot, accessible via getReserves
    uint32 private blockTimestampLast; // uses single storage slot, accessible via getReserves

    uint256 public price0CumulativeLast;
    uint256 public price1CumulativeLast;
    uint256 public kLast; // reserve0 * reserve1, as of immediately after the most recent liquidity event

    uint256 private unlocked = 1;
    modifier lock() {
        require(unlocked == 1, "KingSwap: LOCKED");
        unlocked = 0;
        _;
        unlocked = 1;
    }

    function getReserves() public view returns (uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast) {
        _reserve0 = reserve0;
        _reserve1 = reserve1;
        _blockTimestampLast = blockTimestampLast;
    }

    function getVirtualPrice() public view returns (uint224 _virtualPrice, uint32 _lastPriceTime) {
        _virtualPrice = virtualPrice;
        _lastPriceTime = lastPriceTime;
    }

    function _safeTransfer(address token, address to, uint256 value) private {
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(SELECTOR, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), "KingSwap: TRANSFER_FAILED");
    }

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

    constructor() public {
        factory = msg.sender;
    }

    // called once by the factory at time of deployment
    function initialize(address _token0, address _token1) external {
        require(msg.sender == factory, "KingSwap: FORBIDDEN"); // sufficient check
        token0 = _token0;
        token1 = _token1;
        stoken = new KingSwapSlippageToken(0);
    }

    function lockIn(bool _lockedIn0, bool _lockedIn1) external {
        require(msg.sender == factory, "KingSwap: FORBIDDEN");
        lockedIn0 = _lockedIn0;
        lockedIn1 = _lockedIn1;
        emit Lock(lockedIn0, lockedIn1);
    }

    // update reserves and, on the first call per block, price accumulators
    function _update(uint256 balance0, uint256 balance1, uint112 _reserve0, uint112 _reserve1) private {
        require(balance0 <= uint112(-1) && balance1 <= uint112(-1), "KingSwap: OVERFLOW");
        uint32 blockTimestamp = uint32(block.timestamp % 2**32);
        uint32 timeElapsed = blockTimestamp - blockTimestampLast; // overflow is desired
        if (timeElapsed > 0 && _reserve0 != 0 && _reserve1 != 0) {
            // * never overflows, and + overflow is desired
            price0CumulativeLast += uint256(UQ112x112.encode(_reserve1).uqdiv(_reserve0)) * timeElapsed;
            price1CumulativeLast += uint256(UQ112x112.encode(_reserve0).uqdiv(_reserve1)) * timeElapsed;
        }
        reserve0 = uint112(balance0);
        reserve1 = uint112(balance1);
        blockTimestampLast = blockTimestamp;
        emit Sync(reserve0, reserve1);
    }

    // if fee is on, mint liquidity equivalent to 1/5th of the growth in sqrt(k)
    function _mintFee(uint112 _reserve0, uint112 _reserve1) private returns (bool feeOn) {
        address feeTo = IKingSwapFactory(factory).feeTo();
        feeOn = feeTo != address(0);
        uint256 _kLast = kLast; // gas savings
        if (feeOn) {
            if (_kLast != 0) {
                uint256 rootK = Math.sqrt(uint256(_reserve0).mul(_reserve1));
                uint256 rootKLast = Math.sqrt(_kLast);
                if (rootK > rootKLast) {
                    uint256 numerator = totalSupply.mul(rootK.sub(rootKLast));
                    uint256 denominator = rootK.mul(4).add(rootKLast);
                    uint256 liquidity = numerator / denominator;
                    if (liquidity > 0) _mint(feeTo, liquidity);
                }
            }
        } else if (_kLast != 0) {
            kLast = 0;
        }
    }

    // this low-level function should be called from a contract which performs important safety checks
    function mint(address to) external lock returns (uint256 liquidity) {
        (uint112 _reserve0, uint112 _reserve1,) = getReserves(); // gas savings
        uint balance0 = IERC20(token0).balanceOf(address(this));
        uint balance1 = IERC20(token1).balanceOf(address(this));
        uint amount0 = balance0.sub(_reserve0);
        uint amount1 = balance1.sub(_reserve1);

        bool feeOn = _mintFee(_reserve0, _reserve1);
        uint _totalSupply = totalSupply; // gas savings, must be defined here since totalSupply can update in _mintFee
        if (_totalSupply == 0) {
            address migrator = IKingSwapFactory(factory).migrator();
            if (msg.sender == migrator) {
                liquidity = IMigrator(migrator).desiredLiquidity();
                require(liquidity > 0 && liquidity != uint256(-1), "KingSwap: Bad desired liquidity");
            } else {
                require(migrator == address(0), "KingSwap: Must not have migrator");
                liquidity = Math.sqrt(amount0.mul(amount1)).sub(MINIMUM_LIQUIDITY);
                _mint(address(0), MINIMUM_LIQUIDITY); // permanently lock the first MINIMUM_LIQUIDITY tokens
            }
        } else {
            liquidity = Math.min(amount0.mul(_totalSupply) / _reserve0, amount1.mul(_totalSupply) / _reserve1);
        }
        require(liquidity > 0, "KingSwap: INSUFFICIENT_LIQUIDITY_MINTED");
        _mint(to, liquidity);

        _update(balance0, balance1, _reserve0, _reserve1);
        if (feeOn) kLast = uint(reserve0).mul(reserve1); // reserve0 and reserve1 are up-to-date
        emit Mint(msg.sender, amount0, amount1);
    }

    // this low-level function should be called from a contract which performs important safety checks
    function burn(address to) external lock returns (uint256 amount0, uint256 amount1) {
        (uint112 _reserve0, uint112 _reserve1, ) = getReserves(); // gas savings
        address _token0 = token0; // gas savings
        address _token1 = token1; // gas savings
        uint256 balance0 = IERC20(_token0).balanceOf(address(this));
        uint256 balance1 = IERC20(_token1).balanceOf(address(this));

        bool feeOn = _mintFee(_reserve0, _reserve1);
        {
            uint256 liquidity = balanceOf[address(this)];
            uint256 _totalSupply = totalSupply; // gas savings, must be defined here since totalSupply can update in _mintFee
            amount0 = liquidity.mul(balance0) / _totalSupply; // using balances ensures pro-rata distribution
            amount1 = liquidity.mul(balance1) / _totalSupply; // using balances ensures pro-rata distribution
            require(amount0 > 0 && amount1 > 0, "KingSwap: INSUFFICIENT_LIQUIDITY_BURNED");
            _burn(address(this), liquidity);
        }
        _safeTransfer(_token0, to, amount0);
        _safeTransfer(_token1, to, amount1);
        balance0 = IERC20(_token0).balanceOf(address(this));
        balance1 = IERC20(_token1).balanceOf(address(this));

        _update(balance0, balance1, _reserve0, _reserve1);
        if (feeOn) kLast = uint256(reserve0).mul(reserve1); // reserve0 and reserve1 are up-to-date
        emit Burn(msg.sender, amount0, amount1, to);
    }

    function _updateVirtualPrice(uint112 _reserve0, uint112 _reserve1) internal {
        (uint256 _virtualPrice, uint32 _lastPriceTime) = getVirtualPrice();
        uint32 blockTimestamp = uint32(block.timestamp % 2**32);
        if (_lastPriceTime < blockTimestamp) {
            uint256 currentPrice = uint256(UQ112x112.encode(_reserve1).uqdiv(_reserve0));
            uint256 timePassed = Math.min(DECAY_PERIOD, block.timestamp.sub(_lastPriceTime));
            uint256 timeRemain = DECAY_PERIOD.sub(timePassed);
            uint256 price = _virtualPrice.mul(timeRemain).add(currentPrice.mul(timePassed)) / (DECAY_PERIOD);
            virtualPrice = uint224(price);
            lastPriceTime = blockTimestamp;
        }
    }

    // this low-level function should be called from a contract which performs important safety checks
    function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data) external lock {
        require(amount0Out > 0 || amount1Out > 0, "KingSwap: INSUFFICIENT_OUTPUT_AMOUNT");
        (uint112 _reserve0, uint112 _reserve1, ) = getReserves(); // gas savings
        require(amount0Out < _reserve0 && amount1Out < _reserve1, "KingSwap: INSUFFICIENT_LIQUIDITY");

        uint256 balance0;
        uint256 balance1;
        {
            // scope for _token{0,1} and _lockedIn{0,1}, avoids stack too deep errors
            (address _token0, bool _lockedIn0) = _getTokenAndLocks0();  // gas savings
            (address _token1, bool _lockedIn1) = _getTokenAndLocks1();
            require(to != _token0 && to != _token1, "KingSwap: INVALID_TO");

            // revert if a token is locked in the contract
            require(
                (!_lockedIn0 || amount0Out == 0) && (!_lockedIn1 || amount1Out == 0),
                "KingSwap: TOKEN_LOCKED_IN"
            );

            if (amount0Out > 0) _safeTransfer(_token0, to, amount0Out); // optimistically transfer tokens
            if (amount1Out > 0) _safeTransfer(_token1, to, amount1Out); // optimistically transfer tokens
            if (data.length > 0) IKingSwapCallee(to).KingSwapCall(msg.sender, amount0Out, amount1Out, data);
            balance0 = IERC20(_token0).balanceOf(address(this));
            balance1 = IERC20(_token1).balanceOf(address(this));
        }
        uint256 amount0In = balance0 > _reserve0 - amount0Out ? balance0 - (_reserve0 - amount0Out) : 0;
        uint256 amount1In = balance1 > _reserve1 - amount1Out ? balance1 - (_reserve1 - amount1Out) : 0;
        require(amount0In > 0 || amount1In > 0, "KingSwap: INSUFFICIENT_INPUT_AMOUNT");
        {
            // scope for reserve{0,1}Adjusted, avoids stack too deep errors
            uint256 balance0Adjusted = balance0.mul(1000);
            if (amount0In != 0) balance0Adjusted = balance0Adjusted.sub(amount0In.mul(25)/10);
            uint256 balance1Adjusted = balance1.mul(1000);
            if (amount1In != 0) balance1Adjusted = balance1Adjusted.sub(amount1In.mul(25)/10);
            require(
                balance0Adjusted.mul(balance1Adjusted) >= uint256(_reserve0).mul(_reserve1).mul(1000**2),
                "KingSwap: K"
            );
        }

        _updateVirtualPrice(_reserve0, _reserve1);
        _update(balance0, balance1, _reserve0, _reserve1);

        emit Swap(msg.sender, amount0In, amount1In, amount0Out, amount1Out, to);
    }

    function _getTokenAndLocks0() private view returns (address, bool) {
        return (token0, lockedIn0);
    }

    function _getTokenAndLocks1() private view returns (address, bool) {
        return (token1, lockedIn1);
    }

    function _getToken0MarketPrice() internal view returns (uint256 price) {
        (uint256 _virtualPrice, uint32 _lastPriceTime) = getVirtualPrice();
        (uint112 _reserve0, uint112 _reserve1, ) = getReserves();
        uint256 currentPrice = uint256(UQ112x112.encode(_reserve1).uqdiv(_reserve0));
        uint256 timePassed = Math.min(DECAY_PERIOD, block.timestamp.sub(_lastPriceTime));
        uint256 timeRemain = DECAY_PERIOD.sub(timePassed);
        price = _virtualPrice.mul(timeRemain).add(currentPrice.mul(timePassed)) / (DECAY_PERIOD);
    }

    function getTokenMarketPrice(address token) external view returns (uint256 price) {
        uint256 t0Price = _getToken0MarketPrice();
        token == token0 ? price = t0Price : price = UQ112.mul(UQ112) / t0Price;
    }

    function _getAmountOut(address token, uint256 amountIn, uint256 t0Price) internal view returns (uint256 _out) {
        uint256 amountInWithFee = amountIn.mul(9975);
        if (token == token0) {
            uint256 numerator = amountInWithFee.mul(t0Price);
            uint256 denominator = UQ112.mul(10000);
            _out = numerator / denominator;
        } else {
            uint256 numerator = amountInWithFee.mul(UQ112);
            uint256 denominator = t0Price.mul(10000);
            _out = numerator / denominator;
        }
    }

    function _getAmountIn(address token, uint256 amountOut, uint256 t0Price) internal view returns (uint256 _in) {
        if (token == token0) {
            uint256 numerator = amountOut.mul(10000).mul(t0Price);
            uint256 denominator = UQ112.mul(9975);
            _in = numerator / denominator;
        } else {
            uint256 numerator = amountOut.mul(10000).mul(UQ112);
            uint256 denominator = t0Price.mul(9975);
            _in = numerator / denominator;
        }
    }

    function getAmountOutMarket(address token, uint256 amountIn) public view returns (uint256 _out, uint256 t0Price) {
        t0Price = _getToken0MarketPrice();
        _out = _getAmountOut(token, amountIn, t0Price);
    }

    function getAmountInMarket(address token, uint256 amountOut) public view returns (uint256 _in, uint256 t0Price) {
        t0Price = _getToken0MarketPrice();
        _in = _getAmountIn(token, amountOut, t0Price);
    }

    function getAmountOutPool(address token, uint256 amountIn) public view returns (uint256 _out, uint256 t0Price) {
        (uint112 _reserve0, uint112 _reserve1, ) = getReserves();
        t0Price = uint256(UQ112x112.encode(_reserve1).uqdiv(_reserve0));
        _out = _getAmountOut(token, amountIn, t0Price);
    }

    function getAmountInPool(address token, uint256 amountOut) public view returns (uint256 _in, uint256 t0Price) {
        (uint112 _reserve0, uint112 _reserve1, ) = getReserves();
        t0Price = uint256(UQ112x112.encode(_reserve1).uqdiv(_reserve0));
        _in = _getAmountIn(token, amountOut, t0Price);
    }

    function getAmountOutReal(uint256 amountIn, uint256 _reserveIn, uint256 _reserveOut) internal pure returns (uint256 _out) {
        uint256 amountInWithFee = amountIn.mul(9975);
        uint256 numerator = amountInWithFee.mul(_reserveOut);
        uint256 denominator = _reserveIn.mul(10000).add(amountInWithFee);
        _out = numerator / denominator;
    }

    function getAmountInReal(uint256 amountOut, uint256 _reserveIn, uint256 _reserveOut) internal pure returns (uint256 _in) {
        uint256 numerator = _reserveIn.mul(amountOut).mul(10000);
        uint256 denominator = _reserveOut.sub(amountOut).mul(9975);
        _in = (numerator / denominator).add(1);
    }

    function getAmountOutFinal(address token, uint256 amountIn) external view returns (uint256 amountOut, uint256 stokenAmount) {
        address _token0 = token0;
        (uint112 _reserve0, uint112 _reserve1, ) = getReserves(); // gas savings
        (uint256 _reserveIn, uint256 _reserveOut) = token == _token0 ? (_reserve0, _reserve1) : (_reserve1, _reserve0);

        uint256 amountOutReal = getAmountOutReal(amountIn, _reserveIn, _reserveOut);
        (uint256 amountOutMarket, ) = getAmountOutMarket(token, amountIn);
        amountOut = amountOutReal;

        // arbitrager
        if (amountOutReal > amountOutMarket) {
            uint256 slippage = amountOutReal.sub(amountOutMarket);
            uint256 halfSlippage = slippage / 2;
            amountOut = amountOutReal.sub(halfSlippage);
        }

        (uint256 amountOutPool, uint256 t0Price) = getAmountOutPool(token, amountIn);
        uint256 slippage = amountOutPool.sub(amountOutReal);
        stokenAmount = token == _token0 ? slippage : slippage.mul(t0Price) / UQ112;
    }

    function getAmountInFinal(address token, uint256 amountOut) external view returns (uint256 amountIn, uint256 stokenAmount) {
        address _token0 = token0;
        (uint112 _reserve0, uint112 _reserve1, ) = getReserves(); // gas savings
        (uint256 _reserveIn, uint256 _reserveOut) = token == _token0 ? (_reserve1, _reserve0) : (_reserve0, _reserve1);

        uint256 amountInReal = getAmountInReal(amountOut, _reserveIn, _reserveOut);
        (uint256 amountInMarket, ) = getAmountInMarket(token, amountOut);
        amountIn = amountInReal;

        // arbitrager
        if (amountInReal < amountInMarket) {
            uint256 slippage = amountInMarket.sub(amountInReal);
            uint256 extra = slippage / 2;
            amountIn = amountInReal.add(extra);
        }

        (uint256 amountInPool, uint256 t0Price) = getAmountInPool(token, amountOut);
        uint256 slippage = amountInReal.sub(amountInPool);
        stokenAmount = token == _token0 ? slippage : slippage.mul(t0Price) / UQ112;
    }

    function dealSlippageWithIn(address[] calldata path, uint256 amountIn, address to, bool ifmint) external lock returns (uint256 amountOut) {
        require(path.length == 2, "KingSwap: INVALID_PATH");
        address _token0 = token0;
        uint256 amountOutReal;
        uint256 amountOutMarket;

        // avoids stack too deep errors
        {
            (uint112 _reserve0, uint112 _reserve1, ) = getReserves(); // gas savings
            (uint256 _reserveIn, uint256 _reserveOut) = path[0] == _token0
                ? (_reserve0, _reserve1)
                : (_reserve1, _reserve0);
            amountOutReal = getAmountOutReal(amountIn, _reserveIn, _reserveOut);
            amountOut = amountOutReal;
            (amountOutMarket, ) = getAmountOutMarket(path[0], amountIn);
            uint256 balance = IERC20(path[0]).balanceOf(address(this));
            uint256 amount = balance.sub(_reserveIn);
            require(amount >= amountIn, "KingSwap: Invalid Amount");
        }

        // arbitrager
        if (amountOutReal > amountOutMarket) {
            uint256 slippageExtra = amountOutReal.sub(amountOutMarket);
            uint256 halfSlippage = slippageExtra / 2;
            amountOut = amountOutReal.sub(halfSlippage);
        }

        if (ifmint == true) {
            (uint256 amountOutPool, uint256 t0Price) = getAmountOutPool(path[0], amountIn);
            uint256 slippage = amountOutPool.sub(amountOutReal);
            uint256 mintAmount = path[1] == _token0 ? slippage.mul(t0Price) / UQ112 : slippage;
            stoken.mint(to, mintAmount);
        }
    }

    function dealSlippageWithOut(address[] calldata path, uint256 amountOut, address to, bool ifmint) external lock returns (uint256 extra) {
        require(path.length == 2, "KingSwap: INVALID_PATH");
        address _token0 = token0;
        uint256 amountInReal;
        uint256 amountInMarket;

        // avoids stack too deep errors
        {
            (uint112 _reserve0, uint112 _reserve1, ) = getReserves(); // gas savings
            (uint256 _reserveIn, uint256 _reserveOut) = path[0] == _token0
                ? (_reserve0, _reserve1)
                : (_reserve1, _reserve0);
            amountInReal = getAmountInReal(amountOut, _reserveIn, _reserveOut);
            (amountInMarket, ) = getAmountInMarket(path[1], amountOut);
        }

        // arbitrager
        if (amountInReal < amountInMarket) {
            uint256 slippageExtra = amountInMarket.sub(amountInReal);
            extra = slippageExtra / 2;
        }

        if (ifmint == true) {
            (uint256 amountInPool, uint256 t0Price) = getAmountInPool(path[1], amountOut);
            uint256 slippage = amountInReal.sub(amountInPool);
            uint256 mintAmount = path[0] == _token0 ? slippage.mul(t0Price) / UQ112 : slippage;
            stoken.mint(to, mintAmount);
        }
    }

    // force balances to match reserves
    function skim(address to) external lock {
        address _token0 = token0; // gas savings
        address _token1 = token1; // gas savings
        _safeTransfer(_token0, to, IERC20(_token0).balanceOf(address(this)).sub(reserve0));
        _safeTransfer(_token1, to, IERC20(_token1).balanceOf(address(this)).sub(reserve1));
    }

    // force reserves to match balances
    function sync() external lock {
        _update(IERC20(token0).balanceOf(address(this)), IERC20(token1).balanceOf(address(this)), reserve0, reserve1);
    }
}

File 2 of 10 : IKingSwapFactory.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.6.0;

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

    function feeTo() external view returns (address);
    function feeToSetter() external view returns (address);
    function migrator() external view returns (address);

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

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

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

File 3 of 10 : IKingSwapPair.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.6.0;

interface IKingSwapPair {
    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 stoken() 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;
    function dealSlippageWithIn(address[] calldata path, uint amountIn, address to, bool ifmint) external returns (uint amountOut);
    function dealSlippageWithOut(address[] calldata path, uint amountOut, address to, bool ifmint) external returns (uint extra);
    function getAmountOutMarket(address token, uint amountIn) external view returns (uint _out, uint t0Price);
    function getAmountInMarket(address token, uint amountOut) external view returns (uint _in, uint t0Price);
    function getAmountOutFinal(address token, uint256 amountIn) external view returns (uint256 amountOut, uint256 stokenAmount);
    function getAmountInFinal(address token, uint256 amountOut) external view returns (uint256 amountIn, uint256 stokenAmount);
    function getTokenMarketPrice(address token) external view returns (uint price);
}

File 4 of 10 : KingSwapERC20.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity =0.6.12;

import "./libraries/SafeMath.sol";

contract KingSwapERC20 {
    using SafeMath for uint;

    string public constant name = "KingSwap LP Token";
    string public constant symbol = "KLP";
    uint8 public constant decimals = 18;
    uint  public totalSupply;
    mapping(address => uint) public balanceOf;
    mapping(address => mapping(address => uint)) public allowance;

    bytes32 public DOMAIN_SEPARATOR;
    // keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
    bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;
    mapping(address => uint) public nonces;

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

    constructor() public {
        uint chainId;
        assembly {
            chainId := chainid()
        }
        DOMAIN_SEPARATOR = keccak256(
            abi.encode(
                keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
                keccak256(bytes(name)),
                keccak256(bytes("1")),
                chainId,
                address(this)
            )
        );
    }

    function _mint(address to, uint value) internal {
        totalSupply = totalSupply.add(value);
        balanceOf[to] = balanceOf[to].add(value);
        emit Transfer(address(0), to, value);
    }

    function _burn(address from, uint value) internal {
        balanceOf[from] = balanceOf[from].sub(value);
        totalSupply = totalSupply.sub(value);
        emit Transfer(from, address(0), value);
    }

    function _approve(address owner, address spender, uint value) private {
        allowance[owner][spender] = value;
        emit Approval(owner, spender, value);
    }

    function _transfer(address from, address to, uint value) private {
        balanceOf[from] = balanceOf[from].sub(value);
        balanceOf[to] = balanceOf[to].add(value);
        emit Transfer(from, to, value);
    }

    function approve(address spender, uint value) external returns (bool) {
        _approve(msg.sender, spender, value);
        return true;
    }

    function transfer(address to, uint value) external returns (bool) {
        _transfer(msg.sender, to, value);
        return true;
    }

    function transferFrom(address from, address to, uint value) external returns (bool) {
        if (allowance[from][msg.sender] != uint(-1)) {
            allowance[from][msg.sender] = allowance[from][msg.sender].sub(value);
        }
        _transfer(from, to, value);
        return true;
    }

    function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external {
        require(deadline >= block.timestamp, "KingSwap: EXPIRED");
        bytes32 digest = keccak256(
            abi.encodePacked(
                "\x19\x01",
                DOMAIN_SEPARATOR,
                keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline))
            )
        );
        address recoveredAddress = ecrecover(digest, v, r, s);
        require(recoveredAddress != address(0) && recoveredAddress == owner, "KingSwap: INVALID_SIGNATURE");
        _approve(owner, spender, value);
    }
}

File 5 of 10 : KingSwapSlippageToken.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity =0.6.12;

import "./libraries/SafeMath.sol";

contract KingSwapSlippageToken {
    using SafeMath for uint;

    string public constant name = "KingSwap Slippage Token";
    string public constant symbol = "KST";
    uint8 public constant decimals = 18;
    uint  public totalSupply;
    address private _owner;
    mapping(address => uint) public balanceOf;
    mapping(address => mapping(address => uint)) public allowance;

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

    modifier onlyOwner() {
        require(_owner == msg.sender, "SlippageToken: Not Owner");
        _;
    }

    constructor(uint initialSupply) public {
        _owner = msg.sender;
        _mint(msg.sender, initialSupply);
    }

    function _mint(address to, uint value) internal {
        totalSupply = totalSupply.add(value);
        balanceOf[to] = balanceOf[to].add(value);
        emit Transfer(address(0), to, value);
    }

    function _burn(address from, uint value) internal {
        balanceOf[from] = balanceOf[from].sub(value);
        totalSupply = totalSupply.sub(value);
        emit Transfer(from, address(0), value);
    }

    function _approve(address owner, address spender, uint value) private {
        allowance[owner][spender] = value;
        emit Approval(owner, spender, value);
    }

    function _transfer(address from, address to, uint value) private {
        balanceOf[from] = balanceOf[from].sub(value);
        balanceOf[to] = balanceOf[to].add(value);
        emit Transfer(from, to, value);
    }

    function approve(address spender, uint value) external returns (bool) {
        _approve(msg.sender, spender, value);
        return true;
    }

    function transfer(address to, uint value) external returns (bool) {
        _transfer(msg.sender, to, value);
        return true;
    }

    function transferFrom(address from, address to, uint value) external returns (bool) {
        if (allowance[from][msg.sender] != uint(-1)) {
            allowance[from][msg.sender] = allowance[from][msg.sender].sub(value);
        }
        _transfer(from, to, value);
        return true;
    }

    function mint(address to, uint value) external onlyOwner returns (bool) {
        _mint(to, value);
        return true;
    }

    function burn(address from, uint value) external onlyOwner returns (bool) {
        _burn(from, value);
        return true;
    }
}

File 6 of 10 : IERC20.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.6.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);
    function mint(address to, uint value) external returns (bool);
    function burn(address from, uint value) external returns (bool);
}

File 7 of 10 : IKingSwapCallee.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.6.0;

interface IKingSwapCallee {
    function KingSwapCall(address sender, uint amount0, uint amount1, bytes calldata data) external;
}

File 8 of 10 : Math.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity =0.6.12;

// a library for performing various math operations

library Math {
    function min(uint x, uint y) internal pure returns (uint z) {
        z = x < y ? x : y;
    }

    // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
    function sqrt(uint y) internal pure returns (uint z) {
        if (y > 3) {
            z = y;
            uint x = y / 2 + 1;
            while (x < z) {
                z = x;
                x = (y / x + x) / 2;
            }
        } else if (y != 0) {
            z = 1;
        }
    }
}

File 9 of 10 : SafeMath.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity =0.6.12;

// 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 10 of 10 : UQ112x112.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity =0.6.12;

// a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format))

// range: [0, 2**112 - 1]
// resolution: 1 / 2**112

library UQ112x112 {
    uint224 constant Q112 = 2**112;

    // encode a uint112 as a UQ112x112
    function encode(uint112 y) internal pure returns (uint224 z) {
        z = uint224(y) * Q112; // never overflows
    }

    // divide a UQ112x112 by a uint112, returning a UQ112x112
    function uqdiv(uint224 x, uint112 y) internal pure returns (uint224 z) {
        z = x / uint224(y);
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"lockedIn0","type":"bool"},{"indexed":false,"internalType":"bool","name":"lockedIn1","type":"bool"}],"name":"Lock","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount0Out","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1Out","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Swap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint112","name":"reserve0","type":"uint112"},{"indexed":false,"internalType":"uint112","name":"reserve1","type":"uint112"}],"name":"Sync","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DECAY_PERIOD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINIMUM_LIQUIDITY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UQ112","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"burn","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bool","name":"ifmint","type":"bool"}],"name":"dealSlippageWithIn","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bool","name":"ifmint","type":"bool"}],"name":"dealSlippageWithOut","outputs":[{"internalType":"uint256","name":"extra","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountOut","type":"uint256"}],"name":"getAmountInFinal","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"stokenAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountOut","type":"uint256"}],"name":"getAmountInMarket","outputs":[{"internalType":"uint256","name":"_in","type":"uint256"},{"internalType":"uint256","name":"t0Price","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountOut","type":"uint256"}],"name":"getAmountInPool","outputs":[{"internalType":"uint256","name":"_in","type":"uint256"},{"internalType":"uint256","name":"t0Price","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"getAmountOutFinal","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"stokenAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"getAmountOutMarket","outputs":[{"internalType":"uint256","name":"_out","type":"uint256"},{"internalType":"uint256","name":"t0Price","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"getAmountOutPool","outputs":[{"internalType":"uint256","name":"_out","type":"uint256"},{"internalType":"uint256","name":"t0Price","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReserves","outputs":[{"internalType":"uint112","name":"_reserve0","type":"uint112"},{"internalType":"uint112","name":"_reserve1","type":"uint112"},{"internalType":"uint32","name":"_blockTimestampLast","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getTokenMarketPrice","outputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getVirtualPrice","outputs":[{"internalType":"uint224","name":"_virtualPrice","type":"uint224"},{"internalType":"uint32","name":"_lastPriceTime","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token0","type":"address"},{"internalType":"address","name":"_token1","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"kLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_lockedIn0","type":"bool"},{"internalType":"bool","name":"_lockedIn1","type":"bool"}],"name":"lockIn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockedIn0","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockedIn1","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"liquidity","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"price0CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price1CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"skim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stoken","outputs":[{"internalType":"contract KingSwapSlippageToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount0Out","type":"uint256"},{"internalType":"uint256","name":"amount1Out","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"swap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sync","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token0","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token1","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]

60806040526001600e5534801561001557600080fd5b50604080518082018252601181527025b4b733a9bbb0b8102628102a37b5b2b760791b6020918201528151808301835260018152603160f81b9082015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818301527fb78f0e378bfd4e6e6e81f188b455ad11ba53f801c102459ee93f7a935435948b818401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a0808301919091528351808303909101815260c09091019092528151910120600355600580546001600160a01b031916331790556140b48061010f6000396000f3fe60806040523480156200001157600080fd5b5060043610620002a45760003560e01c80636ccc7e421162000171578063ad77a9b811620000d5578063d4b32b501162000093578063d4b32b501462000895578063d505accf1462000920578063dd62ed3e1462000974578063dd653d1914620009a5578063e25aa5fa14620009af578063fff6cae914620009e157620002a4565b8063ad77a9b8146200081f578063ba9a7a56146200084e578063bc25cf771462000858578063c45a01551462000881578063d21220a7146200088b57620002a4565b8063855e89f5116200012f578063855e89f5146200075b57806389afcb44146200078457806395d89b4114620007ad57806397026e5f14620007b7578063a6cfbca414620007c1578063a9059cbb14620007f057620002a4565b80636ccc7e4214620006c657806370a0823114620006d05780637464fc3d14620006f957806374b0866414620007035780637ecebe00146200073257620002a4565b80632fdc37b31162000219578063485cc95511620001d7578063485cc95514620006245780635909c0d514620006555780635a3d5493146200065f57806364cae6b2146200066957806366efa63514620006935780636a627842146200069d57620002a4565b80632fdc37b3146200059257806330adf81f14620005c1578063313ce56714620005cb57806334d6664a14620005eb5780633644e515146200061a57620002a4565b806318160ddd116200026757806318160ddd14620004605780631e9d4904146200047c57806323b872dd1462000486578063268d67db14620004bf5780632fb62a47146200050757620002a4565b8063022c0d9f14620002a957806306fdde03146200033b5780630902f1ac14620003bd578063095ea7b314620003f75780630dfe1681146200043a575b600080fd5b6200033960048036036080811015620002c157600080fd5b8135916020810135916001600160a01b036040830135169190810190608081016060820135600160201b811115620002f857600080fd5b8201836020820111156200030b57600080fd5b803590602001918460018302840111600160201b831117156200032d57600080fd5b509092509050620009eb565b005b6200034562001004565b6040805160208082528351818301528351919283929083019185019080838360005b838110156200038157818101518382015260200162000367565b50505050905090810190601f168015620003af5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b620003c762001031565b604080516001600160701b03948516815292909316602083015263ffffffff168183015290519081900360600190f35b62000426600480360360408110156200040f57600080fd5b506001600160a01b0381351690602001356200105b565b604080519115158252519081900360200190f35b6200044462001074565b604080516001600160a01b039092168252519081900360200190f35b6200046a62001083565b60408051918252519081900360200190f35b6200046a62001089565b62000426600480360360608110156200049e57600080fd5b506001600160a01b038135811691602081013590911690604001356200108f565b620004ee60048036036040811015620004d757600080fd5b506001600160a01b03813516906020013562001129565b6040805192835260208301919091528051918290030190f35b6200046a600480360360808110156200051f57600080fd5b810190602081018135600160201b8111156200053a57600080fd5b8201836020820111156200054d57600080fd5b803590602001918460208302840111600160201b831117156200056f57600080fd5b91935091508035906001600160a01b03602082013516906040013515156200124f565b620004ee60048036036040811015620005aa57600080fd5b506001600160a01b0381351690602001356200150f565b6200046a62001534565b620005d562001558565b6040805160ff9092168252519081900360200190f35b620004ee600480360360408110156200060357600080fd5b506001600160a01b0381351690602001356200155d565b6200046a620015b5565b62000339600480360360408110156200063c57600080fd5b506001600160a01b0381358116916020013516620015bb565b6200046a6200169b565b6200046a620016a1565b62000339600480360360408110156200068157600080fd5b508035151590602001351515620016a7565b620004266200177a565b6200046a60048036036020811015620006b557600080fd5b50356001600160a01b03166200178a565b6200042662001c4f565b6200046a60048036036020811015620006e857600080fd5b50356001600160a01b031662001c5f565b6200046a62001c71565b620004ee600480360360408110156200071b57600080fd5b506001600160a01b03813516906020013562001c77565b6200046a600480360360208110156200074a57600080fd5b50356001600160a01b031662001d4c565b6200046a600480360360208110156200077357600080fd5b50356001600160a01b031662001d5e565b620004ee600480360360208110156200079c57600080fd5b50356001600160a01b031662001db3565b620003456200216c565b620004446200218b565b620004ee60048036036040811015620007d957600080fd5b506001600160a01b0381351690602001356200219a565b62000426600480360360408110156200080857600080fd5b506001600160a01b038135169060200135620021d7565b620004ee600480360360408110156200083757600080fd5b506001600160a01b038135169060200135620021e6565b6200046a62002202565b62000339600480360360208110156200087057600080fd5b50356001600160a01b031662002208565b6200044462002384565b6200044462002393565b6200046a60048036036080811015620008ad57600080fd5b810190602081018135600160201b811115620008c857600080fd5b820183602082011115620008db57600080fd5b803590602001918460208302840111600160201b83111715620008fd57600080fd5b91935091508035906001600160a01b0360208201351690604001351515620023a2565b62000339600480360360e08110156200093857600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c0013562002697565b6200046a600480360360408110156200098c57600080fd5b506001600160a01b03813581169160200135166200289e565b6200046a620028bb565b620009b9620028c3565b604080516001600160e01b03909316835263ffffffff90911660208301528051918290030190f35b62000339620028e2565b600e5460011462000a36576040805162461bcd60e51b815260206004820152601060248201526f12da5b99d4ddd85c0e881313d0d2d15160821b604482015290519081900360640190fd5b6000600e558415158062000a4a5750600084115b62000a875760405162461bcd60e51b8152600401808060200182810382526024815260200180620040116024913960400191505060405180910390fd5b60008062000a9462001031565b5091509150816001600160701b03168710801562000aba5750806001600160701b031686105b62000b0c576040805162461bcd60e51b815260206004820181905260248201527f4b696e67537761703a20494e53554646494349454e545f4c4951554944495459604482015290519081900360640190fd5b60008060008062000b1c62002a4c565b9150915060008062000b2d62002a68565b91509150836001600160a01b03168b6001600160a01b03161415801562000b665750816001600160a01b03168b6001600160a01b031614155b62000baf576040805162461bcd60e51b81526020600482015260146024820152734b696e67537761703a20494e56414c49445f544f60601b604482015290519081900360640190fd5b82158062000bbb57508c155b801562000bcf575080158062000bcf57508b155b62000c21576040805162461bcd60e51b815260206004820152601960248201527f4b696e67537761703a20544f4b454e5f4c4f434b45445f494e00000000000000604482015290519081900360640190fd5b8c1562000c355762000c35848c8f62002a84565b8b1562000c495762000c49828c8e62002a84565b881562000cfe578a6001600160a01b0316638d8adec0338f8f8e8e6040518663ffffffff1660e01b815260040180866001600160a01b03168152602001858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509650505050505050600060405180830381600087803b15801562000ce457600080fd5b505af115801562000cf9573d6000803e3d6000fd5b505050505b604080516370a0823160e01b815230600482015290516001600160a01b038616916370a08231916024808301926020929190829003018186803b15801562000d4557600080fd5b505afa15801562000d5a573d6000803e3d6000fd5b505050506040513d602081101562000d7157600080fd5b5051604080516370a0823160e01b815230600482015290519197506001600160a01b038416916370a0823191602480820192602092909190829003018186803b15801562000dbe57600080fd5b505afa15801562000dd3573d6000803e3d6000fd5b505050506040513d602081101562000dea57600080fd5b50519450600093505050506001600160701b0385168a9003831162000e1157600062000e20565b89856001600160701b03160383035b9050600089856001600160701b031603831162000e3f57600062000e4e565b89856001600160701b03160383035b9050600082118062000e605750600081115b62000e9d5760405162461bcd60e51b8152600401808060200182810382526023815260200180620040356023913960400191505060405180910390fd5b600062000ead856103e862002c26565b9050821562000ede5762000edb600a62000ec985601962002c26565b8162000ed157fe5b8391900462002c8c565b90505b600062000eee856103e862002c26565b9050821562000f0d5762000f0a600a62000ec985601962002c26565b90505b62000f34620f424062000f2d6001600160701b038b8116908b1662002c26565b9062002c26565b62000f40838362002c26565b101562000f82576040805162461bcd60e51b815260206004820152600b60248201526a4b696e67537761703a204b60a81b604482015290519081900360640190fd5b505062000f90868662002cdd565b62000f9e8484888862002de1565b60408051838152602081018390528082018d9052606081018c905290516001600160a01b038b169133917fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229181900360800190a350506001600e55505050505050505050565b6040518060400160405280601181526020017025b4b733a9bbb0b8102628102a37b5b2b760791b81525081565b600a546001600160701b0380821692600160701b830490911691600160e01b900463ffffffff1690565b60006200106a33848462002f9b565b5060015b92915050565b6006546001600160a01b031681565b60005481565b61012c81565b6001600160a01b03831660009081526002602090815260408083203384529091528120546000191462001111576001600160a01b0384166000908152600260209081526040808320338452909152902054620010ec908362002c8c565b6001600160a01b03851660009081526002602090815260408083203384529091529020555b6200111e84848462002ffd565b5060015b9392505050565b60065460009081906001600160a01b031681806200114662001031565b5091509150600080846001600160a01b0316896001600160a01b0316146200117057838362001173565b82845b6001600160701b031691506001600160701b03169150600062001198898484620030af565b90506000620011a88b8b6200150f565b50905081985080821015620011dc576000620011c5828462002c8c565b905060028104620011d7848262003100565b9a5050505b600080620011eb8d8d6200155d565b90925090506000620011fe858462002c8c565b9050896001600160a01b03168e6001600160a01b0316146200123a57600160701b6200122b828462002c26565b816200123357fe5b046200123c565b805b9a50505050505050505050509250929050565b6000600e546001146200129c576040805162461bcd60e51b815260206004820152601060248201526f12da5b99d4ddd85c0e881313d0d2d15160821b604482015290519081900360640190fd5b6000600e5560028514620012f0576040805162461bcd60e51b8152602060048201526016602482015275096d2dccea6eec2e07440929cac82989288bea082a8960531b604482015290519081900360640190fd5b6006546001600160a01b031660008080806200130b62001031565b5091509150600080866001600160a01b03168d8d60008181106200132b57fe5b905060200201356001600160a01b03166001600160a01b0316146200135257828462001355565b83835b6001600160701b031691506001600160701b03169150620013788b8383620030af565b9550620013a38d8d60018181106200138c57fe5b905060200201356001600160a01b03168c6200150f565b509450505050818310159050620013ca576000620013c2828462002c8c565b600290049450505b60018515151415620014fe57600080620014028b8b6001818110620013eb57fe5b905060200201356001600160a01b03168a6200155d565b9092509050600062001415858462002c8c565b90506000866001600160a01b03168d8d60008181106200143157fe5b905060200201356001600160a01b03166001600160a01b03161462001457578162001472565b600160701b62001468838562002c26565b816200147057fe5b045b600854604080516340c10f1960e01b81526001600160a01b038e811660048301526024820185905291519394509116916340c10f19916044808201926020929091908290030181600087803b158015620014cb57600080fd5b505af1158015620014e0573d6000803e3d6000fd5b505050506040513d6020811015620014f757600080fd5b5050505050505b50506001600e555095945050505050565b6000806200151c62003150565b90506200152b84848362003201565b91509250929050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b601281565b6000806000806200156d62001031565b5091509150620015928262001582836200329f565b6001600160e01b031690620032b1565b6001600160e01b03169250620015aa86868562003201565b935050509250929050565b60035481565b6005546001600160a01b0316331462001611576040805162461bcd60e51b815260206004820152601360248201527225b4b733a9bbb0b81d102327a92124a22222a760691b604482015290519081900360640190fd5b600680546001600160a01b038085166001600160a01b03199283161790925560078054928416929091169190911790556040516000906200165290620036a0565b90815260405190819003602001906000f08015801562001676573d6000803e3d6000fd5b50600880546001600160a01b0319166001600160a01b03929092169190911790555050565b600b5481565b600c5481565b6005546001600160a01b03163314620016fd576040805162461bcd60e51b815260206004820152601360248201527225b4b733a9bbb0b81d102327a92124a22222a760691b604482015290519081900360640190fd5b60068054831515600160a01b90810260ff60a01b19928316179283905560078054851515830293169290921791829055604080519382900460ff9081161515855291909204161515602083015280517f1650047c144c73a929c17df9c1cc997ae415e44dc2f7e55440b2a2da74c6e5b79281900390910190a15050565b600654600160a01b900460ff1681565b6000600e54600114620017d7576040805162461bcd60e51b815260206004820152601060248201526f12da5b99d4ddd85c0e881313d0d2d15160821b604482015290519081900360640190fd5b6000600e81905580620017e962001031565b50600654604080516370a0823160e01b815230600482015290519395509193506000926001600160a01b03909116916370a08231916024808301926020929190829003018186803b1580156200183e57600080fd5b505afa15801562001853573d6000803e3d6000fd5b505050506040513d60208110156200186a57600080fd5b5051600754604080516370a0823160e01b815230600482015290519293506000926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015620018be57600080fd5b505afa158015620018d3573d6000803e3d6000fd5b505050506040513d6020811015620018ea57600080fd5b50519050600062001905836001600160701b03871662002c8c565b905060006200191e836001600160701b03871662002c8c565b905060006200192e8787620032d7565b6000549091508062001b2f5760055460408051637cd07e4760e01b815290516000926001600160a01b031691637cd07e47916004808301926020929190829003018186803b1580156200198057600080fd5b505afa15801562001995573d6000803e3d6000fd5b505050506040513d6020811015620019ac57600080fd5b50519050336001600160a01b038216141562001a9657806001600160a01b03166340dc0e376040518163ffffffff1660e01b815260040160206040518083038186803b158015620019fc57600080fd5b505afa15801562001a11573d6000803e3d6000fd5b505050506040513d602081101562001a2857600080fd5b50519950891580159062001a3e57506000198a14155b62001a90576040805162461bcd60e51b815260206004820152601f60248201527f4b696e67537761703a204261642064657369726564206c697175696469747900604482015290519081900360640190fd5b62001b28565b6001600160a01b0381161562001af3576040805162461bcd60e51b815260206004820181905260248201527f4b696e67537761703a204d757374206e6f742068617665206d69677261746f72604482015290519081900360640190fd5b62001b176103e862001b1062001b0a888862002c26565b62003429565b9062002c8c565b995062001b2860006103e862003482565b5062001b7a565b62001b776001600160701b03891662001b49868462002c26565b8162001b5157fe5b046001600160701b03891662001b68868562002c26565b8162001b7057fe5b0462003510565b98505b6000891162001bbb5760405162461bcd60e51b8152600401808060200182810382526027815260200180620040586027913960400191505060405180910390fd5b62001bc78a8a62003482565b62001bd586868a8a62002de1565b811562001c0257600a5462001bfe906001600160701b0380821691600160701b90041662002c26565b600d555b6040805185815260208101859052815133927f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f928290030190a250506001600e5550949695505050505050565b600754600160a01b900460ff1681565b60016020526000908152604090205481565b600d5481565b60065460009081906001600160a01b0316818062001c9462001031565b5091509150600080846001600160a01b0316896001600160a01b03161462001cbe57828462001cc1565b83835b6001600160701b031691506001600160701b03169150600062001ce689848462003528565b9050600062001cf68b8b620021e6565b5090508198508082111562001d2a57600062001d13838362002c8c565b90506002810462001d25848262002c8c565b9a5050505b60008062001d398d8d6200219a565b90925090506000620011fe838662002c8c565b60046020526000908152604090205481565b60008062001d6b62003150565b6006549091506001600160a01b0384811691161462001da7578062001d95600160701b8062002c26565b8162001d9d57fe5b0491508162001dac565b809150815b5050919050565b600080600e5460011462001e01576040805162461bcd60e51b815260206004820152601060248201526f12da5b99d4ddd85c0e881313d0d2d15160821b604482015290519081900360640190fd5b6000600e8190558062001e1362001031565b50600654600754604080516370a0823160e01b815230600482015290519496509294506001600160a01b039182169391169160009184916370a08231916024808301926020929190829003018186803b15801562001e7057600080fd5b505afa15801562001e85573d6000803e3d6000fd5b505050506040513d602081101562001e9c57600080fd5b5051604080516370a0823160e01b815230600482015290519192506000916001600160a01b038516916370a08231916024808301926020929190829003018186803b15801562001eeb57600080fd5b505afa15801562001f00573d6000803e3d6000fd5b505050506040513d602081101562001f1757600080fd5b50519050600062001f298787620032d7565b306000908152600160205260408120549054919250908062001f4c838762002c26565b8162001f5457fe5b049a508062001f64838662002c26565b8162001f6c57fe5b04995060008b11801562001f80575060008a115b62001fbd5760405162461bcd60e51b815260040180806020018281038252602781526020018062003fea6027913960400191505060405180910390fd5b62001fc9308362003578565b505062001fd8858b8b62002a84565b62001fe5848b8a62002a84565b604080516370a0823160e01b815230600482015290516001600160a01b038716916370a08231916024808301926020929190829003018186803b1580156200202c57600080fd5b505afa15801562002041573d6000803e3d6000fd5b505050506040513d60208110156200205857600080fd5b5051604080516370a0823160e01b815230600482015290519194506001600160a01b038616916370a0823191602480820192602092909190829003018186803b158015620020a557600080fd5b505afa158015620020ba573d6000803e3d6000fd5b505050506040513d6020811015620020d157600080fd5b50519150620020e38383898962002de1565b80156200211057600a546200210c906001600160701b0380821691600160701b90041662002c26565b600d555b604080518a8152602081018a905281516001600160a01b038d169233927fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496929081900390910190a3505050505050506001600e81905550915091565b6040518060400160405280600381526020016204b4c560ec1b81525081565b6008546001600160a01b031681565b600080600080620021aa62001031565b5091509150620021bf8262001582836200329f565b6001600160e01b03169250620015aa8686856200360e565b60006200106a33848462002ffd565b600080620021f362003150565b90506200152b8484836200360e565b6103e881565b600e5460011462002253576040805162461bcd60e51b815260206004820152601060248201526f12da5b99d4ddd85c0e881313d0d2d15160821b604482015290519081900360640190fd5b6000600e55600654600754600a54604080516370a0823160e01b815230600482015290516001600160a01b039485169490931692620023039285928792620022fd926001600160701b03169185916370a0823191602480820192602092909190829003018186803b158015620022c857600080fd5b505afa158015620022dd573d6000803e3d6000fd5b505050506040513d6020811015620022f457600080fd5b50519062002c8c565b62002a84565b6200237a8184620022fd600a600e9054906101000a90046001600160701b03166001600160701b0316856001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015620022c857600080fd5b50506001600e5550565b6005546001600160a01b031681565b6007546001600160a01b031681565b6000600e54600114620023ef576040805162461bcd60e51b815260206004820152601060248201526f12da5b99d4ddd85c0e881313d0d2d15160821b604482015290519081900360640190fd5b6000600e556002851462002443576040805162461bcd60e51b8152602060048201526016602482015275096d2dccea6eec2e07440929cac82989288bea082a8960531b604482015290519081900360640190fd5b6006546001600160a01b031660008080806200245e62001031565b5091509150600080866001600160a01b03168d8d60008181106200247e57fe5b905060200201356001600160a01b03166001600160a01b031614620024a5578284620024a8565b83835b6001600160701b031691506001600160701b03169150620024cb8b838362003528565b9550859750620024f98d8d6000818110620024e257fe5b905060200201356001600160a01b03168c620021e6565b50945060008d8d82816200250957fe5b905060200201356001600160a01b03166001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156200256657600080fd5b505afa1580156200257b573d6000803e3d6000fd5b505050506040513d60208110156200259257600080fd5b505190506000620025a4828562002c8c565b90508c811015620025fc576040805162461bcd60e51b815260206004820152601860248201527f4b696e67537761703a20496e76616c696420416d6f756e740000000000000000604482015290519081900360640190fd5b505050505050808211156200263057600062002619838362002c8c565b9050600281046200262b848262002c8c565b955050505b60018515151415620014fe57600080620026688b8b60008181106200265157fe5b905060200201356001600160a01b03168a6200219a565b909250905060006200267b838662002c8c565b90506000866001600160a01b03168d8d60018181106200143157fe5b42841015620026e1576040805162461bcd60e51b815260206004820152601160248201527012da5b99d4ddd85c0e8811561412549151607a1b604482015290519081900360640190fd5b6003546001600160a01b0380891660008181526004602090815260408083208054600180820190925582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98186015280840196909652958d166060860152608085018c905260a085019590955260c08085018b90528151808603909101815260e08501825280519083012061190160f01b6101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff89166101828501526101a284018890526101c28401879052519193926101e280820193601f1981019281900390910190855afa158015620027fd573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590620028345750886001600160a01b0316816001600160a01b0316145b62002886576040805162461bcd60e51b815260206004820152601b60248201527f4b696e67537761703a20494e56414c49445f5349474e41545552450000000000604482015290519081900360640190fd5b6200289389898962002f9b565b505050505050505050565b600260209081526000928352604080842090915290825290205481565b600160701b81565b6009546001600160e01b03811691600160e01b90910463ffffffff1690565b600e546001146200292d576040805162461bcd60e51b815260206004820152601060248201526f12da5b99d4ddd85c0e881313d0d2d15160821b604482015290519081900360640190fd5b6000600e55600654604080516370a0823160e01b8152306004820152905162002a45926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156200298057600080fd5b505afa15801562002995573d6000803e3d6000fd5b505050506040513d6020811015620029ac57600080fd5b5051600754604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015620029fa57600080fd5b505afa15801562002a0f573d6000803e3d6000fd5b505050506040513d602081101562002a2657600080fd5b5051600a546001600160701b0380821691600160701b90041662002de1565b6001600e55565b6006546001600160a01b03811691600160a01b90910460ff1690565b6007546001600160a01b03811691600160a01b90910460ff1690565b604080518082018252601981527f7472616e7366657228616464726573732c75696e74323536290000000000000060209182015281516001600160a01b0385811660248301526044808301869052845180840390910181526064909201845291810180516001600160e01b031663a9059cbb60e01b1781529251815160009460609489169392918291908083835b6020831062002b335780518252601f19909201916020918201910162002b12565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811462002b97576040519150601f19603f3d011682016040523d82523d6000602084013e62002b9c565b606091505b509150915081801562002bcd57508051158062002bcd575080806020019051602081101562002bca57600080fd5b50515b62002c1f576040805162461bcd60e51b815260206004820152601960248201527f4b696e67537761703a205452414e534645525f4641494c454400000000000000604482015290519081900360640190fd5b5050505050565b600081158062002c435750508082028282828162002c4057fe5b04145b6200106e576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6d756c2d6f766572666c6f7760601b604482015290519081900360640190fd5b808203828111156200106e576040805162461bcd60e51b815260206004820152601560248201527464732d6d6174682d7375622d756e646572666c6f7760581b604482015290519081900360640190fd5b60008062002cea620028c3565b91506001600160e01b031691506000600160201b428162002d0757fe5b0690508063ffffffff168263ffffffff16101562002c1f57600062002d318662001582876200329f565b6001600160e01b03169050600062002d6061012c62002d5a4263ffffffff8089169062002c8c16565b62003510565b9050600062002d7261012c8362002c8c565b9050600061012c62002d9c62002d89868662002c26565b62002d958a8662002c26565b9062003100565b8162002da457fe5b6009805463ffffffff8916600160e01b026001600160e01b039490930484166001600160e01b031990911617909216179055505050505050505050565b6001600160701b03841180159062002e0057506001600160701b038311155b62002e47576040805162461bcd60e51b81526020600482015260126024820152714b696e67537761703a204f564552464c4f5760701b604482015290519081900360640190fd5b600a5463ffffffff42811691600160e01b9004811682039081161580159062002e7857506001600160701b03841615155b801562002e8d57506001600160701b03831615155b1562002ef0578063ffffffff1662002eaa8562001582866200329f565b600b80546001600160e01b03929092169290920201905563ffffffff811662002ed88462001582876200329f565b600c80546001600160e01b0392909216929092020190555b600a80546dffffffffffffffffffffffffffff19166001600160701b03888116919091176dffffffffffffffffffffffffffff60701b1916600160701b8883168102919091176001600160e01b0316600160e01b63ffffffff871602179283905560408051848416815291909304909116602082015281517f1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1929181900390910190a1505050505050565b6001600160a01b03808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b03831660009081526001602052604090205462003022908262002c8c565b6001600160a01b03808516600090815260016020526040808220939093559084168152205462003053908262003100565b6001600160a01b0380841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600080620030c561271062000f2d868862002c26565b90506000620030dc6126f762000f2d868962002c8c565b9050620030f66001828481620030ee57fe5b049062003100565b9695505050505050565b808201828110156200106e576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6164642d6f766572666c6f7760601b604482015290519081900360640190fd5b60008060006200315f620028c3565b91506001600160e01b031691506000806200317962001031565b50915091506000620031908362001582846200329f565b6001600160e01b031690506000620031b961012c62002d5a4263ffffffff808a169062002c8c16565b90506000620031cb61012c8362002c8c565b905061012c620031ec620031e0858562002c26565b62002d958a8562002c26565b81620031f457fe5b0497505050505050505090565b6006546000906001600160a01b03858116911614156200325d576000620032308362000f2d8661271062002c26565b9050600062003246600160701b6126f762002c26565b90508082816200325257fe5b049250505062001122565b600062003276600160701b62000f2d8661271062002c26565b9050600062003288846126f762002c26565b90508082816200329457fe5b049695505050505050565b6001600160701b0316600160701b0290565b60006001600160701b0382166001600160e01b03841681620032cf57fe5b049392505050565b600080600560009054906101000a90046001600160a01b03166001600160a01b031663017e7e586040518163ffffffff1660e01b815260040160206040518083038186803b1580156200332957600080fd5b505afa1580156200333e573d6000803e3d6000fd5b505050506040513d60208110156200335557600080fd5b5051600d546001600160a01b038216158015945091925090620034145780156200340e5760006200339762001b0a6001600160701b0388811690881662002c26565b90506000620033a68362003429565b9050808211156200340b576000620033cd620033c3848462002c8c565b6000549062002c26565b90506000620033e38362002d9586600462002c26565b90506000818381620033f157fe5b0490508015620034075762003407878262003482565b5050505b50505b62003421565b801562003421576000600d555b505092915050565b6000600382111562003472575080600160028204015b818110156200346b578091506002818285816200345857fe5b0401816200346257fe5b0490506200343f565b506200347d565b81156200347d575060015b919050565b60005462003491908262003100565b60009081556001600160a01b038316815260016020526040902054620034b8908262003100565b6001600160a01b03831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600081831062003521578162001122565b5090919050565b60008062003539856126f762002c26565b9050600062003549828562002c26565b90506000620035608362002d958861271062002c26565b90508082816200356c57fe5b04979650505050505050565b6001600160a01b0382166000908152600160205260409020546200359d908262002c8c565b6001600160a01b03831660009081526001602052604081209190915554620035c6908262002c8c565b60009081556040805183815290516001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a35050565b6000806200361f846126f762002c26565b6006549091506001600160a01b03868116911614156200367457600062003647828562002c26565b905060006200365d600160701b61271062002c26565b90508082816200366957fe5b049350505062003698565b60006200368682600160701b62002c26565b90506000620035608561271062002c26565b509392505050565b61093b80620036af8339019056fe608060405234801561001057600080fd5b5060405161093b38038061093b8339818101604052602081101561003357600080fd5b5051600180546001600160a01b03191633908117909155610054908261005a565b5061015a565b610073816000546100fc60201b6104d11790919060201c565b60009081556001600160a01b0383168152600260209081526040909120546100a49183906104d16100fc821b17901c565b6001600160a01b03831660008181526002602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b80820182811015610154576040805162461bcd60e51b815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b92915050565b6107d2806101696000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c806340c10f191161007157806340c10f19146101d957806370a082311461020557806395d89b411461022b5780639dc29fac14610233578063a9059cbb1461025f578063dd62ed3e1461028b576100a9565b806306fdde03146100ae578063095ea7b31461012b57806318160ddd1461016b57806323b872dd14610185578063313ce567146101bb575b600080fd5b6100b66102b9565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100f05781810151838201526020016100d8565b50505050905090810190601f16801561011d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101576004803603604081101561014157600080fd5b506001600160a01b0381351690602001356102f2565b604080519115158252519081900360200190f35b610173610309565b60408051918252519081900360200190f35b6101576004803603606081101561019b57600080fd5b506001600160a01b0381358116916020810135909116906040013561030f565b6101c36103a3565b6040805160ff9092168252519081900360200190f35b610157600480360360408110156101ef57600080fd5b506001600160a01b0381351690602001356103a8565b6101736004803603602081101561021b57600080fd5b50356001600160a01b031661040f565b6100b6610421565b6101576004803603604081101561024957600080fd5b506001600160a01b038135169060200135610440565b6101576004803603604081101561027557600080fd5b506001600160a01b0381351690602001356104a7565b610173600480360360408110156102a157600080fd5b506001600160a01b03813581169160200135166104b4565b6040518060400160405280601781526020017f4b696e675377617020536c69707061676520546f6b656e00000000000000000081525081565b60006102ff338484610520565b5060015b92915050565b60005481565b6001600160a01b03831660009081526003602090815260408083203384529091528120546000191461038e576001600160a01b03841660009081526003602090815260408083203384529091529020546103699083610582565b6001600160a01b03851660009081526003602090815260408083203384529091529020555b6103998484846105d2565b5060019392505050565b601281565b6001546000906001600160a01b03163314610405576040805162461bcd60e51b815260206004820152601860248201527729b634b83830b3b2aa37b5b2b71d102737ba1027bbb732b960411b604482015290519081900360640190fd5b6102ff8383610680565b60026020526000908152604090205481565b6040518060400160405280600381526020016212d4d560ea1b81525081565b6001546000906001600160a01b0316331461049d576040805162461bcd60e51b815260206004820152601860248201527729b634b83830b3b2aa37b5b2b71d102737ba1027bbb732b960411b604482015290519081900360640190fd5b6102ff838361070a565b60006102ff3384846105d2565b600360209081526000928352604080842090915290825290205481565b80820182811015610303576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6164642d6f766572666c6f7760601b604482015290519081900360640190fd5b6001600160a01b03808416600081815260036020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b80820382811115610303576040805162461bcd60e51b815260206004820152601560248201527464732d6d6174682d7375622d756e646572666c6f7760581b604482015290519081900360640190fd5b6001600160a01b0383166000908152600260205260409020546105f59082610582565b6001600160a01b03808516600090815260026020526040808220939093559084168152205461062490826104d1565b6001600160a01b0380841660008181526002602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60005461068d90826104d1565b60009081556001600160a01b0383168152600260205260409020546106b290826104d1565b6001600160a01b03831660008181526002602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b03821660009081526002602052604090205461072d9082610582565b6001600160a01b038316600090815260026020526040812091909155546107549082610582565b60009081556040805183815290516001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a3505056fea2646970667358221220ce98f0b5326c7345c6e150d4f548199fdc6594d8f2c1bd32d456309a6619553264736f6c634300060c00334b696e67537761703a20494e53554646494349454e545f4c49515549444954595f4255524e45444b696e67537761703a20494e53554646494349454e545f4f55545055545f414d4f554e544b696e67537761703a20494e53554646494349454e545f494e5055545f414d4f554e544b696e67537761703a20494e53554646494349454e545f4c49515549444954595f4d494e544544a2646970667358221220a9eacea9d6f63cd77b2afc86a335c8a34359b5f1cc245ab95dc15539a1500aba64736f6c634300060c0033

Deployed Bytecode

0x60806040523480156200001157600080fd5b5060043610620002a45760003560e01c80636ccc7e421162000171578063ad77a9b811620000d5578063d4b32b501162000093578063d4b32b501462000895578063d505accf1462000920578063dd62ed3e1462000974578063dd653d1914620009a5578063e25aa5fa14620009af578063fff6cae914620009e157620002a4565b8063ad77a9b8146200081f578063ba9a7a56146200084e578063bc25cf771462000858578063c45a01551462000881578063d21220a7146200088b57620002a4565b8063855e89f5116200012f578063855e89f5146200075b57806389afcb44146200078457806395d89b4114620007ad57806397026e5f14620007b7578063a6cfbca414620007c1578063a9059cbb14620007f057620002a4565b80636ccc7e4214620006c657806370a0823114620006d05780637464fc3d14620006f957806374b0866414620007035780637ecebe00146200073257620002a4565b80632fdc37b31162000219578063485cc95511620001d7578063485cc95514620006245780635909c0d514620006555780635a3d5493146200065f57806364cae6b2146200066957806366efa63514620006935780636a627842146200069d57620002a4565b80632fdc37b3146200059257806330adf81f14620005c1578063313ce56714620005cb57806334d6664a14620005eb5780633644e515146200061a57620002a4565b806318160ddd116200026757806318160ddd14620004605780631e9d4904146200047c57806323b872dd1462000486578063268d67db14620004bf5780632fb62a47146200050757620002a4565b8063022c0d9f14620002a957806306fdde03146200033b5780630902f1ac14620003bd578063095ea7b314620003f75780630dfe1681146200043a575b600080fd5b6200033960048036036080811015620002c157600080fd5b8135916020810135916001600160a01b036040830135169190810190608081016060820135600160201b811115620002f857600080fd5b8201836020820111156200030b57600080fd5b803590602001918460018302840111600160201b831117156200032d57600080fd5b509092509050620009eb565b005b6200034562001004565b6040805160208082528351818301528351919283929083019185019080838360005b838110156200038157818101518382015260200162000367565b50505050905090810190601f168015620003af5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b620003c762001031565b604080516001600160701b03948516815292909316602083015263ffffffff168183015290519081900360600190f35b62000426600480360360408110156200040f57600080fd5b506001600160a01b0381351690602001356200105b565b604080519115158252519081900360200190f35b6200044462001074565b604080516001600160a01b039092168252519081900360200190f35b6200046a62001083565b60408051918252519081900360200190f35b6200046a62001089565b62000426600480360360608110156200049e57600080fd5b506001600160a01b038135811691602081013590911690604001356200108f565b620004ee60048036036040811015620004d757600080fd5b506001600160a01b03813516906020013562001129565b6040805192835260208301919091528051918290030190f35b6200046a600480360360808110156200051f57600080fd5b810190602081018135600160201b8111156200053a57600080fd5b8201836020820111156200054d57600080fd5b803590602001918460208302840111600160201b831117156200056f57600080fd5b91935091508035906001600160a01b03602082013516906040013515156200124f565b620004ee60048036036040811015620005aa57600080fd5b506001600160a01b0381351690602001356200150f565b6200046a62001534565b620005d562001558565b6040805160ff9092168252519081900360200190f35b620004ee600480360360408110156200060357600080fd5b506001600160a01b0381351690602001356200155d565b6200046a620015b5565b62000339600480360360408110156200063c57600080fd5b506001600160a01b0381358116916020013516620015bb565b6200046a6200169b565b6200046a620016a1565b62000339600480360360408110156200068157600080fd5b508035151590602001351515620016a7565b620004266200177a565b6200046a60048036036020811015620006b557600080fd5b50356001600160a01b03166200178a565b6200042662001c4f565b6200046a60048036036020811015620006e857600080fd5b50356001600160a01b031662001c5f565b6200046a62001c71565b620004ee600480360360408110156200071b57600080fd5b506001600160a01b03813516906020013562001c77565b6200046a600480360360208110156200074a57600080fd5b50356001600160a01b031662001d4c565b6200046a600480360360208110156200077357600080fd5b50356001600160a01b031662001d5e565b620004ee600480360360208110156200079c57600080fd5b50356001600160a01b031662001db3565b620003456200216c565b620004446200218b565b620004ee60048036036040811015620007d957600080fd5b506001600160a01b0381351690602001356200219a565b62000426600480360360408110156200080857600080fd5b506001600160a01b038135169060200135620021d7565b620004ee600480360360408110156200083757600080fd5b506001600160a01b038135169060200135620021e6565b6200046a62002202565b62000339600480360360208110156200087057600080fd5b50356001600160a01b031662002208565b6200044462002384565b6200044462002393565b6200046a60048036036080811015620008ad57600080fd5b810190602081018135600160201b811115620008c857600080fd5b820183602082011115620008db57600080fd5b803590602001918460208302840111600160201b83111715620008fd57600080fd5b91935091508035906001600160a01b0360208201351690604001351515620023a2565b62000339600480360360e08110156200093857600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c0013562002697565b6200046a600480360360408110156200098c57600080fd5b506001600160a01b03813581169160200135166200289e565b6200046a620028bb565b620009b9620028c3565b604080516001600160e01b03909316835263ffffffff90911660208301528051918290030190f35b62000339620028e2565b600e5460011462000a36576040805162461bcd60e51b815260206004820152601060248201526f12da5b99d4ddd85c0e881313d0d2d15160821b604482015290519081900360640190fd5b6000600e558415158062000a4a5750600084115b62000a875760405162461bcd60e51b8152600401808060200182810382526024815260200180620040116024913960400191505060405180910390fd5b60008062000a9462001031565b5091509150816001600160701b03168710801562000aba5750806001600160701b031686105b62000b0c576040805162461bcd60e51b815260206004820181905260248201527f4b696e67537761703a20494e53554646494349454e545f4c4951554944495459604482015290519081900360640190fd5b60008060008062000b1c62002a4c565b9150915060008062000b2d62002a68565b91509150836001600160a01b03168b6001600160a01b03161415801562000b665750816001600160a01b03168b6001600160a01b031614155b62000baf576040805162461bcd60e51b81526020600482015260146024820152734b696e67537761703a20494e56414c49445f544f60601b604482015290519081900360640190fd5b82158062000bbb57508c155b801562000bcf575080158062000bcf57508b155b62000c21576040805162461bcd60e51b815260206004820152601960248201527f4b696e67537761703a20544f4b454e5f4c4f434b45445f494e00000000000000604482015290519081900360640190fd5b8c1562000c355762000c35848c8f62002a84565b8b1562000c495762000c49828c8e62002a84565b881562000cfe578a6001600160a01b0316638d8adec0338f8f8e8e6040518663ffffffff1660e01b815260040180866001600160a01b03168152602001858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509650505050505050600060405180830381600087803b15801562000ce457600080fd5b505af115801562000cf9573d6000803e3d6000fd5b505050505b604080516370a0823160e01b815230600482015290516001600160a01b038616916370a08231916024808301926020929190829003018186803b15801562000d4557600080fd5b505afa15801562000d5a573d6000803e3d6000fd5b505050506040513d602081101562000d7157600080fd5b5051604080516370a0823160e01b815230600482015290519197506001600160a01b038416916370a0823191602480820192602092909190829003018186803b15801562000dbe57600080fd5b505afa15801562000dd3573d6000803e3d6000fd5b505050506040513d602081101562000dea57600080fd5b50519450600093505050506001600160701b0385168a9003831162000e1157600062000e20565b89856001600160701b03160383035b9050600089856001600160701b031603831162000e3f57600062000e4e565b89856001600160701b03160383035b9050600082118062000e605750600081115b62000e9d5760405162461bcd60e51b8152600401808060200182810382526023815260200180620040356023913960400191505060405180910390fd5b600062000ead856103e862002c26565b9050821562000ede5762000edb600a62000ec985601962002c26565b8162000ed157fe5b8391900462002c8c565b90505b600062000eee856103e862002c26565b9050821562000f0d5762000f0a600a62000ec985601962002c26565b90505b62000f34620f424062000f2d6001600160701b038b8116908b1662002c26565b9062002c26565b62000f40838362002c26565b101562000f82576040805162461bcd60e51b815260206004820152600b60248201526a4b696e67537761703a204b60a81b604482015290519081900360640190fd5b505062000f90868662002cdd565b62000f9e8484888862002de1565b60408051838152602081018390528082018d9052606081018c905290516001600160a01b038b169133917fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229181900360800190a350506001600e55505050505050505050565b6040518060400160405280601181526020017025b4b733a9bbb0b8102628102a37b5b2b760791b81525081565b600a546001600160701b0380821692600160701b830490911691600160e01b900463ffffffff1690565b60006200106a33848462002f9b565b5060015b92915050565b6006546001600160a01b031681565b60005481565b61012c81565b6001600160a01b03831660009081526002602090815260408083203384529091528120546000191462001111576001600160a01b0384166000908152600260209081526040808320338452909152902054620010ec908362002c8c565b6001600160a01b03851660009081526002602090815260408083203384529091529020555b6200111e84848462002ffd565b5060015b9392505050565b60065460009081906001600160a01b031681806200114662001031565b5091509150600080846001600160a01b0316896001600160a01b0316146200117057838362001173565b82845b6001600160701b031691506001600160701b03169150600062001198898484620030af565b90506000620011a88b8b6200150f565b50905081985080821015620011dc576000620011c5828462002c8c565b905060028104620011d7848262003100565b9a5050505b600080620011eb8d8d6200155d565b90925090506000620011fe858462002c8c565b9050896001600160a01b03168e6001600160a01b0316146200123a57600160701b6200122b828462002c26565b816200123357fe5b046200123c565b805b9a50505050505050505050509250929050565b6000600e546001146200129c576040805162461bcd60e51b815260206004820152601060248201526f12da5b99d4ddd85c0e881313d0d2d15160821b604482015290519081900360640190fd5b6000600e5560028514620012f0576040805162461bcd60e51b8152602060048201526016602482015275096d2dccea6eec2e07440929cac82989288bea082a8960531b604482015290519081900360640190fd5b6006546001600160a01b031660008080806200130b62001031565b5091509150600080866001600160a01b03168d8d60008181106200132b57fe5b905060200201356001600160a01b03166001600160a01b0316146200135257828462001355565b83835b6001600160701b031691506001600160701b03169150620013788b8383620030af565b9550620013a38d8d60018181106200138c57fe5b905060200201356001600160a01b03168c6200150f565b509450505050818310159050620013ca576000620013c2828462002c8c565b600290049450505b60018515151415620014fe57600080620014028b8b6001818110620013eb57fe5b905060200201356001600160a01b03168a6200155d565b9092509050600062001415858462002c8c565b90506000866001600160a01b03168d8d60008181106200143157fe5b905060200201356001600160a01b03166001600160a01b03161462001457578162001472565b600160701b62001468838562002c26565b816200147057fe5b045b600854604080516340c10f1960e01b81526001600160a01b038e811660048301526024820185905291519394509116916340c10f19916044808201926020929091908290030181600087803b158015620014cb57600080fd5b505af1158015620014e0573d6000803e3d6000fd5b505050506040513d6020811015620014f757600080fd5b5050505050505b50506001600e555095945050505050565b6000806200151c62003150565b90506200152b84848362003201565b91509250929050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b601281565b6000806000806200156d62001031565b5091509150620015928262001582836200329f565b6001600160e01b031690620032b1565b6001600160e01b03169250620015aa86868562003201565b935050509250929050565b60035481565b6005546001600160a01b0316331462001611576040805162461bcd60e51b815260206004820152601360248201527225b4b733a9bbb0b81d102327a92124a22222a760691b604482015290519081900360640190fd5b600680546001600160a01b038085166001600160a01b03199283161790925560078054928416929091169190911790556040516000906200165290620036a0565b90815260405190819003602001906000f08015801562001676573d6000803e3d6000fd5b50600880546001600160a01b0319166001600160a01b03929092169190911790555050565b600b5481565b600c5481565b6005546001600160a01b03163314620016fd576040805162461bcd60e51b815260206004820152601360248201527225b4b733a9bbb0b81d102327a92124a22222a760691b604482015290519081900360640190fd5b60068054831515600160a01b90810260ff60a01b19928316179283905560078054851515830293169290921791829055604080519382900460ff9081161515855291909204161515602083015280517f1650047c144c73a929c17df9c1cc997ae415e44dc2f7e55440b2a2da74c6e5b79281900390910190a15050565b600654600160a01b900460ff1681565b6000600e54600114620017d7576040805162461bcd60e51b815260206004820152601060248201526f12da5b99d4ddd85c0e881313d0d2d15160821b604482015290519081900360640190fd5b6000600e81905580620017e962001031565b50600654604080516370a0823160e01b815230600482015290519395509193506000926001600160a01b03909116916370a08231916024808301926020929190829003018186803b1580156200183e57600080fd5b505afa15801562001853573d6000803e3d6000fd5b505050506040513d60208110156200186a57600080fd5b5051600754604080516370a0823160e01b815230600482015290519293506000926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015620018be57600080fd5b505afa158015620018d3573d6000803e3d6000fd5b505050506040513d6020811015620018ea57600080fd5b50519050600062001905836001600160701b03871662002c8c565b905060006200191e836001600160701b03871662002c8c565b905060006200192e8787620032d7565b6000549091508062001b2f5760055460408051637cd07e4760e01b815290516000926001600160a01b031691637cd07e47916004808301926020929190829003018186803b1580156200198057600080fd5b505afa15801562001995573d6000803e3d6000fd5b505050506040513d6020811015620019ac57600080fd5b50519050336001600160a01b038216141562001a9657806001600160a01b03166340dc0e376040518163ffffffff1660e01b815260040160206040518083038186803b158015620019fc57600080fd5b505afa15801562001a11573d6000803e3d6000fd5b505050506040513d602081101562001a2857600080fd5b50519950891580159062001a3e57506000198a14155b62001a90576040805162461bcd60e51b815260206004820152601f60248201527f4b696e67537761703a204261642064657369726564206c697175696469747900604482015290519081900360640190fd5b62001b28565b6001600160a01b0381161562001af3576040805162461bcd60e51b815260206004820181905260248201527f4b696e67537761703a204d757374206e6f742068617665206d69677261746f72604482015290519081900360640190fd5b62001b176103e862001b1062001b0a888862002c26565b62003429565b9062002c8c565b995062001b2860006103e862003482565b5062001b7a565b62001b776001600160701b03891662001b49868462002c26565b8162001b5157fe5b046001600160701b03891662001b68868562002c26565b8162001b7057fe5b0462003510565b98505b6000891162001bbb5760405162461bcd60e51b8152600401808060200182810382526027815260200180620040586027913960400191505060405180910390fd5b62001bc78a8a62003482565b62001bd586868a8a62002de1565b811562001c0257600a5462001bfe906001600160701b0380821691600160701b90041662002c26565b600d555b6040805185815260208101859052815133927f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f928290030190a250506001600e5550949695505050505050565b600754600160a01b900460ff1681565b60016020526000908152604090205481565b600d5481565b60065460009081906001600160a01b0316818062001c9462001031565b5091509150600080846001600160a01b0316896001600160a01b03161462001cbe57828462001cc1565b83835b6001600160701b031691506001600160701b03169150600062001ce689848462003528565b9050600062001cf68b8b620021e6565b5090508198508082111562001d2a57600062001d13838362002c8c565b90506002810462001d25848262002c8c565b9a5050505b60008062001d398d8d6200219a565b90925090506000620011fe838662002c8c565b60046020526000908152604090205481565b60008062001d6b62003150565b6006549091506001600160a01b0384811691161462001da7578062001d95600160701b8062002c26565b8162001d9d57fe5b0491508162001dac565b809150815b5050919050565b600080600e5460011462001e01576040805162461bcd60e51b815260206004820152601060248201526f12da5b99d4ddd85c0e881313d0d2d15160821b604482015290519081900360640190fd5b6000600e8190558062001e1362001031565b50600654600754604080516370a0823160e01b815230600482015290519496509294506001600160a01b039182169391169160009184916370a08231916024808301926020929190829003018186803b15801562001e7057600080fd5b505afa15801562001e85573d6000803e3d6000fd5b505050506040513d602081101562001e9c57600080fd5b5051604080516370a0823160e01b815230600482015290519192506000916001600160a01b038516916370a08231916024808301926020929190829003018186803b15801562001eeb57600080fd5b505afa15801562001f00573d6000803e3d6000fd5b505050506040513d602081101562001f1757600080fd5b50519050600062001f298787620032d7565b306000908152600160205260408120549054919250908062001f4c838762002c26565b8162001f5457fe5b049a508062001f64838662002c26565b8162001f6c57fe5b04995060008b11801562001f80575060008a115b62001fbd5760405162461bcd60e51b815260040180806020018281038252602781526020018062003fea6027913960400191505060405180910390fd5b62001fc9308362003578565b505062001fd8858b8b62002a84565b62001fe5848b8a62002a84565b604080516370a0823160e01b815230600482015290516001600160a01b038716916370a08231916024808301926020929190829003018186803b1580156200202c57600080fd5b505afa15801562002041573d6000803e3d6000fd5b505050506040513d60208110156200205857600080fd5b5051604080516370a0823160e01b815230600482015290519194506001600160a01b038616916370a0823191602480820192602092909190829003018186803b158015620020a557600080fd5b505afa158015620020ba573d6000803e3d6000fd5b505050506040513d6020811015620020d157600080fd5b50519150620020e38383898962002de1565b80156200211057600a546200210c906001600160701b0380821691600160701b90041662002c26565b600d555b604080518a8152602081018a905281516001600160a01b038d169233927fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496929081900390910190a3505050505050506001600e81905550915091565b6040518060400160405280600381526020016204b4c560ec1b81525081565b6008546001600160a01b031681565b600080600080620021aa62001031565b5091509150620021bf8262001582836200329f565b6001600160e01b03169250620015aa8686856200360e565b60006200106a33848462002ffd565b600080620021f362003150565b90506200152b8484836200360e565b6103e881565b600e5460011462002253576040805162461bcd60e51b815260206004820152601060248201526f12da5b99d4ddd85c0e881313d0d2d15160821b604482015290519081900360640190fd5b6000600e55600654600754600a54604080516370a0823160e01b815230600482015290516001600160a01b039485169490931692620023039285928792620022fd926001600160701b03169185916370a0823191602480820192602092909190829003018186803b158015620022c857600080fd5b505afa158015620022dd573d6000803e3d6000fd5b505050506040513d6020811015620022f457600080fd5b50519062002c8c565b62002a84565b6200237a8184620022fd600a600e9054906101000a90046001600160701b03166001600160701b0316856001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015620022c857600080fd5b50506001600e5550565b6005546001600160a01b031681565b6007546001600160a01b031681565b6000600e54600114620023ef576040805162461bcd60e51b815260206004820152601060248201526f12da5b99d4ddd85c0e881313d0d2d15160821b604482015290519081900360640190fd5b6000600e556002851462002443576040805162461bcd60e51b8152602060048201526016602482015275096d2dccea6eec2e07440929cac82989288bea082a8960531b604482015290519081900360640190fd5b6006546001600160a01b031660008080806200245e62001031565b5091509150600080866001600160a01b03168d8d60008181106200247e57fe5b905060200201356001600160a01b03166001600160a01b031614620024a5578284620024a8565b83835b6001600160701b031691506001600160701b03169150620024cb8b838362003528565b9550859750620024f98d8d6000818110620024e257fe5b905060200201356001600160a01b03168c620021e6565b50945060008d8d82816200250957fe5b905060200201356001600160a01b03166001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156200256657600080fd5b505afa1580156200257b573d6000803e3d6000fd5b505050506040513d60208110156200259257600080fd5b505190506000620025a4828562002c8c565b90508c811015620025fc576040805162461bcd60e51b815260206004820152601860248201527f4b696e67537761703a20496e76616c696420416d6f756e740000000000000000604482015290519081900360640190fd5b505050505050808211156200263057600062002619838362002c8c565b9050600281046200262b848262002c8c565b955050505b60018515151415620014fe57600080620026688b8b60008181106200265157fe5b905060200201356001600160a01b03168a6200219a565b909250905060006200267b838662002c8c565b90506000866001600160a01b03168d8d60018181106200143157fe5b42841015620026e1576040805162461bcd60e51b815260206004820152601160248201527012da5b99d4ddd85c0e8811561412549151607a1b604482015290519081900360640190fd5b6003546001600160a01b0380891660008181526004602090815260408083208054600180820190925582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98186015280840196909652958d166060860152608085018c905260a085019590955260c08085018b90528151808603909101815260e08501825280519083012061190160f01b6101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff89166101828501526101a284018890526101c28401879052519193926101e280820193601f1981019281900390910190855afa158015620027fd573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590620028345750886001600160a01b0316816001600160a01b0316145b62002886576040805162461bcd60e51b815260206004820152601b60248201527f4b696e67537761703a20494e56414c49445f5349474e41545552450000000000604482015290519081900360640190fd5b6200289389898962002f9b565b505050505050505050565b600260209081526000928352604080842090915290825290205481565b600160701b81565b6009546001600160e01b03811691600160e01b90910463ffffffff1690565b600e546001146200292d576040805162461bcd60e51b815260206004820152601060248201526f12da5b99d4ddd85c0e881313d0d2d15160821b604482015290519081900360640190fd5b6000600e55600654604080516370a0823160e01b8152306004820152905162002a45926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156200298057600080fd5b505afa15801562002995573d6000803e3d6000fd5b505050506040513d6020811015620029ac57600080fd5b5051600754604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015620029fa57600080fd5b505afa15801562002a0f573d6000803e3d6000fd5b505050506040513d602081101562002a2657600080fd5b5051600a546001600160701b0380821691600160701b90041662002de1565b6001600e55565b6006546001600160a01b03811691600160a01b90910460ff1690565b6007546001600160a01b03811691600160a01b90910460ff1690565b604080518082018252601981527f7472616e7366657228616464726573732c75696e74323536290000000000000060209182015281516001600160a01b0385811660248301526044808301869052845180840390910181526064909201845291810180516001600160e01b031663a9059cbb60e01b1781529251815160009460609489169392918291908083835b6020831062002b335780518252601f19909201916020918201910162002b12565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811462002b97576040519150601f19603f3d011682016040523d82523d6000602084013e62002b9c565b606091505b509150915081801562002bcd57508051158062002bcd575080806020019051602081101562002bca57600080fd5b50515b62002c1f576040805162461bcd60e51b815260206004820152601960248201527f4b696e67537761703a205452414e534645525f4641494c454400000000000000604482015290519081900360640190fd5b5050505050565b600081158062002c435750508082028282828162002c4057fe5b04145b6200106e576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6d756c2d6f766572666c6f7760601b604482015290519081900360640190fd5b808203828111156200106e576040805162461bcd60e51b815260206004820152601560248201527464732d6d6174682d7375622d756e646572666c6f7760581b604482015290519081900360640190fd5b60008062002cea620028c3565b91506001600160e01b031691506000600160201b428162002d0757fe5b0690508063ffffffff168263ffffffff16101562002c1f57600062002d318662001582876200329f565b6001600160e01b03169050600062002d6061012c62002d5a4263ffffffff8089169062002c8c16565b62003510565b9050600062002d7261012c8362002c8c565b9050600061012c62002d9c62002d89868662002c26565b62002d958a8662002c26565b9062003100565b8162002da457fe5b6009805463ffffffff8916600160e01b026001600160e01b039490930484166001600160e01b031990911617909216179055505050505050505050565b6001600160701b03841180159062002e0057506001600160701b038311155b62002e47576040805162461bcd60e51b81526020600482015260126024820152714b696e67537761703a204f564552464c4f5760701b604482015290519081900360640190fd5b600a5463ffffffff42811691600160e01b9004811682039081161580159062002e7857506001600160701b03841615155b801562002e8d57506001600160701b03831615155b1562002ef0578063ffffffff1662002eaa8562001582866200329f565b600b80546001600160e01b03929092169290920201905563ffffffff811662002ed88462001582876200329f565b600c80546001600160e01b0392909216929092020190555b600a80546dffffffffffffffffffffffffffff19166001600160701b03888116919091176dffffffffffffffffffffffffffff60701b1916600160701b8883168102919091176001600160e01b0316600160e01b63ffffffff871602179283905560408051848416815291909304909116602082015281517f1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1929181900390910190a1505050505050565b6001600160a01b03808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b03831660009081526001602052604090205462003022908262002c8c565b6001600160a01b03808516600090815260016020526040808220939093559084168152205462003053908262003100565b6001600160a01b0380841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600080620030c561271062000f2d868862002c26565b90506000620030dc6126f762000f2d868962002c8c565b9050620030f66001828481620030ee57fe5b049062003100565b9695505050505050565b808201828110156200106e576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6164642d6f766572666c6f7760601b604482015290519081900360640190fd5b60008060006200315f620028c3565b91506001600160e01b031691506000806200317962001031565b50915091506000620031908362001582846200329f565b6001600160e01b031690506000620031b961012c62002d5a4263ffffffff808a169062002c8c16565b90506000620031cb61012c8362002c8c565b905061012c620031ec620031e0858562002c26565b62002d958a8562002c26565b81620031f457fe5b0497505050505050505090565b6006546000906001600160a01b03858116911614156200325d576000620032308362000f2d8661271062002c26565b9050600062003246600160701b6126f762002c26565b90508082816200325257fe5b049250505062001122565b600062003276600160701b62000f2d8661271062002c26565b9050600062003288846126f762002c26565b90508082816200329457fe5b049695505050505050565b6001600160701b0316600160701b0290565b60006001600160701b0382166001600160e01b03841681620032cf57fe5b049392505050565b600080600560009054906101000a90046001600160a01b03166001600160a01b031663017e7e586040518163ffffffff1660e01b815260040160206040518083038186803b1580156200332957600080fd5b505afa1580156200333e573d6000803e3d6000fd5b505050506040513d60208110156200335557600080fd5b5051600d546001600160a01b038216158015945091925090620034145780156200340e5760006200339762001b0a6001600160701b0388811690881662002c26565b90506000620033a68362003429565b9050808211156200340b576000620033cd620033c3848462002c8c565b6000549062002c26565b90506000620033e38362002d9586600462002c26565b90506000818381620033f157fe5b0490508015620034075762003407878262003482565b5050505b50505b62003421565b801562003421576000600d555b505092915050565b6000600382111562003472575080600160028204015b818110156200346b578091506002818285816200345857fe5b0401816200346257fe5b0490506200343f565b506200347d565b81156200347d575060015b919050565b60005462003491908262003100565b60009081556001600160a01b038316815260016020526040902054620034b8908262003100565b6001600160a01b03831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600081831062003521578162001122565b5090919050565b60008062003539856126f762002c26565b9050600062003549828562002c26565b90506000620035608362002d958861271062002c26565b90508082816200356c57fe5b04979650505050505050565b6001600160a01b0382166000908152600160205260409020546200359d908262002c8c565b6001600160a01b03831660009081526001602052604081209190915554620035c6908262002c8c565b60009081556040805183815290516001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a35050565b6000806200361f846126f762002c26565b6006549091506001600160a01b03868116911614156200367457600062003647828562002c26565b905060006200365d600160701b61271062002c26565b90508082816200366957fe5b049350505062003698565b60006200368682600160701b62002c26565b90506000620035608561271062002c26565b509392505050565b61093b80620036af8339019056fe608060405234801561001057600080fd5b5060405161093b38038061093b8339818101604052602081101561003357600080fd5b5051600180546001600160a01b03191633908117909155610054908261005a565b5061015a565b610073816000546100fc60201b6104d11790919060201c565b60009081556001600160a01b0383168152600260209081526040909120546100a49183906104d16100fc821b17901c565b6001600160a01b03831660008181526002602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b80820182811015610154576040805162461bcd60e51b815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b92915050565b6107d2806101696000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c806340c10f191161007157806340c10f19146101d957806370a082311461020557806395d89b411461022b5780639dc29fac14610233578063a9059cbb1461025f578063dd62ed3e1461028b576100a9565b806306fdde03146100ae578063095ea7b31461012b57806318160ddd1461016b57806323b872dd14610185578063313ce567146101bb575b600080fd5b6100b66102b9565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100f05781810151838201526020016100d8565b50505050905090810190601f16801561011d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101576004803603604081101561014157600080fd5b506001600160a01b0381351690602001356102f2565b604080519115158252519081900360200190f35b610173610309565b60408051918252519081900360200190f35b6101576004803603606081101561019b57600080fd5b506001600160a01b0381358116916020810135909116906040013561030f565b6101c36103a3565b6040805160ff9092168252519081900360200190f35b610157600480360360408110156101ef57600080fd5b506001600160a01b0381351690602001356103a8565b6101736004803603602081101561021b57600080fd5b50356001600160a01b031661040f565b6100b6610421565b6101576004803603604081101561024957600080fd5b506001600160a01b038135169060200135610440565b6101576004803603604081101561027557600080fd5b506001600160a01b0381351690602001356104a7565b610173600480360360408110156102a157600080fd5b506001600160a01b03813581169160200135166104b4565b6040518060400160405280601781526020017f4b696e675377617020536c69707061676520546f6b656e00000000000000000081525081565b60006102ff338484610520565b5060015b92915050565b60005481565b6001600160a01b03831660009081526003602090815260408083203384529091528120546000191461038e576001600160a01b03841660009081526003602090815260408083203384529091529020546103699083610582565b6001600160a01b03851660009081526003602090815260408083203384529091529020555b6103998484846105d2565b5060019392505050565b601281565b6001546000906001600160a01b03163314610405576040805162461bcd60e51b815260206004820152601860248201527729b634b83830b3b2aa37b5b2b71d102737ba1027bbb732b960411b604482015290519081900360640190fd5b6102ff8383610680565b60026020526000908152604090205481565b6040518060400160405280600381526020016212d4d560ea1b81525081565b6001546000906001600160a01b0316331461049d576040805162461bcd60e51b815260206004820152601860248201527729b634b83830b3b2aa37b5b2b71d102737ba1027bbb732b960411b604482015290519081900360640190fd5b6102ff838361070a565b60006102ff3384846105d2565b600360209081526000928352604080842090915290825290205481565b80820182811015610303576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6164642d6f766572666c6f7760601b604482015290519081900360640190fd5b6001600160a01b03808416600081815260036020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b80820382811115610303576040805162461bcd60e51b815260206004820152601560248201527464732d6d6174682d7375622d756e646572666c6f7760581b604482015290519081900360640190fd5b6001600160a01b0383166000908152600260205260409020546105f59082610582565b6001600160a01b03808516600090815260026020526040808220939093559084168152205461062490826104d1565b6001600160a01b0380841660008181526002602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60005461068d90826104d1565b60009081556001600160a01b0383168152600260205260409020546106b290826104d1565b6001600160a01b03831660008181526002602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b03821660009081526002602052604090205461072d9082610582565b6001600160a01b038316600090815260026020526040812091909155546107549082610582565b60009081556040805183815290516001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a3505056fea2646970667358221220ce98f0b5326c7345c6e150d4f548199fdc6594d8f2c1bd32d456309a6619553264736f6c634300060c00334b696e67537761703a20494e53554646494349454e545f4c49515549444954595f4255524e45444b696e67537761703a20494e53554646494349454e545f4f55545055545f414d4f554e544b696e67537761703a20494e53554646494349454e545f494e5055545f414d4f554e544b696e67537761703a20494e53554646494349454e545f4c49515549444954595f4d494e544544a2646970667358221220a9eacea9d6f63cd77b2afc86a335c8a34359b5f1cc245ab95dc15539a1500aba64736f6c634300060c0033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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