ETH Price: $1,976.61 (+0.73%)
 

Overview

Max Total Supply

0.504914164411527529 ERC20 ***

Holders

3

Transfers

-
482 ( -22.01%)

Market

Onchain Market Cap

-

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xe3B07bc1...24cB9CcFe
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
Pair

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 13 : Pair.sol
// SPDX-License-Identifier: MIT OR GPL-3.0-or-later
pragma solidity 0.8.13;

import './libraries/Math.sol';
import './interfaces/IERC20.sol';
import './interfaces/IPair.sol';
import './interfaces/IPairGenerator.sol';
import './interfaces/IPairCallee.sol';
import './interfaces/IPairFactory.sol';
import './PairFees.sol';
import {REFERRAL_FEE_DENOMINATOR} from './libraries/Constants.sol';

import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";

// The base pair of pools, either stable or volatile
contract Pair is IPair {

    string public name;
    string public symbol;
    uint8 public constant decimals = 18;

    bool public immutable stable;

    uint public totalSupply = 0;

    mapping(address => mapping (address => uint)) public allowance;
    mapping(address => uint) public balanceOf;

    bytes32 internal constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;
    mapping(address => uint) public nonces;

    uint internal constant MINIMUM_LIQUIDITY = 10**3;

    address public immutable token0;
    address public immutable token1;
    address public immutable fees;
    address public immutable factory;

    // Structure to capture time period obervations every 30 minutes, used for local oracles
    struct Observation {
        uint timestamp;
        uint reserve0Cumulative;
        uint reserve1Cumulative;
    }

    // Capture oracle reading every 30 minutes
    uint constant periodSize = 1800;

    Observation[] public observations;

    uint internal immutable decimals0;
    uint internal immutable decimals1;

    uint public reserve0;
    uint public reserve1;
    uint public blockTimestampLast;

    uint public reserve0CumulativeLast;
    uint public reserve1CumulativeLast;

    // index0 and index1 are used to accumulate fees, this is split out from normal trades to keep the swap "clean"
    // this further allows LP holders to easily claim fees for tokens they have/staked
    uint public index0 = 0;
    uint public index1 = 0;

    // position assigned to each LP to track their current index0 & index1 vs the global position
    mapping(address => uint) public supplyIndex0;
    mapping(address => uint) public supplyIndex1;

    // tracks the amount of unclaimed, but claimable tokens off of fees for token0 and token1
    mapping(address => uint) public claimable0;
    mapping(address => uint) public claimable1;

    event Fees(address indexed sender, uint amount0, uint amount1);
    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(uint reserve0, uint reserve1);
    event Claim(address indexed sender, address indexed recipient, uint amount0, uint amount1);

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

    constructor() {
        factory = IPairGenerator(msg.sender).factory();
        (address _token0, address _token1, bool _stable) = IPairGenerator(msg.sender).getInitializable();
        (token0, token1, stable) = (_token0, _token1, _stable);
        fees = address(new PairFees(_token0, _token1));
        if (_stable) {
            name = string(abi.encodePacked("StableV1 AMM - ", IERC20(_token0).symbol(), "/", IERC20(_token1).symbol()));
            symbol = string(abi.encodePacked("sAMM-", IERC20(_token0).symbol(), "/", IERC20(_token1).symbol()));
        } else {
            name = string(abi.encodePacked("VolatileV1 AMM - ", IERC20(_token0).symbol(), "/", IERC20(_token1).symbol()));
            symbol = string(abi.encodePacked("vAMM-", IERC20(_token0).symbol(), "/", IERC20(_token1).symbol()));
        }

        decimals0 = 10**IERC20(_token0).decimals();
        decimals1 = 10**IERC20(_token1).decimals();

        observations.push(Observation(block.timestamp, 0, 0));
    }

    // simple re-entrancy check
    uint internal _unlocked = 1;
    modifier lock() {
        require(_unlocked == 1, "LOCKED");
        _unlocked = 2;
        _;
        _unlocked = 1;
    }

    function observationLength() external view returns (uint) {
        return observations.length;
    }

    function lastObservation() public view returns (Observation memory) {
        return observations[observations.length-1];
    }

    function metadata() external view returns (uint dec0, uint dec1, uint r0, uint r1, bool st, address t0, address t1) {
        return (decimals0, decimals1, reserve0, reserve1, stable, token0, token1);
    }

    function tokens() external view returns (address, address) {
        return (token0, token1);
    }

    function isStable() external view returns(bool) {
        return stable;
    }

    // claim accumulated but unclaimed fees (viewable via claimable0 and claimable1)
    function claimFees() external returns (uint claimed0, uint claimed1) {
        _updateFor(msg.sender);

        claimed0 = claimable0[msg.sender];
        claimed1 = claimable1[msg.sender];

        if (claimed0 > 0 || claimed1 > 0) {
            claimable0[msg.sender] = 0;
            claimable1[msg.sender] = 0;

            PairFees(fees).claimFeesFor(msg.sender, claimed0, claimed1);

            emit Claim(msg.sender, msg.sender, claimed0, claimed1);
        }
    }

    // Accrue fees on token0
    function _update0(uint amount) internal {
        // get referral fee
        address _dibs = IPairFactory(factory).dibs();
        uint256 _maxRef = IPairFactory(factory).getReferralFee(address(this));
        uint256 _referralFee = (_dibs != address(0)) ? (amount * _maxRef / REFERRAL_FEE_DENOMINATOR) : 0;
        if (_referralFee > 0) {
            _safeTransfer(token0, _dibs, _referralFee); // Transfer referral fees
            amount -= _referralFee;
        }
        _safeTransfer(token0, fees, amount); // transfer the fees out to PairFees
        uint256 _ratio = amount * 1e18 / totalSupply; // 1e18 adjustment is removed during claim
        if (_ratio > 0) {
            index0 += _ratio;
        }
        emit Fees(msg.sender, amount+_referralFee, 0);
    }

    // Accrue fees on token1
    function _update1(uint amount) internal {
        // get referral fee
        address _dibs = IPairFactory(factory).dibs();
        uint256 _maxRef = IPairFactory(factory).getReferralFee(address(this));
        uint256 _referralFee = (_dibs != address(0)) ? (amount * _maxRef / REFERRAL_FEE_DENOMINATOR) : 0;
         if (_referralFee > 0) {
             _safeTransfer(token1, _dibs, _referralFee); // transfer the fees out to Dibs address(Foundation address)
            amount -= _referralFee;
         }
        _safeTransfer(token1, fees, amount); // transfer the fees out to PairFees

        uint256 _ratio = amount * 1e18 / totalSupply;

        if (_ratio > 0) {
            index1 += _ratio;
        }

        emit Fees(msg.sender, 0, amount+_referralFee);
    }

    // this function MUST be called on any balance changes, otherwise can be used to infinitely claim fees
    // Fees are segregated from core funds, so fees can never put liquidity at risk
    function _updateFor(address recipient) internal {
        uint _supplied = balanceOf[recipient]; // get LP balance of `recipient`
        if (_supplied > 0) {
            uint _supplyIndex0 = supplyIndex0[recipient]; // get last adjusted index0 for recipient
            uint _supplyIndex1 = supplyIndex1[recipient];
            uint _index0 = index0; // get global index0 for accumulated fees
            uint _index1 = index1;
            supplyIndex0[recipient] = _index0; // update user current position to global position
            supplyIndex1[recipient] = _index1;
            uint _delta0 = _index0 - _supplyIndex0; // see if there is any difference that need to be accrued
            uint _delta1 = _index1 - _supplyIndex1;
            if (_delta0 > 0) {
                uint _share = _supplied * _delta0 / 1e18; // add accrued difference for each supplied token
                claimable0[recipient] += _share;
            }
            if (_delta1 > 0) {
                uint _share = _supplied * _delta1 / 1e18;
                claimable1[recipient] += _share;
            }
        } else {
            supplyIndex0[recipient] = index0; // new users are set to the default global state
            supplyIndex1[recipient] = index1;
        }
    }

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

    // update reserves and, on the first call per block, price accumulators
    function _update(uint balance0, uint balance1, uint _reserve0, uint _reserve1) internal {
        uint blockTimestamp = block.timestamp;
        uint timeElapsed = blockTimestamp - blockTimestampLast; // overflow is desired
        if (timeElapsed > 0 && _reserve0 != 0 && _reserve1 != 0) {
            reserve0CumulativeLast += _reserve0 * timeElapsed;
            reserve1CumulativeLast += _reserve1 * timeElapsed;
        }

        Observation memory _point = lastObservation();
        timeElapsed = blockTimestamp - _point.timestamp; // compare the last observation with current timestamp, if greater than 30 minutes, record a new event
        if (timeElapsed > periodSize) {
            observations.push(Observation(blockTimestamp, reserve0CumulativeLast, reserve1CumulativeLast));
        }
        reserve0 = balance0;
        reserve1 = balance1;
        blockTimestampLast = blockTimestamp;
        emit Sync(reserve0, reserve1);
    }

    // produces the cumulative price using counterfactuals to save gas and avoid a call to sync.
    function currentCumulativePrices() public view returns (uint reserve0Cumulative, uint reserve1Cumulative, uint blockTimestamp) {
        blockTimestamp = block.timestamp;
        reserve0Cumulative = reserve0CumulativeLast;
        reserve1Cumulative = reserve1CumulativeLast;

        // if time has elapsed since the last update on the pair, mock the accumulated price values
        (uint _reserve0, uint _reserve1, uint _blockTimestampLast) = getReserves();
        if (_blockTimestampLast != blockTimestamp) {
            uint timeElapsed = blockTimestamp - _blockTimestampLast;
            reserve0Cumulative += _reserve0 * timeElapsed;
            reserve1Cumulative += _reserve1 * timeElapsed;
        }
    }

    // gives the current twap price measured from amountIn * tokenIn gives amountOut
    function current(address tokenIn, uint amountIn) external view returns (uint amountOut) {
        Observation memory _observation = lastObservation();
        (uint reserve0Cumulative, uint reserve1Cumulative,) = currentCumulativePrices();
        if (block.timestamp == _observation.timestamp) {
            _observation = observations[observations.length-2];
        }

        uint timeElapsed = block.timestamp - _observation.timestamp;
        uint _reserve0 = (reserve0Cumulative - _observation.reserve0Cumulative) / timeElapsed;
        uint _reserve1 = (reserve1Cumulative - _observation.reserve1Cumulative) / timeElapsed;
        amountOut = _getAmountOut(amountIn, tokenIn, _reserve0, _reserve1);
    }

    // Similar in purpose to `current`, but more secure as it averages sampled prices over a user-defined granularity (minimum 1, up to the full window size)
    function quote(address tokenIn, uint amountIn, uint granularity) external view returns (uint amountOut) {
        uint [] memory _prices = sample(tokenIn, amountIn, granularity, 1);
        uint priceAverageCumulative;
        for (uint i = 0; i < _prices.length; i++) {
            priceAverageCumulative += _prices[i];
        }
        return priceAverageCumulative / granularity;
    }

    // returns a memory set of twap prices
    function prices(address tokenIn, uint amountIn, uint points) external view returns (uint[] memory) {
        return sample(tokenIn, amountIn, points, 1);
    }

    function sample(address tokenIn, uint amountIn, uint points, uint window) public view returns (uint[] memory) {
        uint[] memory _prices = new uint[](points);

        uint length = observations.length-1;
        uint i = length - (points * window);
        uint nextIndex = 0;
        uint index = 0;

        for (; i < length; i+=window) {
            nextIndex = i + window;
            uint timeElapsed = observations[nextIndex].timestamp - observations[i].timestamp;
            uint _reserve0 = (observations[nextIndex].reserve0Cumulative - observations[i].reserve0Cumulative) / timeElapsed;
            uint _reserve1 = (observations[nextIndex].reserve1Cumulative - observations[i].reserve1Cumulative) / timeElapsed;
            _prices[index] = _getAmountOut(amountIn, tokenIn, _reserve0, _reserve1);
            // index < length; length cannot overflow
            unchecked {
                index = index + 1;
            }
        }
        return _prices;
    }

    // this low-level function should be called by addLiquidity functions in Router.sol, which performs important safety checks
    // standard uniswap v2 implementation
    function mint(address to) external lock returns (uint liquidity) {
        (uint _reserve0, uint _reserve1) = (reserve0, reserve1);
        uint _balance0 = IERC20(token0).balanceOf(address(this));
        uint _balance1 = IERC20(token1).balanceOf(address(this));
        uint _amount0 = _balance0 - _reserve0;
        uint _amount1 = _balance1 - _reserve1;

        uint _totalSupply = totalSupply;
        if (_totalSupply == 0) {
            // Calculate initial liquidity (includes MINIMUM_LIQUIDITY)
            uint totalLiquidity = Math.sqrt(_amount0 * _amount1);

            // Use minimum liquidity based on pair type
            uint minimumLiquidity;
            if (stable) {
                // For stable pairs, use dynamic minimum liquidity to ensure squared terms are not zero
                minimumLiquidity = _getMinimumLiquidity(_amount0, _amount1);
            } else {
                // For volatile pairs, use static minimum liquidity
                minimumLiquidity = MINIMUM_LIQUIDITY;
            }
            require(totalLiquidity > minimumLiquidity, "INSUFFICIENT_LIQUIDITY");

            // For stable pairs, ensure minimum liquidity provides sufficient k value for permanent protection
            // This prevents the rounding error vulnerability where k could become 0 after burning liquidity
            if (stable) {
                // Calculate the minimum reserves that would correspond to minimum liquidity tokens
                // This ensures that even the permanent minimum liquidity provides k > 0
                uint minReserve0 = (_amount0 * minimumLiquidity) / totalLiquidity;
                uint minReserve1 = (_amount1 * minimumLiquidity) / totalLiquidity;

                // Ensure these minimum reserves would produce k > 0
                // We check the actual k value that would result from these minimum reserves
                require(_k(minReserve0, minReserve1) > 0, "MINIMUM_LIQUIDITY_TOO_SMALL");
            }

            // Mint liquidity (excluding minimum liquidity) to the user and lock minimum liquidity permanently
            liquidity = totalLiquidity - minimumLiquidity;
            _mint(address(0), minimumLiquidity); // permanently lock the first minimum liquidity tokens
        } else {
            liquidity = Math.min(_amount0 * _totalSupply / _reserve0, _amount1 * _totalSupply / _reserve1);
        }
        require(liquidity > 0, 'ILM'); // Pair: INSUFFICIENT_LIQUIDITY_MINTED
        _mint(to, liquidity);

        _update(_balance0, _balance1, _reserve0, _reserve1);
        emit Mint(to, _amount0, _amount1);
    }

    // this low-level function should be called from a contract which performs important safety checks
    // standard uniswap v2 implementation
    function burn(address to) external lock returns (uint amount0, uint amount1) {
        (uint _reserve0, uint _reserve1) = (reserve0, reserve1);
        uint _balance0 = IERC20(token0).balanceOf(address(this));
        uint _balance1 = IERC20(token1).balanceOf(address(this));
        uint _liquidity = balanceOf[address(this)];

        uint _totalSupply = totalSupply; // gas savings, must be defined here since totalSupply can update in _mintFee
        amount0 = _liquidity * _balance0 / _totalSupply; // using balances ensures pro-rata distribution
        amount1 = _liquidity * _balance1 / _totalSupply; // using balances ensures pro-rata distribution
        require(amount0 > 0 && amount1 > 0, 'ILB'); // Pair: 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);
        emit Burn(msg.sender, amount0, amount1, to);
    }

    // this low-level function should be called from a contract which performs important safety checks
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external lock {
        require(!IPairFactory(factory).isPaused(), "PAUSED");
        require(amount0Out > 0 || amount1Out > 0, 'IOA'); // Pair: INSUFFICIENT_OUTPUT_AMOUNT
        (uint _reserve0, uint _reserve1) =  (reserve0, reserve1);
        require(amount0Out < _reserve0 && amount1Out < _reserve1, 'IL'); // Pair: INSUFFICIENT_LIQUIDITY

        uint _balance0;
        uint _balance1;
        { // scope for _token{0,1}, avoids stack too deep errors
        (address _token0, address _token1) = (token0, token1);
        require(to != _token0 && to != _token1, 'IT'); // Pair: INVALID_TO
        if (amount0Out > 0) _safeTransfer(_token0, to, amount0Out); // optimistically transfer tokens
        if (amount1Out > 0) _safeTransfer(_token1, to, amount1Out); // optimistically transfer tokens
        if (data.length > 0) IPairCallee(to).hook(msg.sender, amount0Out, amount1Out, data); // callback, used for flash loans
        _balance0 = IERC20(_token0).balanceOf(address(this));
        _balance1 = IERC20(_token1).balanceOf(address(this));
        }

        uint amount0In = _balance0 > _reserve0 - amount0Out ? _balance0 - (_reserve0 - amount0Out) : 0;
        uint amount1In = _balance1 > _reserve1 - amount1Out ? _balance1 - (_reserve1 - amount1Out) : 0;
        require(amount0In > 0 || amount1In > 0, 'IIA'); // Pair: INSUFFICIENT_INPUT_AMOUNT

        { // scope for reserve{0,1}Adjusted, avoids stack too deep errors
        (address _token0, address _token1) = (token0, token1);
        uint256 pairFee = IPairFactory(factory).getFee(address(this), stable);
        if (amount0In > 0) _update0(amount0In * pairFee / 10000); // accrue fees for token0 and move them out of pool
        if (amount1In > 0) _update1(amount1In * pairFee / 10000); // accrue fees for token1 and move them out of pool
        _balance0 = IERC20(_token0).balanceOf(address(this)); // since we removed tokens, we need to reconfirm balances, can also simply use previous balance - amountIn/ 10000, but doing balanceOf again as safety check
        _balance1 = IERC20(_token1).balanceOf(address(this));
        // The curve, either x3y+y3x for stable pools, or x*y for volatile pools
        require(_k(_balance0, _balance1) >= _k(_reserve0, _reserve1), 'K'); // Pair: K
        }

        _update(_balance0, _balance1, _reserve0, _reserve1);
        emit Swap(msg.sender, amount0In, amount1In, amount0Out, amount1Out, to);
    }

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

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

    function _f(uint x0, uint y) internal pure returns (uint) {
        return x0*(y*y/1e18*y/1e18)/1e18+(x0*x0/1e18*x0/1e18)*y/1e18;
    }

    function _d(uint x0, uint y) internal pure returns (uint) {
        return 3*x0*(y*y/1e18)/1e18+(x0*x0/1e18*x0/1e18);
    }

    function _get_y(uint x0, uint xy, uint y) internal pure returns (uint) {
        for (uint i = 0; i < 255; i++) {
            uint y_prev = y;
            uint k = _f(x0, y);
            if (k < xy) {
                uint dy = (xy - k)*1e18/_d(x0, y);
                y = y + dy;
            } else {
                uint dy = (k - xy)*1e18/_d(x0, y);
                y = y - dy;
            }
            if (y > y_prev) {
                if (y - y_prev <= 1) {
                    return y;
                }
            } else {
                if (y_prev - y <= 1) {
                    return y;
                }
            }
        }
        return y;
    }

    function getAmountOut(uint amountIn, address tokenIn) external view returns (uint) {
        (uint _reserve0, uint _reserve1) = (reserve0, reserve1);
        amountIn -= amountIn * IPairFactory(factory).getFee(address(this), stable) / 10000; // remove fee from amount received
        return _getAmountOut(amountIn, tokenIn, _reserve0, _reserve1);
    }

    function _getAmountOut(uint amountIn, address tokenIn, uint _reserve0, uint _reserve1) internal view returns (uint) {
        if (stable) {
            uint xy =  _k(_reserve0, _reserve1);
            _reserve0 = _reserve0 * 1e18 / decimals0;
            _reserve1 = _reserve1 * 1e18 / decimals1;
            (uint reserveA, uint reserveB) = tokenIn == token0 ? (_reserve0, _reserve1) : (_reserve1, _reserve0);
            amountIn = tokenIn == token0 ? amountIn * 1e18 / decimals0 : amountIn * 1e18 / decimals1;
            uint y = reserveB - _get_y(amountIn+reserveA, xy, reserveB);
            return y * (tokenIn == token0 ? decimals1 : decimals0) / 1e18;
        } else {
            (uint reserveA, uint reserveB) = tokenIn == token0 ? (_reserve0, _reserve1) : (_reserve1, _reserve0);
            return amountIn * reserveB / (reserveA + amountIn);
        }
    }

    function _k(uint x, uint y) internal view returns (uint) {
        if (stable) {
            uint _x = x * 1e18 / decimals0;
            uint _y = y * 1e18 / decimals1;
            uint _a = (_x * _y) / 1e18;
            uint _b = ((_x * _x) / 1e18 + (_y * _y) / 1e18);
            return _a * _b / 1e18;  // x3y+y3x >= k
        } else {
            return x * y; // xy >= k
        }
    }

    function _mint(address dst, uint amount) internal {
        _updateFor(dst); // balances must be updated on mint/burn/transfer
        totalSupply += amount;
        balanceOf[dst] += amount;
        emit Transfer(address(0), dst, amount);
    }

    function _burn(address src, uint amount) internal {
        _updateFor(src);
        totalSupply -= amount;
        balanceOf[src] -= amount;
        emit Transfer(src, address(0), amount);
    }

    function approve(address spender, uint amount) external returns (bool) {
        allowance[msg.sender][spender] = amount;

        emit Approval(msg.sender, spender, amount);
        return true;
    }

    function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external {
        require(deadline >= block.timestamp, 'EXP');
        bytes32 DOMAIN_SEPARATOR = keccak256(
            abi.encode(
                keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)'),
                keccak256(bytes(name)),
                keccak256(bytes('1')),
                block.chainid,
                address(this)
            )
        );
        bytes32 digest = keccak256(
            abi.encodePacked(
                '\x19\x01',
                DOMAIN_SEPARATOR,
                keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline))
            )
        );
        address recoveredAddress = ECDSA.recover(digest, v, r, s);
        require(recoveredAddress == owner, 'ISIG');
        allowance[owner][spender] = value;

        emit Approval(owner, spender, value);
    }

    function transfer(address dst, uint amount) external returns (bool) {
        _transferTokens(msg.sender, dst, amount);
        return true;
    }

    function transferFrom(address src, address dst, uint amount) external returns (bool) {
        address spender = msg.sender;
        uint spenderAllowance = allowance[src][spender];

        if (spender != src && spenderAllowance != type(uint).max) {
            uint newAllowance = spenderAllowance - amount;
            allowance[src][spender] = newAllowance;

            emit Approval(src, spender, newAllowance);
        }

        _transferTokens(src, dst, amount);
        return true;
    }

    function _transferTokens(address src, address dst, uint amount) internal {
        _updateFor(src); // update fee position for src
        _updateFor(dst); // update fee position for dst

        balanceOf[src] -= amount;
        balanceOf[dst] += amount;

        emit Transfer(src, dst, amount);
    }

    function _safeTransfer(address token,address to,uint256 value) internal {
        require(token.code.length > 0, "CODELEN");
        (bool success, bytes memory data) = token.call(abi.encodeCall(IERC20.transfer, (to, value)));
        require(success && (data.length == 0 || abi.decode(data, (bool))), "IST");
    }

    function _getMinimumLiquidity(uint amount0, uint amount1) internal view returns (uint) {
        uint totalLiquidity = Math.sqrt(amount0 * amount1);

        // We need minimum reserves to satisfy:
        // _x >= 1e14 where _x = minReserve0 * 1e18 / decimals0
        // _y >= 1e14 where _y = minReserve1 * 1e18 / decimals1

        // This means:
        // minReserve0 >= 1e14 * decimals0 / 1e18
        // minReserve1 >= 1e14 * decimals1 / 1e18
        // minReserve0 >= decimals0 / 1e4
        // minReserve1 >= decimals1 / 1e4

        // Since minReserve0 = (amount0 * minimumLiquidity) / totalLiquidity
        // We can solve for minimumLiquidity:
        // minimumLiquidity >= (decimals0 / 1e4) * totalLiquidity / amount0
        // minimumLiquidity >= (decimals1 / 1e4) * totalLiquidity / amount1

        uint minLiquidity0 = (decimals0 * totalLiquidity) / (1e4 * amount0);
        uint minLiquidity1 = (decimals1 * totalLiquidity) / (1e4 * amount1);
        //

        // Use the maximum of the two requirements
        return Math.max(minLiquidity0, minLiquidity1);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV // Deprecated in v4.8
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            /// @solidity memory-safe-assembly
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, "\x19Ethereum Signed Message:\n32")
            mstore(0x1c, hash)
            message := keccak256(0x00, 0x3c)
        }
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, "\x19\x01")
            mstore(add(ptr, 0x02), domainSeparator)
            mstore(add(ptr, 0x22), structHash)
            data := keccak256(ptr, 0x42)
        }
    }

    /**
     * @dev Returns an Ethereum Signed Data with intended validator, created from a
     * `validator` and `data` according to the version 0 of EIP-191.
     *
     * See {recover}.
     */
    function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x00", validator, data));
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1, "Math: mulDiv overflow");

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10 ** 64) {
                value /= 10 ** 64;
                result += 64;
            }
            if (value >= 10 ** 32) {
                value /= 10 ** 32;
                result += 32;
            }
            if (value >= 10 ** 16) {
                value /= 10 ** 16;
                result += 16;
            }
            if (value >= 10 ** 8) {
                value /= 10 ** 8;
                result += 8;
            }
            if (value >= 10 ** 4) {
                value /= 10 ** 4;
                result += 4;
            }
            if (value >= 10 ** 2) {
                value /= 10 ** 2;
                result += 2;
            }
            if (value >= 10 ** 1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMath {
    /**
     * @dev Returns the largest of two signed numbers.
     */
    function max(int256 a, int256 b) internal pure returns (int256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two signed numbers.
     */
    function min(int256 a, int256 b) internal pure returns (int256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";
import "./math/SignedMath.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toString(int256 value) internal pure returns (string memory) {
        return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

interface IERC20 {
    function totalSupply() external view returns (uint256);
    function transfer(address recipient, uint amount) external returns (bool);
    function decimals() external view returns (uint8);
    function symbol() external view returns (string memory);
    function balanceOf(address) external view returns (uint);
    function transferFrom(address sender, address recipient, uint amount) external returns (bool);
    function allowance(address owner, address spender) external view returns (uint);
    function approve(address spender, uint value) external returns (bool);

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

// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

interface IPair {
    function metadata() external view returns (uint dec0, uint dec1, uint r0, uint r1, bool st, address t0, address t1);
    function claimFees() external returns (uint, uint);
    function tokens() external view returns (address, address);
    function token0() external view returns (address);
    function token1() external view returns (address);
    function transferFrom(address src, address dst, uint amount) external returns (bool);
    function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
    function burn(address to) external returns (uint amount0, uint amount1);
    function mint(address to) external returns (uint liquidity);
    function getReserves() external view returns (uint _reserve0, uint _reserve1, uint _blockTimestampLast);
    function getAmountOut(uint, address) external view returns (uint);

    function name() external view returns(string memory);
    function symbol() external view returns(string memory);
    function totalSupply() external view returns (uint);
    function decimals() external view returns (uint8);

    function claimable0(address _user) external view returns (uint);
    function claimable1(address _user) external view returns (uint);

    function isStable() external view returns(bool);
    function allowance(address owner, address spender) external view returns (uint);
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

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

// SPDX-License-Identifier: MIT OR GPL-3.0-or-later
pragma solidity 0.8.13;

interface IPairFactory {
    function allPairsLength() external view returns (uint);
    function isPair(address pair) external view returns (bool);
    function allPairs(uint index) external view returns (address);
    function pairCodeHash() external view returns (bytes32);
    function pairGenerator() external view returns (address);
    function getPair(address tokenA, address token, bool stable) external view returns (address);
    function createPair(address tokenA, address tokenB, bool stable) external returns (address pair);
    function getFee(address _pairAddress, bool _stable) external view returns(uint256);
    function dibs() external view returns (address);
    function getReferralFee(address _pairAddress) external view returns (uint256);
    function isPaused() external view returns (bool);
}

// SPDX-License-Identifier: MIT OR GPL-3.0-or-later
pragma solidity 0.8.13;

interface IPairGenerator {
    function factory() external view returns (address);
    function pairCodeHash() external pure returns (bytes32);
    function getInitializable() external view returns (address, address, bool);
    function createPair(address token0, address token1, bool stable) external returns (address pair);
}

File 11 of 13 : Constants.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.13;

// Define constants as standalone constants that can be imported by name
uint256 constant MAX_FEE = 500; // 5% maximum fee
uint256 constant MAX_REFERRAL_FEE_CAP = 500; // 5% max referral fee
uint256 constant REFERRAL_FEE_DENOMINATOR = 10000; // basis points denominator

// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

library Math {
    function max(uint a, uint b) internal pure returns (uint) {
        return a >= b ? a : b;
    }
    function min(uint a, uint b) internal pure returns (uint) {
        return a < b ? a : b;
    }
    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;
        }
    }
    function cbrt(uint256 n) internal pure returns (uint256) { unchecked {
        uint256 x = 0;
        for (uint256 y = 1 << 255; y > 0; y >>= 3) {
            x <<= 1;
            uint256 z = 3 * x * (x + 1) + 1;
            if (n / y >= z) {
                n -= y * z;
                x += 1;
            }
        }
        return x;
    }}
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

import './interfaces/IERC20.sol';

// Pair Fees contract is used as a 1:1 pair relationship to split out fees, this ensures that the curve does not need to be modified for LP shares
contract PairFees {

    address internal immutable pair; // The pair it is bonded to
    address internal immutable token0; // token0 of pair, saved localy and statically for gas optimization
    address internal immutable token1; // Token1 of pair, saved localy and statically for gas optimization

    constructor(address _token0, address _token1) {
        pair = msg.sender;
        token0 = _token0;
        token1 = _token1;
    }

    function _safeTransfer(address token,address to,uint256 value) internal {
        require(token.code.length > 0);
        (bool success, bytes memory data) = token.call(abi.encodeCall(IERC20.transfer, (to, value)));
        require(success && (data.length == 0 || abi.decode(data, (bool))));
    }

    // Allow the pair to transfer fees to users
    function claimFeesFor(address recipient, uint amount0, uint amount1) external {
        require(msg.sender == pair);
        if (amount0 > 0) _safeTransfer(token0, recipient, amount0);
        if (amount1 > 0) _safeTransfer(token1, recipient, amount1);
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

API
[{"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":"amount","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":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"Claim","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":"Fees","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":"uint256","name":"reserve0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"reserve1","type":"uint256"}],"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":"amount","type":"uint256"}],"name":"Transfer","type":"event"},{"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":"amount","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":[],"name":"blockTimestampLast","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":[],"name":"claimFees","outputs":[{"internalType":"uint256","name":"claimed0","type":"uint256"},{"internalType":"uint256","name":"claimed1","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimable0","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimable1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"current","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentCumulativePrices","outputs":[{"internalType":"uint256","name":"reserve0Cumulative","type":"uint256"},{"internalType":"uint256","name":"reserve1Cumulative","type":"uint256"},{"internalType":"uint256","name":"blockTimestamp","type":"uint256"}],"stateMutability":"view","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":[],"name":"fees","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"tokenIn","type":"address"}],"name":"getAmountOut","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReserves","outputs":[{"internalType":"uint256","name":"_reserve0","type":"uint256"},{"internalType":"uint256","name":"_reserve1","type":"uint256"},{"internalType":"uint256","name":"_blockTimestampLast","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"index0","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"index1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isStable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastObservation","outputs":[{"components":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"reserve0Cumulative","type":"uint256"},{"internalType":"uint256","name":"reserve1Cumulative","type":"uint256"}],"internalType":"struct Pair.Observation","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadata","outputs":[{"internalType":"uint256","name":"dec0","type":"uint256"},{"internalType":"uint256","name":"dec1","type":"uint256"},{"internalType":"uint256","name":"r0","type":"uint256"},{"internalType":"uint256","name":"r1","type":"uint256"},{"internalType":"bool","name":"st","type":"bool"},{"internalType":"address","name":"t0","type":"address"},{"internalType":"address","name":"t1","type":"address"}],"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":[],"name":"observationLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"observations","outputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"reserve0Cumulative","type":"uint256"},{"internalType":"uint256","name":"reserve1Cumulative","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":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"points","type":"uint256"}],"name":"prices","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"granularity","type":"uint256"}],"name":"quote","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reserve0","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reserve0CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reserve1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reserve1CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"points","type":"uint256"},{"internalType":"uint256","name":"window","type":"uint256"}],"name":"sample","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":"stable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"supplyIndex0","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"supplyIndex1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"tokens","outputs":[{"internalType":"address","name":"","type":"address"},{"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":"dst","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"src","type":"address"},{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]

0x61016060405260006002556000600c556000600d5560016012553480156200002657600080fd5b50336001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000066573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200008c91906200082c565b6001600160a01b0316610100816001600160a01b0316815250506000806000336001600160a01b031663eb13c4cf6040518163ffffffff1660e01b8152600401606060405180830381865afa158015620000ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000110919062000851565b8015156080526001600160a01b0380831660c052831660a05260405192955090935091508390839062000143906200075b565b6001600160a01b03928316815291166020820152604001604051809103906000f08015801562000177573d6000803e3d6000fd5b506001600160a01b031660e0528015620003a957826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015620001ca573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620001f49190810190620008ec565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000233573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526200025d9190810190620008ec565b60405160200162000270929190620009a4565b604051602081830303815290604052600090805190602001906200029692919062000769565b50826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015620002d6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620003009190810190620008ec565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa1580156200033f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620003699190810190620008ec565b6040516020016200037c929190620009ff565b60405160208183030381529060405260019080519060200190620003a292919062000769565b50620005c2565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015620003e8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620004129190810190620008ec565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000451573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526200047b9190810190620008ec565b6040516020016200048e92919062000a50565b60405160208183030381529060405260009080519060200190620004b492919062000769565b50826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015620004f4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526200051e9190810190620008ec565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa1580156200055d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620005879190810190620008ec565b6040516020016200059a92919062000aad565b60405160208183030381529060405260019080519060200190620005c092919062000769565b505b826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000601573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000627919062000acf565b6200063490600a62000c09565b6101208181525050816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200067b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620006a1919062000acf565b620006ae90600a62000c09565b6101405250506040805160608101825242815260006020820181815292820181815260068054600181018255925291517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f60039092029182015591517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40830155517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d41909101555062000c56565b61036e8062004c9a83390190565b828054620007779062000c1a565b90600052602060002090601f0160209004810192826200079b5760008555620007e6565b82601f10620007b657805160ff1916838001178555620007e6565b82800160010185558215620007e6579182015b82811115620007e6578251825591602001919060010190620007c9565b50620007f4929150620007f8565b5090565b5b80821115620007f45760008155600101620007f9565b80516001600160a01b03811681146200082757600080fd5b919050565b6000602082840312156200083f57600080fd5b6200084a826200080f565b9392505050565b6000806000606084860312156200086757600080fd5b62000872846200080f565b925062000882602085016200080f565b9150604084015180151581146200089857600080fd5b809150509250925092565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620008d6578181015183820152602001620008bc565b83811115620008e6576000848401525b50505050565b600060208284031215620008ff57600080fd5b81516001600160401b03808211156200091757600080fd5b818401915084601f8301126200092c57600080fd5b815181811115620009415762000941620008a3565b604051601f8201601f19908116603f011681019083821181831017156200096c576200096c620008a3565b816040528281528760208487010111156200098657600080fd5b62000999836020830160208801620008b9565b979650505050505050565b6e029ba30b13632ab189020a6a690169608d1b815260008351620009d081600f850160208801620008b9565b602f60f81b600f918401918201528351620009f3816010840160208801620008b9565b01601001949350505050565b6473414d4d2d60d81b81526000835162000a21816005850160208801620008b9565b602f60f81b600591840191820152835162000a44816006840160208801620008b9565b01600601949350505050565b7002b37b630ba34b632ab189020a6a690169607d1b81526000835162000a7e816011850160208801620008b9565b602f60f81b601191840191820152835162000aa1816012840160208801620008b9565b01601201949350505050565b6476414d4d2d60d81b81526000835162000a21816005850160208801620008b9565b60006020828403121562000ae257600080fd5b815160ff811681146200084a57600080fd5b634e487b7160e01b600052601160045260246000fd5b600181815b8085111562000b4b57816000190482111562000b2f5762000b2f62000af4565b8085161562000b3d57918102915b93841c939080029062000b0f565b509250929050565b60008262000b645750600162000c03565b8162000b735750600062000c03565b816001811462000b8c576002811462000b975762000bb7565b600191505062000c03565b60ff84111562000bab5762000bab62000af4565b50506001821b62000c03565b5060208310610133831016604e8410600b841016171562000bdc575081810a62000c03565b62000be8838362000b0a565b806000190482111562000bff5762000bff62000af4565b0290505b92915050565b60006200084a60ff84168362000b53565b600181811c9082168062000c2f57607f821691505b60208210810362000c5057634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e051610100516101205161014051613e6162000e396000396000818161046901528181612a3401528181612d1e01528181612de001528181612eeb0152613136015260008181610446015281816129f301528181612cdf01528181612e2201528181612ec501526130f20152600081816107430152818161083301528181610c9e015281816121e30152818161251f015281816125c201528181612779015261281c01526000818161062a01528181611e73015281816126c3015261291d0152600081816104f30152818161067f015281816107730152818161099501528181610c7901528181611524015281816118dd01528181611a0901528181611acf01528181611d1a01528181612353015281816128c401526128fc015260008181610331015281816104cb0152818161065a0152818161097401528181610c570152818161148e01528181611847015281816119de01528181611a4401528181611cf8015281816122cb0152818161266a015281816126a201528181612d6001528181612da701528181612e8c0152612f2f0152600081816102e9015281816103cf0152818161049b01528181610c2f015281816115d401528181611658015281816121b2015281816129cb0152612cab0152613e616000f3fe608060405234801561001057600080fd5b506004361061028a5760003560e01c80637ecebe001161015c578063bda39cad116100ce578063d294f09311610087578063d294f09314610795578063d505accf1461079d578063dd62ed3e146107b0578063ebeb31db146107db578063f140a35a146107e3578063fff6cae9146107f657600080fd5b8063bda39cad14610723578063bf944dbc1461072c578063c245febc14610735578063c45a01551461073e578063c5700a0214610765578063d21220a71461076e57600080fd5b80639d63848a116101205780639d63848a1461064c5780639e8cc04b146106aa5780639f767c88146106bd578063a1ac4d13146106dd578063a9059cbb146106fd578063bc25cf771461071057600080fd5b80637ecebe00146105ab57806389afcb44146105cb5780638a7b8cf2146105f357806395d89b411461061d5780639af1d35a1461062557600080fd5b806323b872dd116102005780634d5a9f8a116101b95780634d5a9f8a14610529578063517b3f82146105495780635881c4751461055c5780635a76f25e1461056f5780636a6278421461057857806370a082311461058b57600080fd5b806323b872dd146103f1578063252c09d714610404578063313ce5671461041757806332c0defd14610431578063392f37e91461043a578063443cb4bc1461052057600080fd5b80630dfe1681116102525780630dfe16811461032c57806313345fe11461036b57806318160ddd1461038b5780631df8c717146103a2578063205aabf1146103aa57806322be3de1146103ca57600080fd5b8063022c0d9f1461028f57806306fdde03146102a45780630902f1ac146102c257806309047bdd146102e7578063095ea7b314610319575b600080fd5b6102a261029d366004613876565b6107fe565b005b6102ac610eee565b6040516102b9919061393c565b60405180910390f35b6007546008546009545b604080519384526020840192909252908201526060016102b9565b7f00000000000000000000000000000000000000000000000000000000000000005b60405190151581526020016102b9565b61030961032736600461396f565b610f7c565b6103537f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016102b9565b61037e61037936600461399b565b610fe9565b6040516102b991906139d6565b61039460025481565b6040519081526020016102b9565b6102cc6111e5565b6103946103b8366004613a1a565b600f6020526000908152604090205481565b6103097f000000000000000000000000000000000000000000000000000000000000000081565b6103096103ff366004613a37565b611254565b6102cc610412366004613a78565b61131d565b61041f601281565b60405160ff90911681526020016102b9565b610394600c5481565b600754600854604080517f000000000000000000000000000000000000000000000000000000000000000081527f000000000000000000000000000000000000000000000000000000000000000060208201529081019290925260608201527f0000000000000000000000000000000000000000000000000000000000000000151560808201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660a08301527f00000000000000000000000000000000000000000000000000000000000000001660c082015260e0016102b9565b61039460075481565b610394610537366004613a1a565b60106020526000908152604090205481565b61039461055736600461396f565b611350565b61037e61056a366004613a91565b611438565b61039460085481565b610394610586366004613a1a565b611447565b610394610599366004613a1a565b60046020526000908152604090205481565b6103946105b9366004613a1a565b60056020526000908152604090205481565b6105de6105d9366004613a1a565b6117ff565b604080519283526020830191909152016102b9565b6105fb611ba9565b60408051825181526020808401519082015291810151908201526060016102b9565b6102ac611c29565b6103537f000000000000000000000000000000000000000000000000000000000000000081565b604080516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811682527f0000000000000000000000000000000000000000000000000000000000000000166020820152016102b9565b6103946106b8366004613a91565b611c36565b6103946106cb366004613a1a565b600e6020526000908152604090205481565b6103946106eb366004613a1a565b60116020526000908152604090205481565b61030961070b36600461396f565b611ca3565b6102a261071e366004613a1a565b611cb9565b610394600d5481565b610394600a5481565b610394600b5481565b6103537f000000000000000000000000000000000000000000000000000000000000000081565b61039460095481565b6103537f000000000000000000000000000000000000000000000000000000000000000081565b6105de611dea565b6102a26107ab366004613ac6565b611f11565b6103946107be366004613b3d565b600360209081526000928352604080842090915290825290205481565b600654610394565b6103946107f1366004613b76565b612197565b6102a261228b565b6012546001146108295760405162461bcd60e51b815260040161082090613b9b565b60405180910390fd5b60026012819055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b187bd266040518163ffffffff1660e01b8152600401602060405180830381865afa15801561088f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b39190613bbb565b156108e95760405162461bcd60e51b815260206004820152600660248201526514105554d15160d21b6044820152606401610820565b60008511806108f85750600084115b61092a5760405162461bcd60e51b8152602060048201526003602482015262494f4160e81b6044820152606401610820565b600754600854818710801561093e57508086105b61096f5760405162461bcd60e51b8152602060048201526002602482015261125360f21b6044820152606401610820565b6000807f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03898116908316148015906109e25750806001600160a01b0316896001600160a01b031614155b610a135760405162461bcd60e51b8152602060048201526002602482015261125560f21b6044820152606401610820565b8a15610a2457610a24828a8d6123d8565b8915610a3557610a35818a8c6123d8565b8615610aa257604051639a7bff7960e01b81526001600160a01b038a1690639a7bff7990610a6f9033908f908f908e908e90600401613bdd565b600060405180830381600087803b158015610a8957600080fd5b505af1158015610a9d573d6000803e3d6000fd5b505050505b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa158015610ae6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0a9190613c29565b6040516370a0823160e01b81523060048201529094506001600160a01b038216906370a0823190602401602060405180830381865afa158015610b51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b759190613c29565b9250505060008985610b879190613c58565b8311610b94576000610ba8565b610b9e8a86613c58565b610ba89084613c58565b90506000610bb68a86613c58565b8311610bc3576000610bd7565b610bcd8a86613c58565b610bd79084613c58565b90506000821180610be85750600081115b610c1a5760405162461bcd60e51b815260206004820152600360248201526249494160e81b6044820152606401610820565b60405163cc56b2c560e01b81523060048201527f0000000000000000000000000000000000000000000000000000000000000000151560248201527f0000000000000000000000000000000000000000000000000000000000000000907f0000000000000000000000000000000000000000000000000000000000000000906000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063cc56b2c590604401602060405180830381865afa158015610ced573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d119190613c29565b90508415610d3857610d38612710610d298388613c6f565b610d339190613c8e565b61251b565b8315610d5d57610d5d612710610d4e8387613c6f565b610d589190613c8e565b612775565b6040516370a0823160e01b81523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa158015610da1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dc59190613c29565b6040516370a0823160e01b81523060048201529097506001600160a01b038316906370a0823190602401602060405180830381865afa158015610e0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e309190613c29565b9550610e3c89896129c7565b610e4688886129c7565b1015610e785760405162461bcd60e51b81526020600482015260016024820152604b60f81b6044820152606401610820565b505050610e8784848888612b13565b60408051838152602081018390529081018c9052606081018b90526001600160a01b038a169033907fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229060800160405180910390a350506001601255505050505050505050565b60008054610efb90613cb0565b80601f0160208091040260200160405190810160405280929190818152602001828054610f2790613cb0565b8015610f745780601f10610f4957610100808354040283529160200191610f74565b820191906000526020600020905b815481529060010190602001808311610f5757829003601f168201915b505050505081565b3360008181526003602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610fd79086815260200190565b60405180910390a35060015b92915050565b606060008367ffffffffffffffff81111561100657611006613ce4565b60405190808252806020026020018201604052801561102f578160200160208202803683370190505b5060065490915060009061104590600190613c58565b905060006110538587613c6f565b61105d9083613c58565b90506000805b838310156111d5576110758784613cfa565b915060006006848154811061108c5761108c613d12565b906000526020600020906003020160000154600684815481106110b1576110b1613d12565b9060005260206000209060030201600001546110cd9190613c58565b9050600081600686815481106110e5576110e5613d12565b9060005260206000209060030201600101546006868154811061110a5761110a613d12565b9060005260206000209060030201600101546111269190613c58565b6111309190613c8e565b90506000826006878154811061114857611148613d12565b9060005260206000209060030201600201546006878154811061116d5761116d613d12565b9060005260206000209060030201600201546111899190613c58565b6111939190613c8e565b90506111a18c8e8484612ca7565b8885815181106111b3576111b3613d12565b60209081029190910101525050506001016111ce8784613cfa565b9250611063565b509293505050505b949350505050565b600a54600b5442600080806112036007546008546009549192909190565b92509250925083811461124c57600061121c8286613c58565b90506112288185613c6f565b6112329088613cfa565b965061123e8184613c6f565b6112489087613cfa565b9550505b505050909192565b6001600160a01b03831660008181526003602090815260408083203380855292528220549192909190821480159061128e57506000198114155b1561130457600061129f8583613c58565b6001600160a01b038881166000818152600360209081526040808320948916808452948252918290208590559051848152939450919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505b61130f868686612f9c565b6001925050505b9392505050565b6006818154811061132d57600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b60008061135b611ba9565b90506000806113686111e5565b508451919350915042036113d0576006805461138690600290613c58565b8154811061139657611396613d12565b9060005260206000209060030201604051806060016040529081600082015481526020016001820154815260200160028201548152505092505b82516000906113df9042613c58565b90506000818560200151856113f49190613c58565b6113fe9190613c8e565b90506000828660400151856114139190613c58565b61141d9190613c8e565b905061142b888a8484612ca7565b9998505050505050505050565b60606111dd8484846001610fe9565b600060125460011461146b5760405162461bcd60e51b815260040161082090613b9b565b60026012556007546008546040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156114dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115019190613c29565b6040516370a0823160e01b81523060048201529091506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa15801561156b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061158f9190613c29565b9050600061159d8584613c58565b905060006115ab8584613c58565b60025490915060008190036117285760006115ce6115c98486613c6f565b61305c565b905060007f0000000000000000000000000000000000000000000000000000000000000000156116095761160285856130cc565b905061160e565b506103e85b8082116116565760405162461bcd60e51b8152602060048201526016602482015275494e53554646494349454e545f4c495155494449545960501b6044820152606401610820565b7f00000000000000000000000000000000000000000000000000000000000000001561170a576000826116898388613c6f565b6116939190613c8e565b90506000836116a28488613c6f565b6116ac9190613c8e565b905060006116ba83836129c7565b116117075760405162461bcd60e51b815260206004820152601b60248201527f4d494e494d554d5f4c49515549444954595f544f4f5f534d414c4c00000000006044820152606401610820565b50505b6117148183613c58565b9950611721600082613170565b505061175d565b61175a876117368386613c6f565b6117409190613c8e565b8761174b8486613c6f565b6117559190613c8e565b613203565b97505b600088116117935760405162461bcd60e51b8152602060048201526003602482015262494c4d60e81b6044820152606401610820565b61179d8989613170565b6117a985858989612b13565b60408051848152602081018490526001600160a01b038b16917f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f910160405180910390a250506001601255509395945050505050565b6000806012546001146118245760405162461bcd60e51b815260040161082090613b9b565b60026012556007546008546040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015611896573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ba9190613c29565b6040516370a0823160e01b81523060048201529091506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015611924573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119489190613c29565b30600090815260046020526040902054600254919250908061196a8584613c6f565b6119749190613c8e565b9750806119818484613c6f565b61198b9190613c8e565b965060008811801561199d5750600087115b6119cf5760405162461bcd60e51b815260206004820152600360248201526224a62160e91b6044820152606401610820565b6119d93083613219565b611a047f00000000000000000000000000000000000000000000000000000000000000008a8a6123d8565b611a2f7f00000000000000000000000000000000000000000000000000000000000000008a896123d8565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015611a93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab79190613c29565b6040516370a0823160e01b81523060048201529094507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015611b1e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b429190613c29565b9250611b5084848888612b13565b60408051898152602081018990526001600160a01b038b169133917fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496910160405180910390a35050505050506001601281905550915091565b611bcd60405180606001604052806000815260200160008152602001600081525090565b60068054611bdd90600190613c58565b81548110611bed57611bed613d12565b90600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282015481525050905090565b60018054610efb90613cb0565b600080611c468585856001610fe9565b90506000805b8251811015611c8e57828181518110611c6757611c67613d12565b602002602001015182611c7a9190613cfa565b915080611c8681613d28565b915050611c4c565b50611c998482613c8e565b9695505050505050565b6000611cb0338484612f9c565b50600192915050565b601254600114611cdb5760405162461bcd60e51b815260040161082090613b9b565b60026012556007546040516370a0823160e01b81523060048201527f0000000000000000000000000000000000000000000000000000000000000000917f000000000000000000000000000000000000000000000000000000000000000091611da89184918691906001600160a01b038416906370a08231906024015b602060405180830381865afa158015611d75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d999190613c29565b611da39190613c58565b6123d8565b6008546040516370a0823160e01b8152306004820152611de09183918691906001600160a01b038416906370a0823190602401611d58565b5050600160125550565b600080611df6336132a4565b50503360009081526010602090815260408083205460119092529091205481151580611e225750600081115b15611f0d573360008181526010602090815260408083208390556011909152808220919091555163299e7ae760e11b8152600481019190915260248101839052604481018290526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063533cf5ce90606401600060405180830381600087803b158015611eb757600080fd5b505af1158015611ecb573d6000803e3d6000fd5b505060408051858152602081018590523393508392507f865ca08d59f5cb456e85cd2f7ef63664ea4f73327414e9d8152c4158b0e94645910160405180910390a35b9091565b42841015611f475760405162461bcd60e51b815260206004820152600360248201526204558560ec1b6044820152606401610820565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6000604051611f799190613d41565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160408051601f1981840301815291815281516020928301206001600160a01b038b1660009081526005909352908220805491935083917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c91908761204483613d28565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e001604051602081830303815290604052805190602001206040516020016120bd92919061190160f01b81526002810192909252602282015260420190565b60405160208183030381529060405280519060200120905060006120e382878787613404565b9050896001600160a01b0316816001600160a01b03161461212f5760405162461bcd60e51b8152600401610820906020808252600490820152634953494760e01b604082015260600190565b6001600160a01b038a81166000818152600360209081526040808320948e16808452948252918290208c905590518b81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050505050565b60075460085460405163cc56b2c560e01b81523060048201527f0000000000000000000000000000000000000000000000000000000000000000151560248201526000929190612710907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063cc56b2c590604401602060405180830381865afa158015612232573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122569190613c29565b6122609087613c6f565b61226a9190613c8e565b6122749086613c58565b945061228285858484612ca7565b95945050505050565b6012546001146122ad5760405162461bcd60e51b815260040161082090613b9b565b60026012556040516370a0823160e01b81523060048201526123d1907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561231a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061233e9190613c29565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156123a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123c69190613c29565b600754600854612b13565b6001601255565b6000836001600160a01b03163b1161241c5760405162461bcd60e51b815260206004820152600760248201526621a7a222a622a760c91b6044820152606401610820565b6040516001600160a01b03838116602483015260448201839052600091829186169060640160408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516124769190613ddc565b6000604051808303816000865af19150503d80600081146124b3576040519150601f19603f3d011682016040523d82523d6000602084013e6124b8565b606091505b50915091508180156124e25750805115806124e25750808060200190518101906124e29190613bbb565b6125145760405162461bcd60e51b81526020600482015260036024820152621254d560ea1b6044820152606401610820565b5050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637be1623e6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561257b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061259f9190613df8565b604051632db39b2f60e21b81523060048201529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063b6ce6cbc90602401602060405180830381865afa158015612609573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061262d9190613c29565b905060006001600160a01b03831661264657600061265d565b6127106126538386613c6f565b61265d9190613c8e565b9050801561269d576126907f000000000000000000000000000000000000000000000000000000000000000084836123d8565b61269a8185613c58565b93505b6126e87f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000866123d8565b60025460009061270086670de0b6b3a7640000613c6f565b61270a9190613c8e565b9050801561272a5780600c60008282546127249190613cfa565b90915550505b337f112c256902bf554b6ed882d2936687aaeb4225e8cd5b51303c90ca6cf43a86026127568488613cfa565b6040805191825260006020830152015b60405180910390a25050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637be1623e6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127f99190613df8565b604051632db39b2f60e21b81523060048201529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063b6ce6cbc90602401602060405180830381865afa158015612863573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128879190613c29565b905060006001600160a01b0383166128a05760006128b7565b6127106128ad8386613c6f565b6128b79190613c8e565b905080156128f7576128ea7f000000000000000000000000000000000000000000000000000000000000000084836123d8565b6128f48185613c58565b93505b6129427f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000866123d8565b60025460009061295a86670de0b6b3a7640000613c6f565b6129649190613c8e565b905080156129845780600d600082825461297e9190613cfa565b90915550505b337f112c256902bf554b6ed882d2936687aaeb4225e8cd5b51303c90ca6cf43a860260006129b28589613cfa565b60408051928352602083019190915201612766565b60007f000000000000000000000000000000000000000000000000000000000000000015612b025760007f0000000000000000000000000000000000000000000000000000000000000000612a2485670de0b6b3a7640000613c6f565b612a2e9190613c8e565b905060007f0000000000000000000000000000000000000000000000000000000000000000612a6585670de0b6b3a7640000613c6f565b612a6f9190613c8e565b90506000670de0b6b3a7640000612a868385613c6f565b612a909190613c8e565b90506000670de0b6b3a7640000612aa78480613c6f565b612ab19190613c8e565b670de0b6b3a7640000612ac48680613c6f565b612ace9190613c8e565b612ad89190613cfa565b9050670de0b6b3a7640000612aed8284613c6f565b612af79190613c8e565b945050505050610fe3565b612b0c8284613c6f565b9050610fe3565b6009544290600090612b259083613c58565b9050600081118015612b3657508315155b8015612b4157508215155b15612b8857612b508185613c6f565b600a6000828254612b619190613cfa565b90915550612b7190508184613c6f565b600b6000828254612b829190613cfa565b90915550505b6000612b92611ba9565b8051909150612ba19084613c58565b9150610708821115612c565760408051606081018252848152600a5460208201908152600b549282019283526006805460018101825560009190915291517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f600390930292830155517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4082015590517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d41909101555b60078790556008869055600983905560408051888152602081018890527fcf2aa50876cdfbb541206f89af0ee78d44a2abf8d328e37fa4917f982149848a910160405180910390a150505050505050565b60007f000000000000000000000000000000000000000000000000000000000000000015612f2a576000612cdb84846129c7565b90507f0000000000000000000000000000000000000000000000000000000000000000612d1085670de0b6b3a7640000613c6f565b612d1a9190613c8e565b93507f0000000000000000000000000000000000000000000000000000000000000000612d4f84670de0b6b3a7640000613c6f565b612d599190613c8e565b92506000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316876001600160a01b031614612d9e578486612da1565b85855b915091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316876001600160a01b031614612e20577f0000000000000000000000000000000000000000000000000000000000000000612e1189670de0b6b3a7640000613c6f565b612e1b9190613c8e565b612e5d565b7f0000000000000000000000000000000000000000000000000000000000000000612e5389670de0b6b3a7640000613c6f565b612e5d9190613c8e565b97506000612e75612e6e848b613cfa565b858461342c565b612e7f9083613c58565b9050670de0b6b3a76400007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316896001600160a01b031614612ee9577f0000000000000000000000000000000000000000000000000000000000000000612f0b565b7f00000000000000000000000000000000000000000000000000000000000000005b612f159083613c6f565b612f1f9190613c8e565b9450505050506111dd565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316866001600160a01b031614612f6d578385612f70565b84845b9092509050612f7f8783613cfa565b612f898289613c6f565b612f939190613c8e565b925050506111dd565b612fa5836132a4565b612fae826132a4565b6001600160a01b03831660009081526004602052604081208054839290612fd6908490613c58565b90915550506001600160a01b03821660009081526004602052604081208054839290613003908490613cfa565b92505081905550816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161304f91815260200190565b60405180910390a3505050565b600060038211156130bd5750806000613076600283613c8e565b613081906001613cfa565b90505b818110156130b75790508060028161309c8186613c8e565b6130a69190613cfa565b6130b09190613c8e565b9050613084565b50919050565b81156130c7575060015b919050565b6000806130dc6115c98486613c6f565b905060006130ec85612710613c6f565b613116837f0000000000000000000000000000000000000000000000000000000000000000613c6f565b6131209190613c8e565b9050600061313085612710613c6f565b61315a847f0000000000000000000000000000000000000000000000000000000000000000613c6f565b6131649190613c8e565b9050611c99828261353b565b613179826132a4565b806002600082825461318b9190613cfa565b90915550506001600160a01b038216600090815260046020526040812080548392906131b8908490613cfa565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020015b60405180910390a35050565b60008183106132125781611316565b5090919050565b613222826132a4565b80600260008282546132349190613c58565b90915550506001600160a01b03821660009081526004602052604081208054839290613261908490613c58565b90915550506040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020016131f7565b6001600160a01b03811660009081526004602052604090205480156133d2576001600160a01b0382166000908152600e602090815260408083208054600f8085529285208054600c54600d549481905594909552829055936133068584613c58565b905060006133148584613c58565b9050811561336f576000670de0b6b3a7640000613331848a613c6f565b61333b9190613c8e565b6001600160a01b038a16600090815260106020526040812080549293508392909190613368908490613cfa565b9091555050505b80156133c8576000670de0b6b3a764000061338a838a613c6f565b6133949190613c8e565b6001600160a01b038a166000908152601160205260408120805492935083929091906133c1908490613cfa565b9091555050505b5050505050505050565b600c546001600160a01b0383166000908152600e6020908152604080832093909355600d54600f909152919020555050565b60008060006134158787878761354b565b915091506134228161360f565b5095945050505050565b6000805b60ff81101561353257826000613446878361375c565b90508581101561349657600061345c88876137f9565b6134668389613c58565b61347890670de0b6b3a7640000613c6f565b6134829190613c8e565b905061348e8187613cfa565b9550506134d8565b60006134a288876137f9565b6134ac8884613c58565b6134be90670de0b6b3a7640000613c6f565b6134c89190613c8e565b90506134d48187613c58565b9550505b818511156135015760016134ec8387613c58565b116134fc57849350505050611316565b61351d565b600161350d8684613c58565b1161351d57849350505050611316565b5050808061352a90613d28565b915050613430565b50909392505050565b6000818310156132125781611316565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156135825750600090506003613606565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156135d6573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166135ff57600060019250925050613606565b9150600090505b94509492505050565b600081600481111561362357613623613e15565b0361362b5750565b600181600481111561363f5761363f613e15565b0361368c5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610820565b60028160048111156136a0576136a0613e15565b036136ed5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610820565b600381600481111561370157613701613e15565b036137595760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610820565b50565b6000670de0b6b3a7640000828185816137758280613c6f565b61377f9190613c8e565b6137899190613c6f565b6137939190613c8e565b61379d9190613c6f565b6137a79190613c8e565b670de0b6b3a76400008084816137bd8280613c6f565b6137c79190613c8e565b6137d19190613c6f565b6137db9190613c8e565b6137e59086613c6f565b6137ef9190613c8e565b6113169190613cfa565b6000670de0b6b3a764000083816138108280613c6f565b61381a9190613c8e565b6138249190613c6f565b61382e9190613c8e565b670de0b6b3a7640000806138428580613c6f565b61384c9190613c8e565b613857866003613c6f565b6137e59190613c6f565b6001600160a01b038116811461375957600080fd5b60008060008060006080868803121561388e57600080fd5b853594506020860135935060408601356138a781613861565b9250606086013567ffffffffffffffff808211156138c457600080fd5b818801915088601f8301126138d857600080fd5b8135818111156138e757600080fd5b8960208285010111156138f957600080fd5b9699959850939650602001949392505050565b60005b8381101561392757818101518382015260200161390f565b83811115613936576000848401525b50505050565b602081526000825180602084015261395b81604085016020870161390c565b601f01601f19169190910160400192915050565b6000806040838503121561398257600080fd5b823561398d81613861565b946020939093013593505050565b600080600080608085870312156139b157600080fd5b84356139bc81613861565b966020860135965060408601359560600135945092505050565b6020808252825182820181905260009190848201906040850190845b81811015613a0e578351835292840192918401916001016139f2565b50909695505050505050565b600060208284031215613a2c57600080fd5b813561131681613861565b600080600060608486031215613a4c57600080fd5b8335613a5781613861565b92506020840135613a6781613861565b929592945050506040919091013590565b600060208284031215613a8a57600080fd5b5035919050565b600080600060608486031215613aa657600080fd5b8335613ab181613861565b95602085013595506040909401359392505050565b600080600080600080600060e0888a031215613ae157600080fd5b8735613aec81613861565b96506020880135613afc81613861565b95506040880135945060608801359350608088013560ff81168114613b2057600080fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215613b5057600080fd5b8235613b5b81613861565b91506020830135613b6b81613861565b809150509250929050565b60008060408385031215613b8957600080fd5b823591506020830135613b6b81613861565b6020808252600690820152651313d0d2d15160d21b604082015260600190565b600060208284031215613bcd57600080fd5b8151801515811461131657600080fd5b60018060a01b038616815284602082015283604082015260806060820152816080820152818360a0830137600081830160a090810191909152601f909201601f19160101949350505050565b600060208284031215613c3b57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600082821015613c6a57613c6a613c42565b500390565b6000816000190483118215151615613c8957613c89613c42565b500290565b600082613cab57634e487b7160e01b600052601260045260246000fd5b500490565b600181811c90821680613cc457607f821691505b6020821081036130b757634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b60008219821115613d0d57613d0d613c42565b500190565b634e487b7160e01b600052603260045260246000fd5b600060018201613d3a57613d3a613c42565b5060010190565b600080835481600182811c915080831680613d5d57607f831692505b60208084108203613d7c57634e487b7160e01b86526022600452602486fd5b818015613d905760018114613da157613dce565b60ff19861689528489019650613dce565b60008a81526020902060005b86811015613dc65781548b820152908501908301613dad565b505084890196505b509498975050505050505050565b60008251613dee81846020870161390c565b9190910192915050565b600060208284031215613e0a57600080fd5b815161131681613861565b634e487b7160e01b600052602160045260246000fdfea26469706673582212209f12e1429f009efcca5c4b1939a419537d1907553ec77c5c8d42a42a82c38ab364736f6c634300080d003360e060405234801561001057600080fd5b5060405161036e38038061036e83398101604081905261002f91610066565b336080526001600160a01b0391821660a0521660c052610099565b80516001600160a01b038116811461006157600080fd5b919050565b6000806040838503121561007957600080fd5b6100828361004a565b91506100906020840161004a565b90509250929050565b60805160a05160c0516102a96100c5600039600060b601526000608501526000605001526102a96000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063533cf5ce14610030575b600080fd5b61004361003e3660046101ce565b610045565b005b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461007a57600080fd5b81156100ab576100ab7f000000000000000000000000000000000000000000000000000000000000000084846100e1565b80156100dc576100dc7f000000000000000000000000000000000000000000000000000000000000000084836100e1565b505050565b6000836001600160a01b03163b116100f857600080fd5b6040516001600160a01b03838116602483015260448201839052600091829186169060640160408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b17905251610152919061020f565b6000604051808303816000865af19150503d806000811461018f576040519150601f19603f3d011682016040523d82523d6000602084013e610194565b606091505b50915091508180156101be5750805115806101be5750808060200190518101906101be919061024a565b6101c757600080fd5b5050505050565b6000806000606084860312156101e357600080fd5b83356001600160a01b03811681146101fa57600080fd5b95602085013595506040909401359392505050565b6000825160005b818110156102305760208186018101518583015201610216565b8181111561023f576000828501525b509190910192915050565b60006020828403121561025c57600080fd5b8151801515811461026c57600080fd5b939250505056fea2646970667358221220c08d2c0d9771eca0389340a821cc8a9edc67727a0fa753daf367d9a87b1fbff564736f6c634300080d0033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061028a5760003560e01c80637ecebe001161015c578063bda39cad116100ce578063d294f09311610087578063d294f09314610795578063d505accf1461079d578063dd62ed3e146107b0578063ebeb31db146107db578063f140a35a146107e3578063fff6cae9146107f657600080fd5b8063bda39cad14610723578063bf944dbc1461072c578063c245febc14610735578063c45a01551461073e578063c5700a0214610765578063d21220a71461076e57600080fd5b80639d63848a116101205780639d63848a1461064c5780639e8cc04b146106aa5780639f767c88146106bd578063a1ac4d13146106dd578063a9059cbb146106fd578063bc25cf771461071057600080fd5b80637ecebe00146105ab57806389afcb44146105cb5780638a7b8cf2146105f357806395d89b411461061d5780639af1d35a1461062557600080fd5b806323b872dd116102005780634d5a9f8a116101b95780634d5a9f8a14610529578063517b3f82146105495780635881c4751461055c5780635a76f25e1461056f5780636a6278421461057857806370a082311461058b57600080fd5b806323b872dd146103f1578063252c09d714610404578063313ce5671461041757806332c0defd14610431578063392f37e91461043a578063443cb4bc1461052057600080fd5b80630dfe1681116102525780630dfe16811461032c57806313345fe11461036b57806318160ddd1461038b5780631df8c717146103a2578063205aabf1146103aa57806322be3de1146103ca57600080fd5b8063022c0d9f1461028f57806306fdde03146102a45780630902f1ac146102c257806309047bdd146102e7578063095ea7b314610319575b600080fd5b6102a261029d366004613876565b6107fe565b005b6102ac610eee565b6040516102b9919061393c565b60405180910390f35b6007546008546009545b604080519384526020840192909252908201526060016102b9565b7f00000000000000000000000000000000000000000000000000000000000000005b60405190151581526020016102b9565b61030961032736600461396f565b610f7c565b6103537f00000000000000000000000000da8466b296e382e5da2bf20962d0cb87200c7881565b6040516001600160a01b0390911681526020016102b9565b61037e61037936600461399b565b610fe9565b6040516102b991906139d6565b61039460025481565b6040519081526020016102b9565b6102cc6111e5565b6103946103b8366004613a1a565b600f6020526000908152604090205481565b6103097f000000000000000000000000000000000000000000000000000000000000000081565b6103096103ff366004613a37565b611254565b6102cc610412366004613a78565b61131d565b61041f601281565b60405160ff90911681526020016102b9565b610394600c5481565b600754600854604080517f0000000000000000000000000000000000000000000000000de0b6b3a764000081527f00000000000000000000000000000000000000000000000000000000000f424060208201529081019290925260608201527f0000000000000000000000000000000000000000000000000000000000000000151560808201526001600160a01b037f00000000000000000000000000da8466b296e382e5da2bf20962d0cb87200c78811660a08301527f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb481660c082015260e0016102b9565b61039460075481565b610394610537366004613a1a565b60106020526000908152604090205481565b61039461055736600461396f565b611350565b61037e61056a366004613a91565b611438565b61039460085481565b610394610586366004613a1a565b611447565b610394610599366004613a1a565b60046020526000908152604090205481565b6103946105b9366004613a1a565b60056020526000908152604090205481565b6105de6105d9366004613a1a565b6117ff565b604080519283526020830191909152016102b9565b6105fb611ba9565b60408051825181526020808401519082015291810151908201526060016102b9565b6102ac611c29565b6103537f0000000000000000000000009d2fe4ba9d7d6800f0a62f5d638aac06b4e3047e81565b604080516001600160a01b037f00000000000000000000000000da8466b296e382e5da2bf20962d0cb87200c78811682527f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48166020820152016102b9565b6103946106b8366004613a91565b611c36565b6103946106cb366004613a1a565b600e6020526000908152604090205481565b6103946106eb366004613a1a565b60116020526000908152604090205481565b61030961070b36600461396f565b611ca3565b6102a261071e366004613a1a565b611cb9565b610394600d5481565b610394600a5481565b610394600b5481565b6103537f0000000000000000000000005aef44edfc5a7edd30826c724ea12d7be15bdc3081565b61039460095481565b6103537f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b6105de611dea565b6102a26107ab366004613ac6565b611f11565b6103946107be366004613b3d565b600360209081526000928352604080842090915290825290205481565b600654610394565b6103946107f1366004613b76565b612197565b6102a261228b565b6012546001146108295760405162461bcd60e51b815260040161082090613b9b565b60405180910390fd5b60026012819055507f0000000000000000000000005aef44edfc5a7edd30826c724ea12d7be15bdc306001600160a01b031663b187bd266040518163ffffffff1660e01b8152600401602060405180830381865afa15801561088f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b39190613bbb565b156108e95760405162461bcd60e51b815260206004820152600660248201526514105554d15160d21b6044820152606401610820565b60008511806108f85750600084115b61092a5760405162461bcd60e51b8152602060048201526003602482015262494f4160e81b6044820152606401610820565b600754600854818710801561093e57508086105b61096f5760405162461bcd60e51b8152602060048201526002602482015261125360f21b6044820152606401610820565b6000807f00000000000000000000000000da8466b296e382e5da2bf20962d0cb87200c787f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b03898116908316148015906109e25750806001600160a01b0316896001600160a01b031614155b610a135760405162461bcd60e51b8152602060048201526002602482015261125560f21b6044820152606401610820565b8a15610a2457610a24828a8d6123d8565b8915610a3557610a35818a8c6123d8565b8615610aa257604051639a7bff7960e01b81526001600160a01b038a1690639a7bff7990610a6f9033908f908f908e908e90600401613bdd565b600060405180830381600087803b158015610a8957600080fd5b505af1158015610a9d573d6000803e3d6000fd5b505050505b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa158015610ae6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0a9190613c29565b6040516370a0823160e01b81523060048201529094506001600160a01b038216906370a0823190602401602060405180830381865afa158015610b51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b759190613c29565b9250505060008985610b879190613c58565b8311610b94576000610ba8565b610b9e8a86613c58565b610ba89084613c58565b90506000610bb68a86613c58565b8311610bc3576000610bd7565b610bcd8a86613c58565b610bd79084613c58565b90506000821180610be85750600081115b610c1a5760405162461bcd60e51b815260206004820152600360248201526249494160e81b6044820152606401610820565b60405163cc56b2c560e01b81523060048201527f0000000000000000000000000000000000000000000000000000000000000000151560248201527f00000000000000000000000000da8466b296e382e5da2bf20962d0cb87200c78907f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48906000907f0000000000000000000000005aef44edfc5a7edd30826c724ea12d7be15bdc306001600160a01b03169063cc56b2c590604401602060405180830381865afa158015610ced573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d119190613c29565b90508415610d3857610d38612710610d298388613c6f565b610d339190613c8e565b61251b565b8315610d5d57610d5d612710610d4e8387613c6f565b610d589190613c8e565b612775565b6040516370a0823160e01b81523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa158015610da1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dc59190613c29565b6040516370a0823160e01b81523060048201529097506001600160a01b038316906370a0823190602401602060405180830381865afa158015610e0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e309190613c29565b9550610e3c89896129c7565b610e4688886129c7565b1015610e785760405162461bcd60e51b81526020600482015260016024820152604b60f81b6044820152606401610820565b505050610e8784848888612b13565b60408051838152602081018390529081018c9052606081018b90526001600160a01b038a169033907fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229060800160405180910390a350506001601255505050505050505050565b60008054610efb90613cb0565b80601f0160208091040260200160405190810160405280929190818152602001828054610f2790613cb0565b8015610f745780601f10610f4957610100808354040283529160200191610f74565b820191906000526020600020905b815481529060010190602001808311610f5757829003601f168201915b505050505081565b3360008181526003602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610fd79086815260200190565b60405180910390a35060015b92915050565b606060008367ffffffffffffffff81111561100657611006613ce4565b60405190808252806020026020018201604052801561102f578160200160208202803683370190505b5060065490915060009061104590600190613c58565b905060006110538587613c6f565b61105d9083613c58565b90506000805b838310156111d5576110758784613cfa565b915060006006848154811061108c5761108c613d12565b906000526020600020906003020160000154600684815481106110b1576110b1613d12565b9060005260206000209060030201600001546110cd9190613c58565b9050600081600686815481106110e5576110e5613d12565b9060005260206000209060030201600101546006868154811061110a5761110a613d12565b9060005260206000209060030201600101546111269190613c58565b6111309190613c8e565b90506000826006878154811061114857611148613d12565b9060005260206000209060030201600201546006878154811061116d5761116d613d12565b9060005260206000209060030201600201546111899190613c58565b6111939190613c8e565b90506111a18c8e8484612ca7565b8885815181106111b3576111b3613d12565b60209081029190910101525050506001016111ce8784613cfa565b9250611063565b509293505050505b949350505050565b600a54600b5442600080806112036007546008546009549192909190565b92509250925083811461124c57600061121c8286613c58565b90506112288185613c6f565b6112329088613cfa565b965061123e8184613c6f565b6112489087613cfa565b9550505b505050909192565b6001600160a01b03831660008181526003602090815260408083203380855292528220549192909190821480159061128e57506000198114155b1561130457600061129f8583613c58565b6001600160a01b038881166000818152600360209081526040808320948916808452948252918290208590559051848152939450919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505b61130f868686612f9c565b6001925050505b9392505050565b6006818154811061132d57600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b60008061135b611ba9565b90506000806113686111e5565b508451919350915042036113d0576006805461138690600290613c58565b8154811061139657611396613d12565b9060005260206000209060030201604051806060016040529081600082015481526020016001820154815260200160028201548152505092505b82516000906113df9042613c58565b90506000818560200151856113f49190613c58565b6113fe9190613c8e565b90506000828660400151856114139190613c58565b61141d9190613c8e565b905061142b888a8484612ca7565b9998505050505050505050565b60606111dd8484846001610fe9565b600060125460011461146b5760405162461bcd60e51b815260040161082090613b9b565b60026012556007546008546040516370a0823160e01b81523060048201526000907f00000000000000000000000000da8466b296e382e5da2bf20962d0cb87200c786001600160a01b0316906370a0823190602401602060405180830381865afa1580156114dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115019190613c29565b6040516370a0823160e01b81523060048201529091506000906001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4816906370a0823190602401602060405180830381865afa15801561156b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061158f9190613c29565b9050600061159d8584613c58565b905060006115ab8584613c58565b60025490915060008190036117285760006115ce6115c98486613c6f565b61305c565b905060007f0000000000000000000000000000000000000000000000000000000000000000156116095761160285856130cc565b905061160e565b506103e85b8082116116565760405162461bcd60e51b8152602060048201526016602482015275494e53554646494349454e545f4c495155494449545960501b6044820152606401610820565b7f00000000000000000000000000000000000000000000000000000000000000001561170a576000826116898388613c6f565b6116939190613c8e565b90506000836116a28488613c6f565b6116ac9190613c8e565b905060006116ba83836129c7565b116117075760405162461bcd60e51b815260206004820152601b60248201527f4d494e494d554d5f4c49515549444954595f544f4f5f534d414c4c00000000006044820152606401610820565b50505b6117148183613c58565b9950611721600082613170565b505061175d565b61175a876117368386613c6f565b6117409190613c8e565b8761174b8486613c6f565b6117559190613c8e565b613203565b97505b600088116117935760405162461bcd60e51b8152602060048201526003602482015262494c4d60e81b6044820152606401610820565b61179d8989613170565b6117a985858989612b13565b60408051848152602081018490526001600160a01b038b16917f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f910160405180910390a250506001601255509395945050505050565b6000806012546001146118245760405162461bcd60e51b815260040161082090613b9b565b60026012556007546008546040516370a0823160e01b81523060048201526000907f00000000000000000000000000da8466b296e382e5da2bf20962d0cb87200c786001600160a01b0316906370a0823190602401602060405180830381865afa158015611896573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ba9190613c29565b6040516370a0823160e01b81523060048201529091506000906001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4816906370a0823190602401602060405180830381865afa158015611924573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119489190613c29565b30600090815260046020526040902054600254919250908061196a8584613c6f565b6119749190613c8e565b9750806119818484613c6f565b61198b9190613c8e565b965060008811801561199d5750600087115b6119cf5760405162461bcd60e51b815260206004820152600360248201526224a62160e91b6044820152606401610820565b6119d93083613219565b611a047f00000000000000000000000000da8466b296e382e5da2bf20962d0cb87200c788a8a6123d8565b611a2f7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb488a896123d8565b6040516370a0823160e01b81523060048201527f00000000000000000000000000da8466b296e382e5da2bf20962d0cb87200c786001600160a01b0316906370a0823190602401602060405180830381865afa158015611a93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab79190613c29565b6040516370a0823160e01b81523060048201529094507f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b0316906370a0823190602401602060405180830381865afa158015611b1e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b429190613c29565b9250611b5084848888612b13565b60408051898152602081018990526001600160a01b038b169133917fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496910160405180910390a35050505050506001601281905550915091565b611bcd60405180606001604052806000815260200160008152602001600081525090565b60068054611bdd90600190613c58565b81548110611bed57611bed613d12565b90600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282015481525050905090565b60018054610efb90613cb0565b600080611c468585856001610fe9565b90506000805b8251811015611c8e57828181518110611c6757611c67613d12565b602002602001015182611c7a9190613cfa565b915080611c8681613d28565b915050611c4c565b50611c998482613c8e565b9695505050505050565b6000611cb0338484612f9c565b50600192915050565b601254600114611cdb5760405162461bcd60e51b815260040161082090613b9b565b60026012556007546040516370a0823160e01b81523060048201527f00000000000000000000000000da8466b296e382e5da2bf20962d0cb87200c78917f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4891611da89184918691906001600160a01b038416906370a08231906024015b602060405180830381865afa158015611d75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d999190613c29565b611da39190613c58565b6123d8565b6008546040516370a0823160e01b8152306004820152611de09183918691906001600160a01b038416906370a0823190602401611d58565b5050600160125550565b600080611df6336132a4565b50503360009081526010602090815260408083205460119092529091205481151580611e225750600081115b15611f0d573360008181526010602090815260408083208390556011909152808220919091555163299e7ae760e11b8152600481019190915260248101839052604481018290526001600160a01b037f0000000000000000000000009d2fe4ba9d7d6800f0a62f5d638aac06b4e3047e169063533cf5ce90606401600060405180830381600087803b158015611eb757600080fd5b505af1158015611ecb573d6000803e3d6000fd5b505060408051858152602081018590523393508392507f865ca08d59f5cb456e85cd2f7ef63664ea4f73327414e9d8152c4158b0e94645910160405180910390a35b9091565b42841015611f475760405162461bcd60e51b815260206004820152600360248201526204558560ec1b6044820152606401610820565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6000604051611f799190613d41565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160408051601f1981840301815291815281516020928301206001600160a01b038b1660009081526005909352908220805491935083917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c91908761204483613d28565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e001604051602081830303815290604052805190602001206040516020016120bd92919061190160f01b81526002810192909252602282015260420190565b60405160208183030381529060405280519060200120905060006120e382878787613404565b9050896001600160a01b0316816001600160a01b03161461212f5760405162461bcd60e51b8152600401610820906020808252600490820152634953494760e01b604082015260600190565b6001600160a01b038a81166000818152600360209081526040808320948e16808452948252918290208c905590518b81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050505050565b60075460085460405163cc56b2c560e01b81523060048201527f0000000000000000000000000000000000000000000000000000000000000000151560248201526000929190612710907f0000000000000000000000005aef44edfc5a7edd30826c724ea12d7be15bdc306001600160a01b03169063cc56b2c590604401602060405180830381865afa158015612232573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122569190613c29565b6122609087613c6f565b61226a9190613c8e565b6122749086613c58565b945061228285858484612ca7565b95945050505050565b6012546001146122ad5760405162461bcd60e51b815260040161082090613b9b565b60026012556040516370a0823160e01b81523060048201526123d1907f00000000000000000000000000da8466b296e382e5da2bf20962d0cb87200c786001600160a01b0316906370a0823190602401602060405180830381865afa15801561231a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061233e9190613c29565b6040516370a0823160e01b81523060048201527f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b0316906370a0823190602401602060405180830381865afa1580156123a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123c69190613c29565b600754600854612b13565b6001601255565b6000836001600160a01b03163b1161241c5760405162461bcd60e51b815260206004820152600760248201526621a7a222a622a760c91b6044820152606401610820565b6040516001600160a01b03838116602483015260448201839052600091829186169060640160408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b179052516124769190613ddc565b6000604051808303816000865af19150503d80600081146124b3576040519150601f19603f3d011682016040523d82523d6000602084013e6124b8565b606091505b50915091508180156124e25750805115806124e25750808060200190518101906124e29190613bbb565b6125145760405162461bcd60e51b81526020600482015260036024820152621254d560ea1b6044820152606401610820565b5050505050565b60007f0000000000000000000000005aef44edfc5a7edd30826c724ea12d7be15bdc306001600160a01b0316637be1623e6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561257b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061259f9190613df8565b604051632db39b2f60e21b81523060048201529091506000906001600160a01b037f0000000000000000000000005aef44edfc5a7edd30826c724ea12d7be15bdc30169063b6ce6cbc90602401602060405180830381865afa158015612609573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061262d9190613c29565b905060006001600160a01b03831661264657600061265d565b6127106126538386613c6f565b61265d9190613c8e565b9050801561269d576126907f00000000000000000000000000da8466b296e382e5da2bf20962d0cb87200c7884836123d8565b61269a8185613c58565b93505b6126e87f00000000000000000000000000da8466b296e382e5da2bf20962d0cb87200c787f0000000000000000000000009d2fe4ba9d7d6800f0a62f5d638aac06b4e3047e866123d8565b60025460009061270086670de0b6b3a7640000613c6f565b61270a9190613c8e565b9050801561272a5780600c60008282546127249190613cfa565b90915550505b337f112c256902bf554b6ed882d2936687aaeb4225e8cd5b51303c90ca6cf43a86026127568488613cfa565b6040805191825260006020830152015b60405180910390a25050505050565b60007f0000000000000000000000005aef44edfc5a7edd30826c724ea12d7be15bdc306001600160a01b0316637be1623e6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127f99190613df8565b604051632db39b2f60e21b81523060048201529091506000906001600160a01b037f0000000000000000000000005aef44edfc5a7edd30826c724ea12d7be15bdc30169063b6ce6cbc90602401602060405180830381865afa158015612863573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128879190613c29565b905060006001600160a01b0383166128a05760006128b7565b6127106128ad8386613c6f565b6128b79190613c8e565b905080156128f7576128ea7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4884836123d8565b6128f48185613c58565b93505b6129427f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb487f0000000000000000000000009d2fe4ba9d7d6800f0a62f5d638aac06b4e3047e866123d8565b60025460009061295a86670de0b6b3a7640000613c6f565b6129649190613c8e565b905080156129845780600d600082825461297e9190613cfa565b90915550505b337f112c256902bf554b6ed882d2936687aaeb4225e8cd5b51303c90ca6cf43a860260006129b28589613cfa565b60408051928352602083019190915201612766565b60007f000000000000000000000000000000000000000000000000000000000000000015612b025760007f0000000000000000000000000000000000000000000000000de0b6b3a7640000612a2485670de0b6b3a7640000613c6f565b612a2e9190613c8e565b905060007f00000000000000000000000000000000000000000000000000000000000f4240612a6585670de0b6b3a7640000613c6f565b612a6f9190613c8e565b90506000670de0b6b3a7640000612a868385613c6f565b612a909190613c8e565b90506000670de0b6b3a7640000612aa78480613c6f565b612ab19190613c8e565b670de0b6b3a7640000612ac48680613c6f565b612ace9190613c8e565b612ad89190613cfa565b9050670de0b6b3a7640000612aed8284613c6f565b612af79190613c8e565b945050505050610fe3565b612b0c8284613c6f565b9050610fe3565b6009544290600090612b259083613c58565b9050600081118015612b3657508315155b8015612b4157508215155b15612b8857612b508185613c6f565b600a6000828254612b619190613cfa565b90915550612b7190508184613c6f565b600b6000828254612b829190613cfa565b90915550505b6000612b92611ba9565b8051909150612ba19084613c58565b9150610708821115612c565760408051606081018252848152600a5460208201908152600b549282019283526006805460018101825560009190915291517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f600390930292830155517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4082015590517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d41909101555b60078790556008869055600983905560408051888152602081018890527fcf2aa50876cdfbb541206f89af0ee78d44a2abf8d328e37fa4917f982149848a910160405180910390a150505050505050565b60007f000000000000000000000000000000000000000000000000000000000000000015612f2a576000612cdb84846129c7565b90507f0000000000000000000000000000000000000000000000000de0b6b3a7640000612d1085670de0b6b3a7640000613c6f565b612d1a9190613c8e565b93507f00000000000000000000000000000000000000000000000000000000000f4240612d4f84670de0b6b3a7640000613c6f565b612d599190613c8e565b92506000807f00000000000000000000000000da8466b296e382e5da2bf20962d0cb87200c786001600160a01b0316876001600160a01b031614612d9e578486612da1565b85855b915091507f00000000000000000000000000da8466b296e382e5da2bf20962d0cb87200c786001600160a01b0316876001600160a01b031614612e20577f00000000000000000000000000000000000000000000000000000000000f4240612e1189670de0b6b3a7640000613c6f565b612e1b9190613c8e565b612e5d565b7f0000000000000000000000000000000000000000000000000de0b6b3a7640000612e5389670de0b6b3a7640000613c6f565b612e5d9190613c8e565b97506000612e75612e6e848b613cfa565b858461342c565b612e7f9083613c58565b9050670de0b6b3a76400007f00000000000000000000000000da8466b296e382e5da2bf20962d0cb87200c786001600160a01b0316896001600160a01b031614612ee9577f0000000000000000000000000000000000000000000000000de0b6b3a7640000612f0b565b7f00000000000000000000000000000000000000000000000000000000000f42405b612f159083613c6f565b612f1f9190613c8e565b9450505050506111dd565b6000807f00000000000000000000000000da8466b296e382e5da2bf20962d0cb87200c786001600160a01b0316866001600160a01b031614612f6d578385612f70565b84845b9092509050612f7f8783613cfa565b612f898289613c6f565b612f939190613c8e565b925050506111dd565b612fa5836132a4565b612fae826132a4565b6001600160a01b03831660009081526004602052604081208054839290612fd6908490613c58565b90915550506001600160a01b03821660009081526004602052604081208054839290613003908490613cfa565b92505081905550816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161304f91815260200190565b60405180910390a3505050565b600060038211156130bd5750806000613076600283613c8e565b613081906001613cfa565b90505b818110156130b75790508060028161309c8186613c8e565b6130a69190613cfa565b6130b09190613c8e565b9050613084565b50919050565b81156130c7575060015b919050565b6000806130dc6115c98486613c6f565b905060006130ec85612710613c6f565b613116837f0000000000000000000000000000000000000000000000000de0b6b3a7640000613c6f565b6131209190613c8e565b9050600061313085612710613c6f565b61315a847f00000000000000000000000000000000000000000000000000000000000f4240613c6f565b6131649190613c8e565b9050611c99828261353b565b613179826132a4565b806002600082825461318b9190613cfa565b90915550506001600160a01b038216600090815260046020526040812080548392906131b8908490613cfa565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020015b60405180910390a35050565b60008183106132125781611316565b5090919050565b613222826132a4565b80600260008282546132349190613c58565b90915550506001600160a01b03821660009081526004602052604081208054839290613261908490613c58565b90915550506040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020016131f7565b6001600160a01b03811660009081526004602052604090205480156133d2576001600160a01b0382166000908152600e602090815260408083208054600f8085529285208054600c54600d549481905594909552829055936133068584613c58565b905060006133148584613c58565b9050811561336f576000670de0b6b3a7640000613331848a613c6f565b61333b9190613c8e565b6001600160a01b038a16600090815260106020526040812080549293508392909190613368908490613cfa565b9091555050505b80156133c8576000670de0b6b3a764000061338a838a613c6f565b6133949190613c8e565b6001600160a01b038a166000908152601160205260408120805492935083929091906133c1908490613cfa565b9091555050505b5050505050505050565b600c546001600160a01b0383166000908152600e6020908152604080832093909355600d54600f909152919020555050565b60008060006134158787878761354b565b915091506134228161360f565b5095945050505050565b6000805b60ff81101561353257826000613446878361375c565b90508581101561349657600061345c88876137f9565b6134668389613c58565b61347890670de0b6b3a7640000613c6f565b6134829190613c8e565b905061348e8187613cfa565b9550506134d8565b60006134a288876137f9565b6134ac8884613c58565b6134be90670de0b6b3a7640000613c6f565b6134c89190613c8e565b90506134d48187613c58565b9550505b818511156135015760016134ec8387613c58565b116134fc57849350505050611316565b61351d565b600161350d8684613c58565b1161351d57849350505050611316565b5050808061352a90613d28565b915050613430565b50909392505050565b6000818310156132125781611316565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156135825750600090506003613606565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156135d6573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166135ff57600060019250925050613606565b9150600090505b94509492505050565b600081600481111561362357613623613e15565b0361362b5750565b600181600481111561363f5761363f613e15565b0361368c5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610820565b60028160048111156136a0576136a0613e15565b036136ed5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610820565b600381600481111561370157613701613e15565b036137595760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610820565b50565b6000670de0b6b3a7640000828185816137758280613c6f565b61377f9190613c8e565b6137899190613c6f565b6137939190613c8e565b61379d9190613c6f565b6137a79190613c8e565b670de0b6b3a76400008084816137bd8280613c6f565b6137c79190613c8e565b6137d19190613c6f565b6137db9190613c8e565b6137e59086613c6f565b6137ef9190613c8e565b6113169190613cfa565b6000670de0b6b3a764000083816138108280613c6f565b61381a9190613c8e565b6138249190613c6f565b61382e9190613c8e565b670de0b6b3a7640000806138428580613c6f565b61384c9190613c8e565b613857866003613c6f565b6137e59190613c6f565b6001600160a01b038116811461375957600080fd5b60008060008060006080868803121561388e57600080fd5b853594506020860135935060408601356138a781613861565b9250606086013567ffffffffffffffff808211156138c457600080fd5b818801915088601f8301126138d857600080fd5b8135818111156138e757600080fd5b8960208285010111156138f957600080fd5b9699959850939650602001949392505050565b60005b8381101561392757818101518382015260200161390f565b83811115613936576000848401525b50505050565b602081526000825180602084015261395b81604085016020870161390c565b601f01601f19169190910160400192915050565b6000806040838503121561398257600080fd5b823561398d81613861565b946020939093013593505050565b600080600080608085870312156139b157600080fd5b84356139bc81613861565b966020860135965060408601359560600135945092505050565b6020808252825182820181905260009190848201906040850190845b81811015613a0e578351835292840192918401916001016139f2565b50909695505050505050565b600060208284031215613a2c57600080fd5b813561131681613861565b600080600060608486031215613a4c57600080fd5b8335613a5781613861565b92506020840135613a6781613861565b929592945050506040919091013590565b600060208284031215613a8a57600080fd5b5035919050565b600080600060608486031215613aa657600080fd5b8335613ab181613861565b95602085013595506040909401359392505050565b600080600080600080600060e0888a031215613ae157600080fd5b8735613aec81613861565b96506020880135613afc81613861565b95506040880135945060608801359350608088013560ff81168114613b2057600080fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215613b5057600080fd5b8235613b5b81613861565b91506020830135613b6b81613861565b809150509250929050565b60008060408385031215613b8957600080fd5b823591506020830135613b6b81613861565b6020808252600690820152651313d0d2d15160d21b604082015260600190565b600060208284031215613bcd57600080fd5b8151801515811461131657600080fd5b60018060a01b038616815284602082015283604082015260806060820152816080820152818360a0830137600081830160a090810191909152601f909201601f19160101949350505050565b600060208284031215613c3b57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600082821015613c6a57613c6a613c42565b500390565b6000816000190483118215151615613c8957613c89613c42565b500290565b600082613cab57634e487b7160e01b600052601260045260246000fd5b500490565b600181811c90821680613cc457607f821691505b6020821081036130b757634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b60008219821115613d0d57613d0d613c42565b500190565b634e487b7160e01b600052603260045260246000fd5b600060018201613d3a57613d3a613c42565b5060010190565b600080835481600182811c915080831680613d5d57607f831692505b60208084108203613d7c57634e487b7160e01b86526022600452602486fd5b818015613d905760018114613da157613dce565b60ff19861689528489019650613dce565b60008a81526020902060005b86811015613dc65781548b820152908501908301613dad565b505084890196505b509498975050505050505050565b60008251613dee81846020870161390c565b9190910192915050565b600060208284031215613e0a57600080fd5b815161131681613861565b634e487b7160e01b600052602160045260246000fdfea26469706673582212209f12e1429f009efcca5c4b1939a419537d1907553ec77c5c8d42a42a82c38ab364736f6c634300080d0033

Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.