ETH Price: $3,271.74 (+0.69%)
Gas: 1 Gwei

Token

Builder of PEOPLELAND (BUILDER)
 

Overview

Max Total Supply

1,535,888.999999999999999993 BUILDER

Holders

39

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Filtered by Token Holder
mitelin.eth
Balance
700 BUILDER

Value
$0.00
0x211db282704d8b184450c123950c4f45ffa95383
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
DAOToken

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 23 : DAOToken.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

import '@openzeppelin/contracts/token/ERC20/ERC20.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import '@openzeppelin/contracts/utils/structs/EnumerableSet.sol';

import './interfaces/external/INonfungiblePositionManager.sol';
import './interfaces/external/IUniswapV3Factory.sol';
import './interfaces/IDAOToken.sol';
import './interfaces/IDAOFactory.sol';

import './libraries/FullMath.sol';
import './libraries/MintMath.sol';
import './libraries/UniswapMath.sol';

/// @title DAO Token Contracts.
contract DAOToken is IDAOToken, ERC20 {
    using FullMath for uint256;
    using MintMath for MintMath.Anchor;
    using SafeERC20 for IERC20;
    using UniswapMath for INonfungiblePositionManager;
    using EnumerableSet for EnumerableSet.AddressSet;

    address public override owner;
    EnumerableSet.AddressSet private _managers;
    address public immutable override WETH9;

    uint256 public override temporaryAmount;
    MintMath.Anchor private _anchor;

    address public immutable override factory;
    uint256 public immutable override lpRatio;
    uint256 public immutable lpTotalAmount;
    uint256 public lpCurrentAmount;

    address public override lpToken0;
    address public override lpToken1;
    address public override lpPool;

    address public constant override UNISWAP_V3_POSITIONS = 0xC36442b4a4522E871399CD717aBDD847Ab11FE88;

    uint256 private constant MAX_UINT256 = type(uint256).max;

    modifier onlyOwner() {
        require(_msgSender() == owner, 'onlyOwner');
        _;
    }

    modifier onlyOwnerOrManager() {
        require(_managers.contains(_msgSender()) || _msgSender() == owner, 'onlyOwnerOrManager');
        _;
    }

    constructor(
        address[] memory _genesisTokenAddressList,
        uint256[] memory _genesisTokenAmountList,
        uint256 _lpRatio,
        uint256 _lpTotalAmount,
        address _factoryAddress,
        address payable _ownerAddress,
        MintMath.MintArgs memory _mintArgs,
        string memory _erc20Name,
        string memory _erc20Symbol
    ) ERC20(_erc20Name, _erc20Symbol) {
        require(_genesisTokenAddressList.length == _genesisTokenAmountList.length, 'GENESIS LENGTH INVALID');
        for (uint256 i = 0; i < _genesisTokenAddressList.length; i++) {
            _mint(_genesisTokenAddressList[i], _genesisTokenAmountList[i]);
        }
        if (totalSupply() > 0) {
            temporaryAmount = totalSupply().divMul(100, _lpRatio);
            temporaryAmount = temporaryAmount < _lpTotalAmount ? temporaryAmount : _lpTotalAmount;
            _mint(address(this), temporaryAmount);
        }

        _anchor.initialize(_mintArgs, block.timestamp);
        owner = _ownerAddress;
        factory = _factoryAddress;
        lpRatio = _lpRatio;
        lpTotalAmount = _lpTotalAmount;
        lpCurrentAmount = temporaryAmount;
        WETH9 = INonfungiblePositionManager(UNISWAP_V3_POSITIONS).WETH9();
    }

    function staking() external view override returns (address) {
        return IDAOFactory(factory).staking();
    }

    function transferOwnership(address payable _newOwner) external override onlyOwner {
        require(_newOwner != address(0));
        owner = _newOwner;
        emit TransferOwnership(_newOwner);
    }

    function destruct() external override onlyOwner {
        selfdestruct(payable(owner));
    }

    function managers() external view override returns (address[] memory) {
        address[] memory _managers_ = new address[](_managers.length());
        for (uint256 i = 0; i < _managers.length(); i++) {
            _managers_[i] = _managers.at(i);
        }
        return _managers_;
    }

    function isManager(address _address) external view override returns (bool) {
        return _managers.contains(_address);
    }

    function addManager(address manager) external override onlyOwner {
        _managers.add(manager);
        emit AddManager(manager);
    }

    function removeManager(address manager) external override onlyOwner {
        _managers.remove(manager);
        emit RemoveManager(manager);
    }

    function createLPPoolOrLinkLPPool(
        uint256 _baseTokenAmount,
        address _quoteTokenAddress,
        uint256 _quoteTokenAmount,
        uint24 _fee,
        int24 _tickLower,
        int24 _tickUpper,
        uint160 _sqrtPriceX96
    ) external payable override onlyOwner {
        require(lpPool == address(0), 'LP POOL ALREADY EXISTS');
        require(_baseTokenAmount > 0, 'BASE TOKEN AMOUNT MUST > 0');
        require(_quoteTokenAmount > 0, 'QUOTE TOKEN AMOUNT MUST > 0');
        require(_baseTokenAmount <= temporaryAmount, 'NOT ENOUGH TEMPORARYAMOUNT');
        require(_quoteTokenAddress != address(0), 'QUOTE TOKEN NOT EXIST');
        require(_quoteTokenAddress != address(this), 'QUOTE TOKEN CAN NOT BE BASE TOKEN');
        require(_fee == 500 || _fee == 3000 || _fee == 10000, 'FEE INVALID');

        INonfungiblePositionManager inpm = INonfungiblePositionManager(UNISWAP_V3_POSITIONS);
        address pool = IUniswapV3Factory(inpm.factory()).getPool(address(this), _quoteTokenAddress, _fee);

        IERC20(address(this)).safeApprove(UNISWAP_V3_POSITIONS, MAX_UINT256);
        if (_quoteTokenAddress != WETH9) {
            IERC20(_quoteTokenAddress).safeApprove(UNISWAP_V3_POSITIONS, MAX_UINT256);
            IERC20(_quoteTokenAddress).safeTransferFrom(_msgSender(), address(this), _quoteTokenAmount);
        }

        uint256 amount0;
        uint256 amount1;
        if (pool == address(0)) {
            (lpPool, lpToken0, lpToken1, amount0, amount1) = inpm.createDAOTokenPoolAndMint(
                _baseTokenAmount,
                _quoteTokenAddress,
                _quoteTokenAmount,
                _fee,
                _tickLower,
                _tickUpper,
                _sqrtPriceX96,
                msg.value
            );
        } else {
            INonfungiblePositionManager.MintParams memory params = UniswapMath.buildMintParams(
                _baseTokenAmount,
                _quoteTokenAddress,
                _quoteTokenAmount,
                _fee,
                _tickLower,
                _tickUpper
            );
            lpPool = pool;
            lpToken0 = params.token0;
            lpToken1 = params.token1;
            (, , amount0, amount1) = inpm.mint{value: msg.value}(params);
        }

        if (_quoteTokenAddress == WETH9) {
            INonfungiblePositionManager(UNISWAP_V3_POSITIONS).refundETH();
            if (address(this).balance > 0) {
                (bool success, ) = _msgSender().call{value: address(this).balance}(new bytes(0));
                require(success, 'refundETH failed');
            }
        } else {
            uint256 balance_ = IERC20(_quoteTokenAddress).balanceOf(address(this));
            if (balance_ > 0) IERC20(_quoteTokenAddress).safeTransfer(_msgSender(), balance_);
        }

        if (lpToken0 == address(this)) {
            temporaryAmount -= amount0;
        } else {
            temporaryAmount -= amount1;
        }

        emit CreateLPPoolOrLinkLPPool(
            _baseTokenAmount,
            _quoteTokenAddress,
            _quoteTokenAmount,
            _fee,
            _sqrtPriceX96,
            _tickLower,
            _tickUpper,
            lpPool
        );
    }

    function updateLPPool(
        uint256 _baseTokenAmount,
        int24 _tickLower,
        int24 _tickUpper
    ) external override onlyOwner {
        require(_baseTokenAmount <= temporaryAmount, 'NOT ENOUGH TEMPORARYAMOUNT');
        require(lpPool != address(0), 'NO POOL');

        (uint256 amount0, uint256 amount1) = INonfungiblePositionManager(UNISWAP_V3_POSITIONS).mintToLPByTick(
            lpPool,
            _baseTokenAmount,
            _tickLower,
            _tickUpper
        );
        if (lpToken0 == address(this)) {
            temporaryAmount -= amount0;
        } else {
            temporaryAmount -= amount1;
        }
        emit UpdateLPPool(_baseTokenAmount);
    }

    function mint(
        address[] memory _mintTokenAddressList,
        uint24[] memory _mintTokenAmountRatioList,
        uint256 _startTimestamp,
        uint256 _endTimestamp,
        int24 _tickLower,
        int24 _tickUpper
    ) external override onlyOwnerOrManager {
        require(_mintTokenAddressList.length == _mintTokenAmountRatioList.length, 'MINT ADDRESS LENGTH INVALID');
        require(_startTimestamp == _anchor.lastTimestamp, 'START TIMESTAMP INVALID');
        require(_endTimestamp <= block.timestamp, 'END TIMESTAMP INVALID 1');
        require(_endTimestamp > _anchor.lastTimestamp, 'END TIMESTAMP INVALID 2');
        uint256 mintValue = _anchor.total(_endTimestamp);

        uint256 ratioSum = 0;
        for (uint256 index; index < _mintTokenAmountRatioList.length; index++) {
            ratioSum += _mintTokenAmountRatioList[index];
        }
        for (uint256 index; index < _mintTokenAmountRatioList.length; index++) {
            _mint(_mintTokenAddressList[index], (mintValue * _mintTokenAmountRatioList[index]) / ratioSum);
        }

        uint256 thisTemporaryAmount = mintValue.divMul(100, lpRatio);
        uint256 lpLeftAmount = lpTotalAmount - lpCurrentAmount;
        thisTemporaryAmount = thisTemporaryAmount < lpLeftAmount ? thisTemporaryAmount : lpLeftAmount;
        if (thisTemporaryAmount > 0) {
            _mint(address(this), thisTemporaryAmount);
            temporaryAmount += thisTemporaryAmount;
            lpCurrentAmount += thisTemporaryAmount;

            if (lpPool != address(0)) {
                (uint256 amount0, uint256 amount1) = INonfungiblePositionManager(UNISWAP_V3_POSITIONS).mintToLPByTick(
                    lpPool,
                    thisTemporaryAmount,
                    _tickLower,
                    _tickUpper
                );
                if (lpToken0 == address(this)) {
                    temporaryAmount -= amount0;
                } else {
                    temporaryAmount -= amount1;
                }
            }
        }
        emit Mint(
            _mintTokenAddressList,
            _mintTokenAmountRatioList,
            _startTimestamp,
            _endTimestamp,
            _tickLower,
            _tickUpper,
            mintValue
        );
    }

    function bonusWithdraw() external override {
        uint256 count = INonfungiblePositionManager(UNISWAP_V3_POSITIONS).balanceOf(address(this));
        require(count > 0, 'NO POOL');
        uint256[] memory tokenIdList = new uint256[](count);
        for (uint256 index = 0; index < count; index++) {
            tokenIdList[index] = INonfungiblePositionManager(UNISWAP_V3_POSITIONS).tokenOfOwnerByIndex(
                address(this),
                index
            );
        }
        _bonusWithdrawByTokenIdList(tokenIdList);
    }

    function bonusWithdrawByTokenIdList(uint256[] memory tokenIdList) external override {
        INonfungiblePositionManager pm = INonfungiblePositionManager(UNISWAP_V3_POSITIONS);
        for (uint256 index = 0; index < tokenIdList.length; index++) {
            uint256 tokenId = tokenIdList[index];
            require(pm.ownerOf(tokenId) == address(this));
        }
        _bonusWithdrawByTokenIdList(tokenIdList);
    }

    function mintAnchor()
        external
        view
        override
        returns (
            uint128 p,
            uint16 aNumerator,
            uint16 aDenominator,
            uint16 bNumerator,
            uint16 bDenominator,
            uint16 c,
            uint16 d,
            uint256 lastTimestamp,
            uint256 n
        )
    {
        p = _anchor.args.p;
        aNumerator = _anchor.args.aNumerator;
        aDenominator = _anchor.args.aDenominator;
        bNumerator = _anchor.args.bNumerator;
        bDenominator = _anchor.args.bDenominator;
        c = _anchor.args.c;
        d = _anchor.args.d;

        lastTimestamp = _anchor.lastTimestamp;
        n = _anchor.n;
    }

    function _bonusWithdrawByTokenIdList(uint256[] memory tokenIdList) private {
        address _staking = IDAOFactory(factory).staking();
        require(_staking != address(0), 'NO _staking');
        uint256 token0TotalAmount = 0;
        uint256 token1TotalAmount = 0;

        uint256 token0Add = 0;
        uint256 token1Add = 0;
        for (uint256 index = 0; index < tokenIdList.length; index++) {
            (token0Add, token1Add) = INonfungiblePositionManager(UNISWAP_V3_POSITIONS).bonusWithdrawByTokenId(
                tokenIdList[index],
                lpToken0,
                lpToken1
            );
            token0TotalAmount += token0Add;
            token1TotalAmount += token1Add;
        }

        if (token0TotalAmount > 0) {
            uint256 bonusToken0TotalAmount = token0TotalAmount / 100;
            uint256 stackingToken0TotalAmount = token0TotalAmount - bonusToken0TotalAmount;
            IERC20(address(lpToken0)).safeTransfer(_staking, stackingToken0TotalAmount);
            IERC20(address(lpToken0)).safeTransfer(_msgSender(), bonusToken0TotalAmount);
        }

        if (token1TotalAmount > 0) {
            uint256 bonusToken1TotalAmount = token1TotalAmount / 100;
            uint256 stackingToken1TotalAmount = token1TotalAmount - bonusToken1TotalAmount;
            IERC20(address(lpToken1)).safeTransfer(_staking, stackingToken1TotalAmount);
            IERC20(address(lpToken1)).safeTransfer(_msgSender(), bonusToken1TotalAmount);
        }

        emit BonusWithdrawByTokenIdList(_msgSender(), tokenIdList, token0TotalAmount, token1TotalAmount);
    }

    receive() external payable {}
}

File 2 of 23 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - amount);
        }

        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(_msgSender(), spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

File 3 of 23 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 4 of 23 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastvalue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastvalue;
                // Update the index for the moved value
                set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        assembly {
            result := store
        }

        return result;
    }
}

File 5 of 23 : INonfungiblePositionManager.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;
pragma abicoder v2;

interface INonfungiblePositionManager {
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);

    function refundETH() external payable;

    function factory() external view returns (address);

    function WETH9() external view returns (address);

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

    function ownerOf(uint256 tokenId) external view returns (address owner);

    function positions(uint256 tokenId)
        external
        view
        returns (
            uint96 nonce,
            address operator,
            address token0,
            address token1,
            uint24 fee,
            int24 tickLower,
            int24 tickUpper,
            uint128 liquidity,
            uint256 feeGrowthInside0LastX128,
            uint256 feeGrowthInside1LastX128,
            uint128 tokensOwed0,
            uint128 tokensOwed1
        );

    struct MintParams {
        address token0;
        address token1;
        uint24 fee;
        int24 tickLower;
        int24 tickUpper;
        uint256 amount0Desired;
        uint256 amount1Desired;
        uint256 amount0Min;
        uint256 amount1Min;
        address recipient;
        uint256 deadline;
    }

    function createAndInitializePoolIfNecessary(
        address token0,
        address token1,
        uint24 fee,
        uint160 sqrtPriceX96
    ) external payable returns (address pool);

    function mint(MintParams calldata params)
        external
        payable
        returns (
            uint256 tokenId,
            uint128 liquidity,
            uint256 amount0,
            uint256 amount1
        );

    struct CollectParams {
        uint256 tokenId;
        address recipient;
        uint128 amount0Max;
        uint128 amount1Max;
    }

    function collect(CollectParams calldata params) external payable returns (uint256 amount0, uint256 amount1);
}

File 6 of 23 : IUniswapV3Factory.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

interface IUniswapV3Factory {
    function getPool(
        address tokenA,
        address tokenB,
        uint24 fee
    ) external view returns (address pool);
}

File 7 of 23 : IDAOToken.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

import './IDAOPermission.sol';

interface IDAOToken is IDAOPermission {
    event CreateLPPoolOrLinkLPPool(
        uint256 _baseTokenAmount,
        address _quoteTokenAddress,
        uint256 _quoteTokenAmount,
        uint24 _fee,
        uint160 _sqrtPriceX96,
        int24 _tickLower,
        int24 _tickUpper,
        address _lpPool
    );

    event UpdateLPPool(uint256 _baseTokenAmount);

    event Mint(
        address[] _mintTokenAddressList,
        uint24[] _mintTokenAmountRatioList,
        uint256 _startTimestamp,
        uint256 _endTimestamp,
        int24 _tickLower,
        int24 _tickUpper,
        uint256 _mintValue
    );

    event BonusWithdrawByTokenIdList(
        address indexed operator,
        uint256[] tokenIdList,
        uint256 token0TotalAmount,
        uint256 token1TotalAmount
    );

    event AddManager(address _manager);
    event RemoveManager(address _manager);
    event TransferOwnership(address _newOwner);

    function staking() external view returns (address);

    function factory() external view returns (address);

    function lpRatio() external view returns (uint256);

    function temporaryAmount() external view returns (uint256);

    function lpToken0() external view returns (address);

    function lpToken1() external view returns (address);

    function lpPool() external view returns (address);

    function UNISWAP_V3_POSITIONS() external view returns (address);

    function WETH9() external view returns (address);

    function destruct() external;

    function createLPPoolOrLinkLPPool(
        uint256 _baseTokenAmount,
        address _quoteTokenAddress,
        uint256 _quoteTokenAmount,
        uint24 _fee,
        int24 _tickLower,
        int24 _tickUpper,
        uint160 _sqrtPriceX96
    ) external payable;

    function updateLPPool(
        uint256 _baseTokenAmount,
        int24 _tickLower,
        int24 _tickUpper
    ) external;

    function mint(
        address[] memory _mintTokenAddressList,
        uint24[] memory _mintTokenAmountRatioList,
        uint256 _startTimestamp,
        uint256 _endTimestamp,
        int24 _tickLower,
        int24 _tickUpper
    ) external;

    function bonusWithdraw() external;

    function bonusWithdrawByTokenIdList(uint256[] memory tokenIdList) external;

    function mintAnchor()
        external
        view
        returns (
            uint128 p,
            uint16 aNumerator,
            uint16 aDenominator,
            uint16 bNumerator,
            uint16 bDenominator,
            uint16 c,
            uint16 d,
            uint256 lastTimestamp,
            uint256 n
        );
}

File 8 of 23 : IDAOFactory.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

import '../libraries/MintMath.sol';

/// @title DAOFactory interface.
/// @notice to be used deploy daotoken contract.
interface IDAOFactory {
    event Deploy(
        string indexed _daoID,
        address[] _genesisTokenAddressList,
        uint256[] _genesisTokenAmountList,
        uint256 _lpRatio,
        uint256 _lpTotalAmount,
        address _ownerAddress,
        MintMath.MintArgs _mintArgs,
        string _erc20Name,
        string _erc20Symbol,
        address _token
    );

    function destruct() external;

    function tokens(string memory _daoID) external view returns (address token, uint256 version);

    function staking() external view returns (address);

    function daoFactoryStoreAddress() external view returns (address);

    function deploy(
        string memory _daoID,
        address[] memory _genesisTokenAddressList,
        uint256[] memory _genesisTokenAmountList,
        uint256 _lpRatio,
        uint256 _lpTotalAmount,
        address payable _ownerAddress,
        MintMath.MintArgs memory _mintArgs,
        string memory _erc20Name,
        string memory _erc20Symbol
    ) external returns (address token);
}

File 9 of 23 : FullMath.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

library FullMath {
    function divMul(uint256 a, uint256 b, uint256 c) internal pure returns (uint256 result) {
        assembly {
            let d := div(a, b)
            result := mul(d, c)
        }
        return result;
    }
}

File 10 of 23 : MintMath.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

library MintMath {
    struct MintArgs {
        uint128 p;
        uint16 aNumerator;
        uint16 aDenominator;
        uint16 bNumerator;
        uint16 bDenominator;
        uint16 c;
        uint16 d;
    }

    struct Anchor {
        MintArgs args;
        uint256 lastTimestamp;
        uint256 n;
    }

    function mulDiv(
        uint256 a,
        uint256 b,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        assembly {
            let c := mul(a, b)
            result := div(c, denominator)
        }
        return result;
    }

    function initialize(
        Anchor storage last,
        MintArgs memory args,
        uint256 time
    ) internal {
        last.args = args;
        last.lastTimestamp = (time / 86400) * 86400;
        last.n = 0;
    }

    function total(Anchor storage last, uint256 endTimestamp) internal returns (uint256) {
        uint256 d = last.args.d;
        uint256 p = last.args.p;
        uint256 an = last.args.aNumerator;
        uint256 ad = last.args.aDenominator;
        uint256 bn = last.args.bNumerator;
        uint256 bd = last.args.bDenominator;
        uint256 c = last.args.c;

        uint256 beginN = last.n + 1;
        uint256 n = last.n + ((endTimestamp / 86400) * 86400 - last.lastTimestamp) / 86400;

        uint256 result = 0;
        uint256 lastCoefficient = 0;
        uint256 lastValue = 0;

        for (uint256 i = beginN; i <= n; i++) {
            uint256 coefficient = mulDiv(bn, i-1, bd);
            uint256 value = lastValue;
            if (coefficient != lastCoefficient || i == beginN) {
                value = coefficient + c;
                value = (((an**value) * p) * 1e12) / (ad**value);
                value += d * 1e12;
                if (value < 0) value = 0;
                value = value / 1e12;
                lastValue = value;
                lastCoefficient = coefficient;
            }
            result += value;
        }

        last.lastTimestamp = endTimestamp;
        last.n = n;
        return result;
    }
}

File 11 of 23 : UniswapMath.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;
import '@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol';
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '../interfaces/external/INonfungiblePositionManager.sol';

library UniswapMath {
    int24 constant tick500 = -887270;
    int24 constant tick3000 = -887220;
    int24 constant tick10000 = -887200;

    function getLowerTick(uint24 fee) private pure returns (int24 tick) {
        if (fee == 500) return tick500;
        else if (fee == 3000) return tick3000;
        else if (fee == 10000) return tick10000;
    }

    function getUpperTick(uint24 fee) private pure returns (int24 tick) {
        if (fee == 500) return -tick500;
        else if (fee == 3000) return -tick3000;
        else if (fee == 10000) return -tick10000;
    }

    function createDAOTokenPoolAndMint(
        INonfungiblePositionManager inpm,
        uint256 _baseTokenAmount,
        address _quoteTokenAddress,
        uint256 _quoteTokenAmount,
        uint24 _fee,
        int24 _tickLower,
        int24 _tickUpper,
        uint160 _sqrtPriceX96,
        uint256 _value
    )
        internal
        returns (
            address lpPool,
            address lpToken0,
            address lpToken1,
            uint256 amount0,
            uint256 amount1
        )
    {
        INonfungiblePositionManager.MintParams memory params = buildMintParams(
            _baseTokenAmount,
            _quoteTokenAddress,
            _quoteTokenAmount,
            _fee,
            _tickLower,
            _tickUpper
        );

        lpToken0 = params.token0;
        lpToken1 = params.token1;

        lpPool = inpm.createAndInitializePoolIfNecessary(params.token0, params.token1, _fee, _sqrtPriceX96);

        (, , amount0, amount1) = inpm.mint{value: _value}(params);
    }

    function buildMintParams(
        uint256 _baseTokenAmount,
        address _quoteTokenAddress,
        uint256 _quoteTokenAmount,
        uint24 fee,
        int24 tickLower,
        int24 tickUpper
    ) internal view returns (INonfungiblePositionManager.MintParams memory params) {
        address token0;
        address token1;
        uint256 amount0Desired;
        uint256 amount1Desired;
        if (address(this) > _quoteTokenAddress) {
            token0 = _quoteTokenAddress;
            token1 = address(this);
            amount0Desired = _quoteTokenAmount;
            amount1Desired = _baseTokenAmount;
        } else {
            token0 = address(this);
            token1 = _quoteTokenAddress;
            amount0Desired = _baseTokenAmount;
            amount1Desired = _quoteTokenAmount;
        }

        uint256 amount0Min = (amount0Desired * 0) / 10;
        uint256 amount1Min = (amount1Desired * 0) / 10;
        uint256 deadline = block.timestamp + 60 * 60;

        params = INonfungiblePositionManager.MintParams({
            token0: token0,
            token1: token1,
            fee: fee,
            tickLower: tickLower,
            tickUpper: tickUpper,
            amount0Desired: amount0Desired,
            amount1Desired: amount1Desired,
            amount0Min: amount0Min,
            amount1Min: amount1Min,
            recipient: address(this),
            deadline: deadline
        });
    }

    function getNearestSingleMintParams(address lpPool)
        internal
        view
        returns (
            address quoteTokenAddress,
            uint24 fee,
            int24 tickLower,
            int24 tickUpper
        )
    {
        IUniswapV3Pool pool = IUniswapV3Pool(lpPool);

        (, int24 tick, , , , , ) = pool.slot0();

        fee = pool.fee();

        int24 tickSpacing = pool.tickSpacing();

        if (address(this) == pool.token0()) {
            tickLower = getNearestTickLower(tick, fee, tickSpacing);
            tickUpper = getUpperTick(fee);
            quoteTokenAddress = pool.token1();
        } else {
            tickLower = getLowerTick(fee);
            tickUpper = getNearestTickUpper(tick, fee, tickSpacing);
            quoteTokenAddress = pool.token0();
        }
    }

    function getNearestTickLower(
        int24 tick,
        uint24 fee,
        int24 tickSpacing
    ) internal pure returns (int24 tickLower) {
        // 比 tick 大
        // TODO 测试
        int24 bei = (getUpperTick(fee) - tick) / tickSpacing;
        tickLower = getUpperTick(fee) - tickSpacing * bei;
    }

    function getNearestTickUpper(
        int24 tick,
        uint24 fee,
        int24 tickSpacing
    ) internal pure returns (int24 tickLower) {
        // 比 tick 小
        // TODO 测试
        int24 bei = (tick - getLowerTick(fee)) / tickSpacing;
        tickLower = getLowerTick(fee) + tickSpacing * bei;
    }

    function mintToLPByTick(
        INonfungiblePositionManager inpm,
        address lpPool,
        uint256 lpMintValue,
        int24 tickLower,
        int24 tickUpper
    ) internal returns (uint256 amount0, uint256 amount1) {
        (
            address quoteTokenAddress,
            uint24 fee,
            int24 nearestTickLower,
            int24 nearestTickUpper
        ) = getNearestSingleMintParams(lpPool);
        require(tickLower >= nearestTickLower);
        require(tickUpper <= nearestTickUpper);

        INonfungiblePositionManager.MintParams memory params = buildMintParams(
            lpMintValue,
            quoteTokenAddress,
            0,
            fee,
            tickLower,
            tickUpper
        );

        if (params.token0 == quoteTokenAddress) {
            params.amount0Min = 0;
        } else {
            params.amount1Min = 0;
        }
        (, , amount0, amount1) = inpm.mint(params);
    }

    function bonusWithdrawByTokenId(
        INonfungiblePositionManager inpm,
        uint256 tokenId,
        address _lpToken0,
        address _lpToken1
    ) internal returns (uint256 token0Add, uint256 token1Add) {
        (, , address token0, address token1, , , , , , , , ) = inpm.positions(tokenId);

        if (_lpToken0 != token0 || _lpToken1 != token1) {
            token0Add = 0;
            token1Add = 0;
        } else {
            INonfungiblePositionManager.CollectParams memory bonusParams = INonfungiblePositionManager.CollectParams({
                tokenId: tokenId,
                recipient: address(this),
                amount0Max: type(uint128).max,
                amount1Max: type(uint128).max
            });
            uint256 token0Before = IERC20(token0).balanceOf(address(this));
            uint256 token1Before = IERC20(token1).balanceOf(address(this));
            inpm.collect(bonusParams);
            token0Add = IERC20(token0).balanceOf(address(this)) - token0Before;
            token1Add = IERC20(token1).balanceOf(address(this)) - token1Before;
        }
    }
}

File 12 of 23 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 13 of 23 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 14 of 23 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Context.sol)

pragma solidity ^0.8.0;

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

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 15 of 23 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 16 of 23 : IDAOPermission.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

/// @title DAO Permission Model
/// @notice This is the interface used to manage the permissions of the DAO, mainly including the OWNER and MANGER of the DAO.
interface IDAOPermission {
    /// @notice This is the owner of the DAO.
    /// @return The address of the owner of the DAO.
    function owner() external view returns (address);

    function transferOwnership(address payable _newOwner) external;

    function managers() external view returns (address[] memory);

    function isManager(address _address) external view returns (bool);

    /// @notice Add Manager to the DAO.
    /// @dev if the manager is already a manager, nothing will happen.
    /// @param manager The address of the manager.
    function addManager(address manager) external;

    /// @notice Remove Manager from the DAO.
    /// @dev if the manager is not a manager, nothing will happen.
    /// @param manager The address of the manager.
    function removeManager(address manager) external;
}

File 17 of 23 : IUniswapV3Pool.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

import './pool/IUniswapV3PoolImmutables.sol';
import './pool/IUniswapV3PoolState.sol';
import './pool/IUniswapV3PoolDerivedState.sol';
import './pool/IUniswapV3PoolActions.sol';
import './pool/IUniswapV3PoolOwnerActions.sol';
import './pool/IUniswapV3PoolEvents.sol';

/// @title The interface for a Uniswap V3 Pool
/// @notice A Uniswap pool facilitates swapping and automated market making between any two assets that strictly conform
/// to the ERC20 specification
/// @dev The pool interface is broken up into many smaller pieces
interface IUniswapV3Pool is
    IUniswapV3PoolImmutables,
    IUniswapV3PoolState,
    IUniswapV3PoolDerivedState,
    IUniswapV3PoolActions,
    IUniswapV3PoolOwnerActions,
    IUniswapV3PoolEvents
{

}

File 18 of 23 : IUniswapV3PoolImmutables.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Pool state that never changes
/// @notice These parameters are fixed for a pool forever, i.e., the methods will always return the same values
interface IUniswapV3PoolImmutables {
    /// @notice The contract that deployed the pool, which must adhere to the IUniswapV3Factory interface
    /// @return The contract address
    function factory() external view returns (address);

    /// @notice The first of the two tokens of the pool, sorted by address
    /// @return The token contract address
    function token0() external view returns (address);

    /// @notice The second of the two tokens of the pool, sorted by address
    /// @return The token contract address
    function token1() external view returns (address);

    /// @notice The pool's fee in hundredths of a bip, i.e. 1e-6
    /// @return The fee
    function fee() external view returns (uint24);

    /// @notice The pool tick spacing
    /// @dev Ticks can only be used at multiples of this value, minimum of 1 and always positive
    /// e.g.: a tickSpacing of 3 means ticks can be initialized every 3rd tick, i.e., ..., -6, -3, 0, 3, 6, ...
    /// This value is an int24 to avoid casting even though it is always positive.
    /// @return The tick spacing
    function tickSpacing() external view returns (int24);

    /// @notice The maximum amount of position liquidity that can use any tick in the range
    /// @dev This parameter is enforced per tick to prevent liquidity from overflowing a uint128 at any point, and
    /// also prevents out-of-range liquidity from being used to prevent adding in-range liquidity to a pool
    /// @return The max amount of liquidity per tick
    function maxLiquidityPerTick() external view returns (uint128);
}

File 19 of 23 : IUniswapV3PoolState.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Pool state that can change
/// @notice These methods compose the pool's state, and can change with any frequency including multiple times
/// per transaction
interface IUniswapV3PoolState {
    /// @notice The 0th storage slot in the pool stores many values, and is exposed as a single method to save gas
    /// when accessed externally.
    /// @return sqrtPriceX96 The current price of the pool as a sqrt(token1/token0) Q64.96 value
    /// tick The current tick of the pool, i.e. according to the last tick transition that was run.
    /// This value may not always be equal to SqrtTickMath.getTickAtSqrtRatio(sqrtPriceX96) if the price is on a tick
    /// boundary.
    /// observationIndex The index of the last oracle observation that was written,
    /// observationCardinality The current maximum number of observations stored in the pool,
    /// observationCardinalityNext The next maximum number of observations, to be updated when the observation.
    /// feeProtocol The protocol fee for both tokens of the pool.
    /// Encoded as two 4 bit values, where the protocol fee of token1 is shifted 4 bits and the protocol fee of token0
    /// is the lower 4 bits. Used as the denominator of a fraction of the swap fee, e.g. 4 means 1/4th of the swap fee.
    /// unlocked Whether the pool is currently locked to reentrancy
    function slot0()
        external
        view
        returns (
            uint160 sqrtPriceX96,
            int24 tick,
            uint16 observationIndex,
            uint16 observationCardinality,
            uint16 observationCardinalityNext,
            uint8 feeProtocol,
            bool unlocked
        );

    /// @notice The fee growth as a Q128.128 fees of token0 collected per unit of liquidity for the entire life of the pool
    /// @dev This value can overflow the uint256
    function feeGrowthGlobal0X128() external view returns (uint256);

    /// @notice The fee growth as a Q128.128 fees of token1 collected per unit of liquidity for the entire life of the pool
    /// @dev This value can overflow the uint256
    function feeGrowthGlobal1X128() external view returns (uint256);

    /// @notice The amounts of token0 and token1 that are owed to the protocol
    /// @dev Protocol fees will never exceed uint128 max in either token
    function protocolFees() external view returns (uint128 token0, uint128 token1);

    /// @notice The currently in range liquidity available to the pool
    /// @dev This value has no relationship to the total liquidity across all ticks
    function liquidity() external view returns (uint128);

    /// @notice Look up information about a specific tick in the pool
    /// @param tick The tick to look up
    /// @return liquidityGross the total amount of position liquidity that uses the pool either as tick lower or
    /// tick upper,
    /// liquidityNet how much liquidity changes when the pool price crosses the tick,
    /// feeGrowthOutside0X128 the fee growth on the other side of the tick from the current tick in token0,
    /// feeGrowthOutside1X128 the fee growth on the other side of the tick from the current tick in token1,
    /// tickCumulativeOutside the cumulative tick value on the other side of the tick from the current tick
    /// secondsPerLiquidityOutsideX128 the seconds spent per liquidity on the other side of the tick from the current tick,
    /// secondsOutside the seconds spent on the other side of the tick from the current tick,
    /// initialized Set to true if the tick is initialized, i.e. liquidityGross is greater than 0, otherwise equal to false.
    /// Outside values can only be used if the tick is initialized, i.e. if liquidityGross is greater than 0.
    /// In addition, these values are only relative and must be used only in comparison to previous snapshots for
    /// a specific position.
    function ticks(int24 tick)
        external
        view
        returns (
            uint128 liquidityGross,
            int128 liquidityNet,
            uint256 feeGrowthOutside0X128,
            uint256 feeGrowthOutside1X128,
            int56 tickCumulativeOutside,
            uint160 secondsPerLiquidityOutsideX128,
            uint32 secondsOutside,
            bool initialized
        );

    /// @notice Returns 256 packed tick initialized boolean values. See TickBitmap for more information
    function tickBitmap(int16 wordPosition) external view returns (uint256);

    /// @notice Returns the information about a position by the position's key
    /// @param key The position's key is a hash of a preimage composed by the owner, tickLower and tickUpper
    /// @return _liquidity The amount of liquidity in the position,
    /// Returns feeGrowthInside0LastX128 fee growth of token0 inside the tick range as of the last mint/burn/poke,
    /// Returns feeGrowthInside1LastX128 fee growth of token1 inside the tick range as of the last mint/burn/poke,
    /// Returns tokensOwed0 the computed amount of token0 owed to the position as of the last mint/burn/poke,
    /// Returns tokensOwed1 the computed amount of token1 owed to the position as of the last mint/burn/poke
    function positions(bytes32 key)
        external
        view
        returns (
            uint128 _liquidity,
            uint256 feeGrowthInside0LastX128,
            uint256 feeGrowthInside1LastX128,
            uint128 tokensOwed0,
            uint128 tokensOwed1
        );

    /// @notice Returns data about a specific observation index
    /// @param index The element of the observations array to fetch
    /// @dev You most likely want to use #observe() instead of this method to get an observation as of some amount of time
    /// ago, rather than at a specific index in the array.
    /// @return blockTimestamp The timestamp of the observation,
    /// Returns tickCumulative the tick multiplied by seconds elapsed for the life of the pool as of the observation timestamp,
    /// Returns secondsPerLiquidityCumulativeX128 the seconds per in range liquidity for the life of the pool as of the observation timestamp,
    /// Returns initialized whether the observation has been initialized and the values are safe to use
    function observations(uint256 index)
        external
        view
        returns (
            uint32 blockTimestamp,
            int56 tickCumulative,
            uint160 secondsPerLiquidityCumulativeX128,
            bool initialized
        );
}

File 20 of 23 : IUniswapV3PoolDerivedState.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Pool state that is not stored
/// @notice Contains view functions to provide information about the pool that is computed rather than stored on the
/// blockchain. The functions here may have variable gas costs.
interface IUniswapV3PoolDerivedState {
    /// @notice Returns the cumulative tick and liquidity as of each timestamp `secondsAgo` from the current block timestamp
    /// @dev To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing
    /// the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick,
    /// you must call it with secondsAgos = [3600, 0].
    /// @dev The time weighted average tick represents the geometric time weighted average price of the pool, in
    /// log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio.
    /// @param secondsAgos From how long ago each cumulative tick and liquidity value should be returned
    /// @return tickCumulatives Cumulative tick values as of each `secondsAgos` from the current block timestamp
    /// @return secondsPerLiquidityCumulativeX128s Cumulative seconds per liquidity-in-range value as of each `secondsAgos` from the current block
    /// timestamp
    function observe(uint32[] calldata secondsAgos)
        external
        view
        returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s);

    /// @notice Returns a snapshot of the tick cumulative, seconds per liquidity and seconds inside a tick range
    /// @dev Snapshots must only be compared to other snapshots, taken over a period for which a position existed.
    /// I.e., snapshots cannot be compared if a position is not held for the entire period between when the first
    /// snapshot is taken and the second snapshot is taken.
    /// @param tickLower The lower tick of the range
    /// @param tickUpper The upper tick of the range
    /// @return tickCumulativeInside The snapshot of the tick accumulator for the range
    /// @return secondsPerLiquidityInsideX128 The snapshot of seconds per liquidity for the range
    /// @return secondsInside The snapshot of seconds per liquidity for the range
    function snapshotCumulativesInside(int24 tickLower, int24 tickUpper)
        external
        view
        returns (
            int56 tickCumulativeInside,
            uint160 secondsPerLiquidityInsideX128,
            uint32 secondsInside
        );
}

File 21 of 23 : IUniswapV3PoolActions.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Permissionless pool actions
/// @notice Contains pool methods that can be called by anyone
interface IUniswapV3PoolActions {
    /// @notice Sets the initial price for the pool
    /// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value
    /// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96
    function initialize(uint160 sqrtPriceX96) external;

    /// @notice Adds liquidity for the given recipient/tickLower/tickUpper position
    /// @dev The caller of this method receives a callback in the form of IUniswapV3MintCallback#uniswapV3MintCallback
    /// in which they must pay any token0 or token1 owed for the liquidity. The amount of token0/token1 due depends
    /// on tickLower, tickUpper, the amount of liquidity, and the current price.
    /// @param recipient The address for which the liquidity will be created
    /// @param tickLower The lower tick of the position in which to add liquidity
    /// @param tickUpper The upper tick of the position in which to add liquidity
    /// @param amount The amount of liquidity to mint
    /// @param data Any data that should be passed through to the callback
    /// @return amount0 The amount of token0 that was paid to mint the given amount of liquidity. Matches the value in the callback
    /// @return amount1 The amount of token1 that was paid to mint the given amount of liquidity. Matches the value in the callback
    function mint(
        address recipient,
        int24 tickLower,
        int24 tickUpper,
        uint128 amount,
        bytes calldata data
    ) external returns (uint256 amount0, uint256 amount1);

    /// @notice Collects tokens owed to a position
    /// @dev Does not recompute fees earned, which must be done either via mint or burn of any amount of liquidity.
    /// Collect must be called by the position owner. To withdraw only token0 or only token1, amount0Requested or
    /// amount1Requested may be set to zero. To withdraw all tokens owed, caller may pass any value greater than the
    /// actual tokens owed, e.g. type(uint128).max. Tokens owed may be from accumulated swap fees or burned liquidity.
    /// @param recipient The address which should receive the fees collected
    /// @param tickLower The lower tick of the position for which to collect fees
    /// @param tickUpper The upper tick of the position for which to collect fees
    /// @param amount0Requested How much token0 should be withdrawn from the fees owed
    /// @param amount1Requested How much token1 should be withdrawn from the fees owed
    /// @return amount0 The amount of fees collected in token0
    /// @return amount1 The amount of fees collected in token1
    function collect(
        address recipient,
        int24 tickLower,
        int24 tickUpper,
        uint128 amount0Requested,
        uint128 amount1Requested
    ) external returns (uint128 amount0, uint128 amount1);

    /// @notice Burn liquidity from the sender and account tokens owed for the liquidity to the position
    /// @dev Can be used to trigger a recalculation of fees owed to a position by calling with an amount of 0
    /// @dev Fees must be collected separately via a call to #collect
    /// @param tickLower The lower tick of the position for which to burn liquidity
    /// @param tickUpper The upper tick of the position for which to burn liquidity
    /// @param amount How much liquidity to burn
    /// @return amount0 The amount of token0 sent to the recipient
    /// @return amount1 The amount of token1 sent to the recipient
    function burn(
        int24 tickLower,
        int24 tickUpper,
        uint128 amount
    ) external returns (uint256 amount0, uint256 amount1);

    /// @notice Swap token0 for token1, or token1 for token0
    /// @dev The caller of this method receives a callback in the form of IUniswapV3SwapCallback#uniswapV3SwapCallback
    /// @param recipient The address to receive the output of the swap
    /// @param zeroForOne The direction of the swap, true for token0 to token1, false for token1 to token0
    /// @param amountSpecified The amount of the swap, which implicitly configures the swap as exact input (positive), or exact output (negative)
    /// @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this
    /// value after the swap. If one for zero, the price cannot be greater than this value after the swap
    /// @param data Any data to be passed through to the callback
    /// @return amount0 The delta of the balance of token0 of the pool, exact when negative, minimum when positive
    /// @return amount1 The delta of the balance of token1 of the pool, exact when negative, minimum when positive
    function swap(
        address recipient,
        bool zeroForOne,
        int256 amountSpecified,
        uint160 sqrtPriceLimitX96,
        bytes calldata data
    ) external returns (int256 amount0, int256 amount1);

    /// @notice Receive token0 and/or token1 and pay it back, plus a fee, in the callback
    /// @dev The caller of this method receives a callback in the form of IUniswapV3FlashCallback#uniswapV3FlashCallback
    /// @dev Can be used to donate underlying tokens pro-rata to currently in-range liquidity providers by calling
    /// with 0 amount{0,1} and sending the donation amount(s) from the callback
    /// @param recipient The address which will receive the token0 and token1 amounts
    /// @param amount0 The amount of token0 to send
    /// @param amount1 The amount of token1 to send
    /// @param data Any data to be passed through to the callback
    function flash(
        address recipient,
        uint256 amount0,
        uint256 amount1,
        bytes calldata data
    ) external;

    /// @notice Increase the maximum number of price and liquidity observations that this pool will store
    /// @dev This method is no-op if the pool already has an observationCardinalityNext greater than or equal to
    /// the input observationCardinalityNext.
    /// @param observationCardinalityNext The desired minimum number of observations for the pool to store
    function increaseObservationCardinalityNext(uint16 observationCardinalityNext) external;
}

File 22 of 23 : IUniswapV3PoolOwnerActions.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Permissioned pool actions
/// @notice Contains pool methods that may only be called by the factory owner
interface IUniswapV3PoolOwnerActions {
    /// @notice Set the denominator of the protocol's % share of the fees
    /// @param feeProtocol0 new protocol fee for token0 of the pool
    /// @param feeProtocol1 new protocol fee for token1 of the pool
    function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) external;

    /// @notice Collect the protocol fee accrued to the pool
    /// @param recipient The address to which collected protocol fees should be sent
    /// @param amount0Requested The maximum amount of token0 to send, can be 0 to collect fees in only token1
    /// @param amount1Requested The maximum amount of token1 to send, can be 0 to collect fees in only token0
    /// @return amount0 The protocol fee collected in token0
    /// @return amount1 The protocol fee collected in token1
    function collectProtocol(
        address recipient,
        uint128 amount0Requested,
        uint128 amount1Requested
    ) external returns (uint128 amount0, uint128 amount1);
}

File 23 of 23 : IUniswapV3PoolEvents.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Events emitted by a pool
/// @notice Contains all events emitted by the pool
interface IUniswapV3PoolEvents {
    /// @notice Emitted exactly once by a pool when #initialize is first called on the pool
    /// @dev Mint/Burn/Swap cannot be emitted by the pool before Initialize
    /// @param sqrtPriceX96 The initial sqrt price of the pool, as a Q64.96
    /// @param tick The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool
    event Initialize(uint160 sqrtPriceX96, int24 tick);

    /// @notice Emitted when liquidity is minted for a given position
    /// @param sender The address that minted the liquidity
    /// @param owner The owner of the position and recipient of any minted liquidity
    /// @param tickLower The lower tick of the position
    /// @param tickUpper The upper tick of the position
    /// @param amount The amount of liquidity minted to the position range
    /// @param amount0 How much token0 was required for the minted liquidity
    /// @param amount1 How much token1 was required for the minted liquidity
    event Mint(
        address sender,
        address indexed owner,
        int24 indexed tickLower,
        int24 indexed tickUpper,
        uint128 amount,
        uint256 amount0,
        uint256 amount1
    );

    /// @notice Emitted when fees are collected by the owner of a position
    /// @dev Collect events may be emitted with zero amount0 and amount1 when the caller chooses not to collect fees
    /// @param owner The owner of the position for which fees are collected
    /// @param tickLower The lower tick of the position
    /// @param tickUpper The upper tick of the position
    /// @param amount0 The amount of token0 fees collected
    /// @param amount1 The amount of token1 fees collected
    event Collect(
        address indexed owner,
        address recipient,
        int24 indexed tickLower,
        int24 indexed tickUpper,
        uint128 amount0,
        uint128 amount1
    );

    /// @notice Emitted when a position's liquidity is removed
    /// @dev Does not withdraw any fees earned by the liquidity position, which must be withdrawn via #collect
    /// @param owner The owner of the position for which liquidity is removed
    /// @param tickLower The lower tick of the position
    /// @param tickUpper The upper tick of the position
    /// @param amount The amount of liquidity to remove
    /// @param amount0 The amount of token0 withdrawn
    /// @param amount1 The amount of token1 withdrawn
    event Burn(
        address indexed owner,
        int24 indexed tickLower,
        int24 indexed tickUpper,
        uint128 amount,
        uint256 amount0,
        uint256 amount1
    );

    /// @notice Emitted by the pool for any swaps between token0 and token1
    /// @param sender The address that initiated the swap call, and that received the callback
    /// @param recipient The address that received the output of the swap
    /// @param amount0 The delta of the token0 balance of the pool
    /// @param amount1 The delta of the token1 balance of the pool
    /// @param sqrtPriceX96 The sqrt(price) of the pool after the swap, as a Q64.96
    /// @param liquidity The liquidity of the pool after the swap
    /// @param tick The log base 1.0001 of price of the pool after the swap
    event Swap(
        address indexed sender,
        address indexed recipient,
        int256 amount0,
        int256 amount1,
        uint160 sqrtPriceX96,
        uint128 liquidity,
        int24 tick
    );

    /// @notice Emitted by the pool for any flashes of token0/token1
    /// @param sender The address that initiated the swap call, and that received the callback
    /// @param recipient The address that received the tokens from flash
    /// @param amount0 The amount of token0 that was flashed
    /// @param amount1 The amount of token1 that was flashed
    /// @param paid0 The amount of token0 paid for the flash, which can exceed the amount0 plus the fee
    /// @param paid1 The amount of token1 paid for the flash, which can exceed the amount1 plus the fee
    event Flash(
        address indexed sender,
        address indexed recipient,
        uint256 amount0,
        uint256 amount1,
        uint256 paid0,
        uint256 paid1
    );

    /// @notice Emitted by the pool for increases to the number of observations that can be stored
    /// @dev observationCardinalityNext is not the observation cardinality until an observation is written at the index
    /// just before a mint/swap/burn.
    /// @param observationCardinalityNextOld The previous value of the next observation cardinality
    /// @param observationCardinalityNextNew The updated value of the next observation cardinality
    event IncreaseObservationCardinalityNext(
        uint16 observationCardinalityNextOld,
        uint16 observationCardinalityNextNew
    );

    /// @notice Emitted when the protocol fee is changed by the pool
    /// @param feeProtocol0Old The previous value of the token0 protocol fee
    /// @param feeProtocol1Old The previous value of the token1 protocol fee
    /// @param feeProtocol0New The updated value of the token0 protocol fee
    /// @param feeProtocol1New The updated value of the token1 protocol fee
    event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New);

    /// @notice Emitted when the collected protocol fees are withdrawn by the factory owner
    /// @param sender The address that collects the protocol fees
    /// @param recipient The address that receives the collected protocol fees
    /// @param amount0 The amount of token0 protocol fees that is withdrawn
    /// @param amount0 The amount of token1 protocol fees that is withdrawn
    event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address[]","name":"_genesisTokenAddressList","type":"address[]"},{"internalType":"uint256[]","name":"_genesisTokenAmountList","type":"uint256[]"},{"internalType":"uint256","name":"_lpRatio","type":"uint256"},{"internalType":"uint256","name":"_lpTotalAmount","type":"uint256"},{"internalType":"address","name":"_factoryAddress","type":"address"},{"internalType":"address payable","name":"_ownerAddress","type":"address"},{"components":[{"internalType":"uint128","name":"p","type":"uint128"},{"internalType":"uint16","name":"aNumerator","type":"uint16"},{"internalType":"uint16","name":"aDenominator","type":"uint16"},{"internalType":"uint16","name":"bNumerator","type":"uint16"},{"internalType":"uint16","name":"bDenominator","type":"uint16"},{"internalType":"uint16","name":"c","type":"uint16"},{"internalType":"uint16","name":"d","type":"uint16"}],"internalType":"struct MintMath.MintArgs","name":"_mintArgs","type":"tuple"},{"internalType":"string","name":"_erc20Name","type":"string"},{"internalType":"string","name":"_erc20Symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_manager","type":"address"}],"name":"AddManager","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"tokenIdList","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"token0TotalAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"token1TotalAmount","type":"uint256"}],"name":"BonusWithdrawByTokenIdList","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_baseTokenAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"_quoteTokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"_quoteTokenAmount","type":"uint256"},{"indexed":false,"internalType":"uint24","name":"_fee","type":"uint24"},{"indexed":false,"internalType":"uint160","name":"_sqrtPriceX96","type":"uint160"},{"indexed":false,"internalType":"int24","name":"_tickLower","type":"int24"},{"indexed":false,"internalType":"int24","name":"_tickUpper","type":"int24"},{"indexed":false,"internalType":"address","name":"_lpPool","type":"address"}],"name":"CreateLPPoolOrLinkLPPool","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"_mintTokenAddressList","type":"address[]"},{"indexed":false,"internalType":"uint24[]","name":"_mintTokenAmountRatioList","type":"uint24[]"},{"indexed":false,"internalType":"uint256","name":"_startTimestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_endTimestamp","type":"uint256"},{"indexed":false,"internalType":"int24","name":"_tickLower","type":"int24"},{"indexed":false,"internalType":"int24","name":"_tickUpper","type":"int24"},{"indexed":false,"internalType":"uint256","name":"_mintValue","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_manager","type":"address"}],"name":"RemoveManager","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_newOwner","type":"address"}],"name":"TransferOwnership","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_baseTokenAmount","type":"uint256"}],"name":"UpdateLPPool","type":"event"},{"inputs":[],"name":"UNISWAP_V3_POSITIONS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH9","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"manager","type":"address"}],"name":"addManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","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":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bonusWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIdList","type":"uint256[]"}],"name":"bonusWithdrawByTokenIdList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_baseTokenAmount","type":"uint256"},{"internalType":"address","name":"_quoteTokenAddress","type":"address"},{"internalType":"uint256","name":"_quoteTokenAmount","type":"uint256"},{"internalType":"uint24","name":"_fee","type":"uint24"},{"internalType":"int24","name":"_tickLower","type":"int24"},{"internalType":"int24","name":"_tickUpper","type":"int24"},{"internalType":"uint160","name":"_sqrtPriceX96","type":"uint160"}],"name":"createLPPoolOrLinkLPPool","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"destruct","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"isManager","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpCurrentAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpToken0","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpToken1","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpTotalAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"managers","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_mintTokenAddressList","type":"address[]"},{"internalType":"uint24[]","name":"_mintTokenAmountRatioList","type":"uint24[]"},{"internalType":"uint256","name":"_startTimestamp","type":"uint256"},{"internalType":"uint256","name":"_endTimestamp","type":"uint256"},{"internalType":"int24","name":"_tickLower","type":"int24"},{"internalType":"int24","name":"_tickUpper","type":"int24"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintAnchor","outputs":[{"internalType":"uint128","name":"p","type":"uint128"},{"internalType":"uint16","name":"aNumerator","type":"uint16"},{"internalType":"uint16","name":"aDenominator","type":"uint16"},{"internalType":"uint16","name":"bNumerator","type":"uint16"},{"internalType":"uint16","name":"bDenominator","type":"uint16"},{"internalType":"uint16","name":"c","type":"uint16"},{"internalType":"uint16","name":"d","type":"uint16"},{"internalType":"uint256","name":"lastTimestamp","type":"uint256"},{"internalType":"uint256","name":"n","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"manager","type":"address"}],"name":"removeManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"staking","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"temporaryAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_baseTokenAmount","type":"uint256"},{"internalType":"int24","name":"_tickLower","type":"int24"},{"internalType":"int24","name":"_tickUpper","type":"int24"}],"name":"updateLPPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

6101006040523480156200001257600080fd5b506040516200503338038062005033833981016040819052620000359162000796565b8151829082906200004e9060039060208501906200047d565b508051620000649060049060208401906200047d565b5050508751895114620000be5760405162461bcd60e51b815260206004820152601660248201527f47454e45534953204c454e47544820494e56414c49440000000000000000000060448201526064015b60405180910390fd5b60005b895181101562000142576200012d8a8281518110620000f057634e487b7160e01b600052603260045260246000fd5b60200260200101518a83815181106200011957634e487b7160e01b600052603260045260246000fd5b6020026020010151620002a660201b60201c565b806200013981620009b7565b915050620000c1565b5060006200014f60025490565b1115620001a5576200017c6064886200016760025490565b6200038b60201b62001dec179092919060201c565b600881905586116200018f578562000193565b6008545b6008819055620001a5903090620002a6565b620001c2834260096200039160201b62001df2179092919060201c565b600580546001600160a01b0319166001600160a01b038616179055606085901b6001600160601b03191660a05260c087905260e0869052600854600c55604080516312a9293f60e21b8152905173c36442b4a4522e871399cd717abdd847ab11fe8891634aa4a4fc916004808301926020929190829003018186803b1580156200024b57600080fd5b505afa15801562000260573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000286919062000770565b60601b6001600160601b0319166080525062000a1a975050505050505050565b6001600160a01b038216620002fe5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401620000b5565b80600260008282546200031291906200091c565b90915550506001600160a01b03821660009081526020819052604081208054839290620003419084906200091c565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b91040290565b81518354602084015160408501516060860151608087015160a088015160c08901516001600160801b039097166001600160901b031990961695909517600160801b61ffff958616021763ffffffff60901b1916600160901b9385169390930261ffff60a01b191692909217600160a01b918416919091021763ffffffff60b01b1916600160b01b9183169190910261ffff60c01b191617600160c01b928216929092029190911761ffff60d01b1916600160d01b91909216021783556200045d620151808262000937565b6200046c906201518062000958565b600184015550506000600290910155565b8280546200048b906200097a565b90600052602060002090601f016020900481019282620004af5760008555620004fa565b82601f10620004ca57805160ff1916838001178555620004fa565b82800160010185558215620004fa579182015b82811115620004fa578251825591602001919060010190620004dd565b50620005089291506200050c565b5090565b5b808211156200050857600081556001016200050d565b8051620005308162000a01565b919050565b600082601f83011262000546578081fd5b815160206200055f6200055983620008f6565b620008c3565b80838252828201915082860187848660051b89010111156200057f578586fd5b855b85811015620005aa578151620005978162000a01565b8452928401929084019060010162000581565b5090979650505050505050565b600082601f830112620005c8578081fd5b81516020620005db6200055983620008f6565b80838252828201915082860187848660051b8901011115620005fb578586fd5b855b85811015620005aa57815184529284019290840190600101620005fd565b600082601f8301126200062c578081fd5b81516001600160401b03811115620006485762000648620009eb565b60206200065e601f8301601f19168201620008c3565b828152858284870101111562000672578384fd5b835b838110156200069157858101830151828201840152820162000674565b83811115620006a257848385840101525b5095945050505050565b600060e08284031215620006be578081fd5b620006c862000898565b82519091506001600160801b0381168114620006e357600080fd5b8152620006f3602083016200075d565b602082015262000706604083016200075d565b604082015262000719606083016200075d565b60608201526200072c608083016200075d565b60808201526200073f60a083016200075d565b60a08201526200075260c083016200075d565b60c082015292915050565b805161ffff811681146200053057600080fd5b60006020828403121562000782578081fd5b81516200078f8162000a01565b9392505050565b60008060008060008060008060006101e08a8c031215620007b5578485fd5b89516001600160401b0380821115620007cc578687fd5b620007da8d838e0162000535565b9a5060208c0151915080821115620007f0578687fd5b620007fe8d838e01620005b7565b995060408c0151985060608c015197506200081c60808d0162000523565b96506200082c60a08d0162000523565b95506200083d8d60c08e01620006ac565b94506101a08c015191508082111562000854578384fd5b620008628d838e016200061b565b93506101c08c015191508082111562000879578283fd5b50620008888c828d016200061b565b9150509295985092959850929598565b60405160e081016001600160401b0381118282101715620008bd57620008bd620009eb565b60405290565b604051601f8201601f191681016001600160401b0381118282101715620008ee57620008ee620009eb565b604052919050565b60006001600160401b03821115620009125762000912620009eb565b5060051b60200190565b60008219821115620009325762000932620009d5565b500190565b6000826200095357634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615620009755762000975620009d5565b500290565b600181811c908216806200098f57607f821691505b60208210811415620009b157634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415620009ce57620009ce620009d5565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811462000a1757600080fd5b50565b60805160601c60a05160601c60c05160e0516145af62000a8460003960008181610381015261183e015260008181610719015261181001526000818161063f015281816109bd01526126770152600081816103b501528181610e1c0152610fe201526145af6000f3fe6080604052600436106102085760003560e01c806370a0823111610118578063a9059cbb116100a0578063e50092bf1161006f578063e50092bf146106a7578063f2fde38b146106c7578063f3ae2415146106e7578063f70b6f8c14610707578063f80219d01461073b57600080fd5b8063a9059cbb146105ed578063ac18de431461060d578063c45a01551461062d578063dd62ed3e1461066157600080fd5b80638da5cb5b116100e75780638da5cb5b1461055857806390858d891461057857806395d89b4114610598578063a0b38a54146105ad578063a457c2d7146105cd57600080fd5b806370a08231146104ca57806372311705146105005780637c097bcc14610522578063877562b61461053857600080fd5b80633737bcb41161019b5780634cf088d91161016a5780634cf088d9146103d757806350afeeb8146103ec57806352751ee5146103ff5780635ee167c0146104145780636d2ddb8a1461043457600080fd5b80633737bcb414610317578063395093511461034f57806342a49b051461036f5780634aa4a4fc146103a357600080fd5b806323b872dd116101d757806323b872dd146102a45780632b68b9c6146102c45780632d06177a146102db578063313ce567146102fb57600080fd5b806306fdde0314610214578063095ea7b31461023f57806318160ddd1461026f5780631f2121701461028e57600080fd5b3661020f57005b600080fd5b34801561022057600080fd5b50610229610763565b6040516102369190614056565b60405180910390f35b34801561024b57600080fd5b5061025f61025a366004613a5b565b6107f5565b6040519015158152602001610236565b34801561027b57600080fd5b506002545b604051908152602001610236565b34801561029a57600080fd5b5061028060085481565b3480156102b057600080fd5b5061025f6102bf366004613a1b565b61080c565b3480156102d057600080fd5b506102d96108bd565b005b3480156102e757600080fd5b506102d96102f63660046139ab565b6108fe565b34801561030757600080fd5b5060405160128152602001610236565b34801561032357600080fd5b50600f54610337906001600160a01b031681565b6040516001600160a01b039091168152602001610236565b34801561035b57600080fd5b5061025f61036a366004613a5b565b61097d565b34801561037b57600080fd5b506102807f000000000000000000000000000000000000000000000000000000000000000081565b3480156103af57600080fd5b506103377f000000000000000000000000000000000000000000000000000000000000000081565b3480156103e357600080fd5b506103376109b9565b6102d96103fa366004613d0a565b610a51565b34801561040b57600080fd5b506102d961129f565b34801561042057600080fd5b50600d54610337906001600160a01b031681565b34801561044057600080fd5b50600954600a54600b54604080516001600160801b038516815261ffff600160801b860481166020830152600160901b8604811692820192909252600160a01b850482166060820152600160b01b850482166080820152600160c01b8504821660a0820152600160d01b9094041660c084015260e083019190915261010082015261012001610236565b3480156104d657600080fd5b506102806104e53660046139ab565b6001600160a01b031660009081526020819052604090205490565b34801561050c57600080fd5b50610515611494565b6040516102369190613f6a565b34801561052e57600080fd5b50610280600c5481565b34801561054457600080fd5b50600e54610337906001600160a01b031681565b34801561056457600080fd5b50600554610337906001600160a01b031681565b34801561058457600080fd5b506102d9610593366004613a86565b611563565b3480156105a457600080fd5b50610229611998565b3480156105b957600080fd5b506102d96105c8366004613d8d565b6119a7565b3480156105d957600080fd5b5061025f6105e8366004613a5b565b611b28565b3480156105f957600080fd5b5061025f610608366004613a5b565b611bc1565b34801561061957600080fd5b506102d96106283660046139ab565b611bce565b34801561063957600080fd5b506103377f000000000000000000000000000000000000000000000000000000000000000081565b34801561066d57600080fd5b5061028061067c3660046139e3565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3480156106b357600080fd5b506102d96106c2366004613b7c565b611c46565b3480156106d357600080fd5b506102d96106e23660046139ab565b611d4b565b3480156106f357600080fd5b5061025f6107023660046139ab565b611ddf565b34801561071357600080fd5b506102807f000000000000000000000000000000000000000000000000000000000000000081565b34801561074757600080fd5b5061033773c36442b4a4522e871399cd717abdd847ab11fe8881565b6060600380546107729061448e565b80601f016020809104026020016040519081016040528092919081815260200182805461079e9061448e565b80156107eb5780601f106107c0576101008083540402835291602001916107eb565b820191906000526020600020905b8154815290600101906020018083116107ce57829003601f168201915b5050505050905090565b6000610802338484611ee5565b5060015b92915050565b6000610819848484612009565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156108a35760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6108b08533858403611ee5565b60019150505b9392505050565b6005546001600160a01b0316336001600160a01b0316146108f05760405162461bcd60e51b815260040161089a90614089565b6005546001600160a01b0316ff5b6005546001600160a01b0316336001600160a01b0316146109315760405162461bcd60e51b815260040161089a90614089565b61093c6006826121d9565b506040516001600160a01b03821681527f3630096a7f9a158ab9fae41e86bfe31fd2202585a26a9668242672566dae028d906020015b60405180910390a150565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916108029185906109b490869061420b565b611ee5565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634cf088d96040518163ffffffff1660e01b815260040160206040518083038186803b158015610a1457600080fd5b505afa158015610a28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4c91906139c7565b905090565b6005546001600160a01b0316336001600160a01b031614610a845760405162461bcd60e51b815260040161089a90614089565b600f546001600160a01b031615610ad65760405162461bcd60e51b81526020600482015260166024820152754c5020504f4f4c20414c52454144592045584953545360501b604482015260640161089a565b60008711610b265760405162461bcd60e51b815260206004820152601a60248201527f4241534520544f4b454e20414d4f554e54204d555354203e2030000000000000604482015260640161089a565b60008511610b765760405162461bcd60e51b815260206004820152601b60248201527f51554f544520544f4b454e20414d4f554e54204d555354203e20300000000000604482015260640161089a565b600854871115610bc85760405162461bcd60e51b815260206004820152601a60248201527f4e4f5420454e4f5547482054454d504f52415259414d4f554e54000000000000604482015260640161089a565b6001600160a01b038616610c165760405162461bcd60e51b8152602060048201526015602482015274145553d511481513d2d153881393d50811561254d5605a1b604482015260640161089a565b6001600160a01b038616301415610c795760405162461bcd60e51b815260206004820152602160248201527f51554f544520544f4b454e2043414e204e4f54204245204241534520544f4b456044820152602760f91b606482015260840161089a565b8362ffffff166101f41480610c9457508362ffffff16610bb8145b80610ca557508362ffffff16612710145b610cdf5760405162461bcd60e51b815260206004820152600b60248201526a119151481253959053125160aa1b604482015260640161089a565b600073c36442b4a4522e871399cd717abdd847ab11fe8890506000816001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d3357600080fd5b505afa158015610d47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6b91906139c7565b604051630b4c774160e11b81523060048201526001600160a01b038a8116602483015262ffffff891660448301529190911690631698ee829060640160206040518083038186803b158015610dbf57600080fd5b505afa158015610dd3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df791906139c7565b9050610e1a3073c36442b4a4522e871399cd717abdd847ab11fe886000196121ee565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316886001600160a01b031614610e9257610e7d6001600160a01b03891673c36442b4a4522e871399cd717abdd847ab11fe886000196121ee565b610e926001600160a01b03891633308a61234a565b6000806001600160a01b038316610f0857610ebd6001600160a01b0385168c8c8c8c8c8c8c34612382565b600e80546001600160a01b03199081166001600160a01b0395861617909155600d8054821695851695909517909455600f805490941694909216939093179091559092509050610fe0565b6000610f188c8c8c8c8c8c612502565b600f80546001600160a01b038088166001600160a01b0319928316179092558251600d80549184169183169190911790556020830151600e805491841691909216179055604051634418b22b60e11b81529192508616906388316456903490610f859085906004016140ac565b6080604051808303818588803b158015610f9e57600080fd5b505af1158015610fb2573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610fd79190613dce565b90955093505050505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168a6001600160a01b031614156111385773c36442b4a4522e871399cd717abdd847ab11fe886001600160a01b03166312210e8a6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561106957600080fd5b505af115801561107d573d6000803e3d6000fd5b5050505060004711156111335760408051600080825260208201909252339047906040516110ab9190613f4e565b60006040518083038185875af1925050503d80600081146110e8576040519150601f19603f3d011682016040523d82523d6000602084013e6110ed565b606091505b50509050806111315760405162461bcd60e51b815260206004820152601060248201526f1c99599d5b991155120819985a5b195960821b604482015260640161089a565b505b6111d0565b6040516370a0823160e01b81523060048201526000906001600160a01b038c16906370a082319060240160206040518083038186803b15801561117a57600080fd5b505afa15801561118e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111b29190613cf2565b905080156111ce576111ce6001600160a01b038c163383612643565b505b600d546001600160a01b03163014156112005781600860008282546111f5919061444b565b909155506112189050565b8060086000828254611212919061444b565b90915550505b600f54604080518d81526001600160a01b03808e1660208301529181018c905262ffffff8b166060820152818816608082015260028a810b60a083015289900b60c0820152911660e08201527f8e88eb4206bdf114aa000a4766c0aeb962de1a66253c1fda556d7a1904e42939906101000160405180910390a15050505050505050505050565b6040516370a0823160e01b815230600482015260009073c36442b4a4522e871399cd717abdd847ab11fe88906370a082319060240160206040518083038186803b1580156112ec57600080fd5b505afa158015611300573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113249190613cf2565b9050600081116113605760405162461bcd60e51b81526020600482015260076024820152661393c81413d3d360ca1b604482015260640161089a565b60008167ffffffffffffffff81111561138957634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156113b2578160200160208202803683370190505b50905060005b8281101561148657604051632f745c5960e01b81523060048201526024810182905273c36442b4a4522e871399cd717abdd847ab11fe8890632f745c599060440160206040518083038186803b15801561141157600080fd5b505afa158015611425573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114499190613cf2565b82828151811061146957634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061147e816144c3565b9150506113b8565b5061149081612673565b5050565b606060006114a260066128e2565b67ffffffffffffffff8111156114c857634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156114f1578160200160208202803683370190505b50905060005b61150160066128e2565b81101561155d576115136006826128ec565b82828151811061153357634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015280611555816144c3565b9150506114f7565b50919050565b61156e6006336128f8565b8061158c57506005546001600160a01b0316336001600160a01b0316145b6115cd5760405162461bcd60e51b815260206004820152601260248201527137b7363ca7bbb732b927b926b0b730b3b2b960711b604482015260640161089a565b845186511461161e5760405162461bcd60e51b815260206004820152601b60248201527f4d494e542041444452455353204c454e47544820494e56414c49440000000000604482015260640161089a565b600a54841461166f5760405162461bcd60e51b815260206004820152601760248201527f53544152542054494d455354414d5020494e56414c4944000000000000000000604482015260640161089a565b428311156116bf5760405162461bcd60e51b815260206004820152601760248201527f454e442054494d455354414d5020494e56414c49442031000000000000000000604482015260640161089a565b600a5483116117105760405162461bcd60e51b815260206004820152601760248201527f454e442054494d455354414d5020494e56414c49442032000000000000000000604482015260640161089a565b600061171d60098561291a565b90506000805b87518110156117785787818151811061174c57634e487b7160e01b600052603260045260246000fd5b602002602001015162ffffff1682611764919061420b565b915080611770816144c3565b915050611723565b5060005b875181101561180a576117f88982815181106117a857634e487b7160e01b600052603260045260246000fd5b6020026020010151838a84815181106117d157634e487b7160e01b600052603260045260246000fd5b602002602001015162ffffff16866117e991906143e5565b6117f3919061425d565b612ac2565b80611802816144c3565b91505061177c565b50600c547f0000000000000000000000000000000000000000000000000000000000000000606484040290600090611862907f000000000000000000000000000000000000000000000000000000000000000061444b565b90508082106118715780611873565b815b91508115611949576118853083612ac2565b8160086000828254611897919061420b565b9250508190555081600c60008282546118b0919061420b565b9091555050600f546001600160a01b03161561194957600f5460009081906118f99073c36442b4a4522e871399cd717abdd847ab11fe88906001600160a01b0316868b8b612ba1565b600d5491935091506001600160a01b031630141561192e578160086000828254611923919061444b565b909155506119469050565b8060086000828254611940919061444b565b90915550505b50505b7fc49eb5ce1ace8bd2972ed9bbe5d288c34c527e7e413f893d2ecd10ef8ec69ddf8a8a8a8a8a8a8a6040516119849796959493929190613f7d565b60405180910390a150505050505050505050565b6060600480546107729061448e565b6005546001600160a01b0316336001600160a01b0316146119da5760405162461bcd60e51b815260040161089a90614089565b600854831115611a2c5760405162461bcd60e51b815260206004820152601a60248201527f4e4f5420454e4f5547482054454d504f52415259414d4f554e54000000000000604482015260640161089a565b600f546001600160a01b0316611a6e5760405162461bcd60e51b81526020600482015260076024820152661393c81413d3d360ca1b604482015260640161089a565b600f546000908190611aa19073c36442b4a4522e871399cd717abdd847ab11fe88906001600160a01b0316878787612ba1565b600d5491935091506001600160a01b0316301415611ad6578160086000828254611acb919061444b565b90915550611aee9050565b8060086000828254611ae8919061444b565b90915550505b6040518581527f9ed28b0d0ade467ee410741c17cd51b21171398478cbbad5e9942f51fa8f56429060200160405180910390a15050505050565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015611baa5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161089a565b611bb73385858403611ee5565b5060019392505050565b6000610802338484612009565b6005546001600160a01b0316336001600160a01b031614611c015760405162461bcd60e51b815260040161089a90614089565b611c0c600682612cba565b506040516001600160a01b03821681527f1e25ed4cabec84d314dc176241019653f237da01f2bdd3a10cb0f38b33da676390602001610972565b73c36442b4a4522e871399cd717abdd847ab11fe8860005b8251811015611d41576000838281518110611c8957634e487b7160e01b600052603260045260246000fd5b60200260200101519050306001600160a01b0316836001600160a01b0316636352211e836040518263ffffffff1660e01b8152600401611ccb91815260200190565b60206040518083038186803b158015611ce357600080fd5b505afa158015611cf7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d1b91906139c7565b6001600160a01b031614611d2e57600080fd5b5080611d39816144c3565b915050611c5e565b5061149082612673565b6005546001600160a01b0316336001600160a01b031614611d7e5760405162461bcd60e51b815260040161089a90614089565b6001600160a01b038116611d9157600080fd5b600580546001600160a01b0319166001600160a01b0383169081179091556040519081527fcfaaa26691e16e66e73290fc725eee1a6b4e0e693a1640484937aac25ffb55a490602001610972565b60006108066006836128f8565b91040290565b81518354602084015160408501516060860151608087015160a088015160c08901516001600160801b0390971671ffffffffffffffffffffffffffffffffffff1990961695909517600160801b61ffff958616021763ffffffff60901b1916600160901b9385169390930261ffff60a01b191692909217600160a01b918416919091021763ffffffff60b01b1916600160b01b9183169190910261ffff60c01b191617600160c01b928216929092029190911761ffff60d01b1916600160d01b9190921602178355611ec7620151808261425d565b611ed490620151806143e5565b600184015550506000600290910155565b6001600160a01b038316611f475760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161089a565b6001600160a01b038216611fa85760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161089a565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831661206d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161089a565b6001600160a01b0382166120cf5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161089a565b6001600160a01b038316600090815260208190526040902054818110156121475760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161089a565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061217e90849061420b565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516121ca91815260200190565b60405180910390a35b50505050565b60006108b6836001600160a01b038416612ccf565b8015806122775750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b15801561223d57600080fd5b505afa158015612251573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122759190613cf2565b155b6122e25760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606482015260840161089a565b6040516001600160a01b03831660248201526044810182905261234590849063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612d1e565b505050565b6040516001600160a01b03808516602483015283166044820152606481018290526121d39085906323b872dd60e01b9060840161230e565b6000806000806000806123998e8e8e8e8e8e612502565b905080600001519450806020015193508e6001600160a01b03166313ead562826000015183602001518e8c6040518563ffffffff1660e01b815260040161240e94939291906001600160a01b039485168152928416602084015262ffffff919091166040830152909116606082015260800190565b602060405180830381600087803b15801561242857600080fd5b505af115801561243c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061246091906139c7565b95508e6001600160a01b0316638831645688836040518363ffffffff1660e01b815260040161248f91906140ac565b6080604051808303818588803b1580156124a857600080fd5b505af11580156124bc573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906124e19190613dce565b90919250909150809350819450505050995099509950995099945050505050565b6040805161016081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052908080806001600160a01b038a1630111561257f57508892503091508790508961258b565b50309250889150899050875b6000600a61259984836143e5565b6125a3919061425d565b90506000600a6125b384836143e5565b6125bd919061425d565b905060006125cd42610e1061420b565b60408051610160810182526001600160a01b03998a16815297909816602088015262ffffff909b1696860196909652600298890b60608601529690970b608084015260a083019190915260c082015260e08101949094525050610100820152306101208201526101408101919091529392505050565b6040516001600160a01b03831660248201526044810182905261234590849063a9059cbb60e01b9060640161230e565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634cf088d96040518163ffffffff1660e01b815260040160206040518083038186803b1580156126ce57600080fd5b505afa1580156126e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061270691906139c7565b90506001600160a01b03811661274c5760405162461bcd60e51b815260206004820152600b60248201526a4e4f205f7374616b696e6760a81b604482015260640161089a565b60008060008060005b86518110156127ea576127bb87828151811061278157634e487b7160e01b600052603260045260246000fd5b6020908102919091010151600d54600e5473c36442b4a4522e871399cd717abdd847ab11fe8892916001600160a01b039081169116612df0565b90935091506127ca838661420b565b94506127d6828561420b565b9350806127e2816144c3565b915050612755565b5083156128405760006127fe60648661425d565b9050600061280c828761444b565b600d54909150612826906001600160a01b03168883612643565b61283d33600d546001600160a01b03169084612643565b50505b821561289557600061285360648561425d565b90506000612861828661444b565b600e5490915061287b906001600160a01b03168883612643565b61289233600e546001600160a01b03169084612643565b50505b336001600160a01b03167fd82360ec26aacb934381d978fccf02e426084b1f322819337105d62572b4d1cb8786866040516128d293929190614009565b60405180910390a2505050505050565b6000610806825490565b60006108b683836131ae565b6001600160a01b038116600090815260018301602052604081205415156108b6565b8154600283015460009161ffff600160d01b82048116926001600160801b03831692600160801b8104831692600160901b8204811692600160a01b8304821692600160b01b8104831692600160c01b9091041690889061297b90600161420b565b90506000620151808c60010154620151808d612997919061425d565b6129a490620151806143e5565b6129ae919061444b565b6129b8919061425d565b8c600201546129c7919061420b565b905060008080845b848111612aa05760006129ee8a6129e760018561444b565b8b91020490565b90508284821415806129ff57508783145b15612a7f57612a0e898361420b565b9050612a1a818d6142b4565b8e828f612a2791906142b4565b612a3191906143e5565b612a409064e8d4a510006143e5565b612a4a919061425d565b9050612a5b8f64e8d4a510006143e5565b612a65908261420b565b9050612a7664e8d4a510008261425d565b90508093508194505b612a89818761420b565b955050508080612a98906144c3565b9150506129cf565b50505060018d018c905560028d01919091559850505050505050505092915050565b6001600160a01b038216612b185760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161089a565b8060026000828254612b2a919061420b565b90915550506001600160a01b03821660009081526020819052604081208054839290612b5790849061420b565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600080600080600080612bb38a6131e6565b93509350935093508160020b8860020b1215612bce57600080fd5b8060020b8760020b1315612be157600080fd5b6000612bf28a866000878d8d612502565b9050846001600160a01b031681600001516001600160a01b03161415612c1e57600060e0820152612c27565b60006101008201525b604051634418b22b60e11b81526001600160a01b038d1690638831645690612c539084906004016140ac565b608060405180830381600087803b158015612c6d57600080fd5b505af1158015612c81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ca59190613dce565b909f909e509c50505050505050505050505050565b60006108b6836001600160a01b038416613504565b6000818152600183016020526040812054612d1657508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610806565b506000610806565b6000612d73826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166136219092919063ffffffff16565b8051909150156123455780806020019051810190612d919190613c0f565b6123455760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161089a565b600080600080876001600160a01b03166399fbab88886040518263ffffffff1660e01b8152600401612e2491815260200190565b6101806040518083038186803b158015612e3d57600080fd5b505afa158015612e51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e759190613e2c565b5050505050505050935093505050816001600160a01b0316866001600160a01b0316141580612eb65750806001600160a01b0316856001600160a01b031614155b15612ec85760009350600092506131a3565b6040805160808101825288815230602082018190526001600160801b03828401819052606083015291516370a0823160e01b81526004810192909252906000906001600160a01b038516906370a082319060240160206040518083038186803b158015612f3457600080fd5b505afa158015612f48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f6c9190613cf2565b6040516370a0823160e01b81523060048201529091506000906001600160a01b038516906370a082319060240160206040518083038186803b158015612fb157600080fd5b505afa158015612fc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fe99190613cf2565b6040805163fc6f786560e01b81528551600482015260208601516001600160a01b039081166024830152918601516001600160801b03908116604483015260608701511660648201529192508c169063fc6f7865906084016040805180830381600087803b15801561305a57600080fd5b505af115801561306e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130929190613e09565b50506040516370a0823160e01b815230600482015282906001600160a01b038716906370a082319060240160206040518083038186803b1580156130d557600080fd5b505afa1580156130e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061310d9190613cf2565b613117919061444b565b6040516370a0823160e01b815230600482015290975081906001600160a01b038616906370a082319060240160206040518083038186803b15801561315b57600080fd5b505afa15801561316f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131939190613cf2565b61319d919061444b565b95505050505b505094509492505050565b60008260000182815481106131d357634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b60008060008060008590506000816001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b15801561322c57600080fd5b505afa158015613240573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132649190613c45565b5050505050915050816001600160a01b031663ddca3f436040518163ffffffff1660e01b815260040160206040518083038186803b1580156132a557600080fd5b505afa1580156132b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132dd9190613cd6565b94506000826001600160a01b031663d0c93a7c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561331a57600080fd5b505afa15801561332e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133529190613c29565b9050826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561338d57600080fd5b505afa1580156133a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133c591906139c7565b6001600160a01b0316306001600160a01b0316141561346e576133e9828783613638565b94506133f486613682565b9350826001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561342f57600080fd5b505afa158015613443573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061346791906139c7565b96506134fa565b613477866136dd565b945061348482878361372d565b9350826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156134bf57600080fd5b505afa1580156134d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134f791906139c7565b96505b5050509193509193565b6000818152600183016020526040812054801561361757600061352860018361444b565b855490915060009061353c9060019061444b565b90508181146135bd57600086600001828154811061356a57634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508087600001848154811061359b57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b85548690806135dc57634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610806565b6000915050610806565b6060613630848460008561376d565b949350505050565b600080828561364686613682565b6136509190614404565b61365a9190614223565b9050613666818461435c565b61366f85613682565b6136799190614404565b95945050505050565b60008162ffffff166101f414156136a057610806620d89e5196144de565b8162ffffff16610bb814156136bc57610806620d89b3196144de565b8162ffffff1661271014156136d857610806620d899f196144de565b919050565b60008162ffffff166101f414156136f95750620d89e519919050565b8162ffffff16610bb814156137135750620d89b319919050565b8162ffffff1661271014156136d85750620d899f19919050565b6000808261373a856136dd565b6137449087614404565b61374e9190614223565b905061375a818461435c565b613763856136dd565b61367991906141c5565b6060824710156137ce5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161089a565b843b61381c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161089a565b600080866001600160a01b031685876040516138389190613f4e565b60006040518083038185875af1925050503d8060008114613875576040519150601f19603f3d011682016040523d82523d6000602084013e61387a565b606091505b509150915061388a828286613895565b979650505050505050565b606083156138a45750816108b6565b8251156138b45782518084602001fd5b8160405162461bcd60e51b815260040161089a9190614056565b80516136d881614541565b600082601f8301126138e9578081fd5b813560206138fe6138f9836141a1565b614170565b80838252828201915082860187848660051b890101111561391d578586fd5b855b8581101561394457813561393281614568565b8452928401929084019060010161391f565b5090979650505050505050565b805180151581146136d857600080fd5b80356136d881614559565b80516136d881614559565b80516001600160801b03811681146136d857600080fd5b805161ffff811681146136d857600080fd5b80516136d881614568565b6000602082840312156139bc578081fd5b81356108b681614541565b6000602082840312156139d8578081fd5b81516108b681614541565b600080604083850312156139f5578081fd5b8235613a0081614541565b91506020830135613a1081614541565b809150509250929050565b600080600060608486031215613a2f578081fd5b8335613a3a81614541565b92506020840135613a4a81614541565b929592945050506040919091013590565b60008060408385031215613a6d578081fd5b8235613a7881614541565b946020939093013593505050565b60008060008060008060c08789031215613a9e578384fd5b863567ffffffffffffffff80821115613ab5578586fd5b818901915089601f830112613ac8578586fd5b81356020613ad86138f9836141a1565b8083825282820191508286018e848660051b8901011115613af7578a8bfd5b8a96505b84871015613b22578035613b0e81614541565b835260019690960195918301918301613afb565b509a50508a013592505080821115613b38578586fd5b50613b4589828a016138d9565b9550506040870135935060608701359250613b6260808801613961565b9150613b7060a08801613961565b90509295509295509295565b60006020808385031215613b8e578182fd5b823567ffffffffffffffff811115613ba4578283fd5b8301601f81018513613bb4578283fd5b8035613bc26138f9826141a1565b80828252848201915084840188868560051b8701011115613be1578687fd5b8694505b83851015613c03578035835260019490940193918501918501613be5565b50979650505050505050565b600060208284031215613c20578081fd5b6108b682613951565b600060208284031215613c3a578081fd5b81516108b681614559565b600080600080600080600060e0888a031215613c5f578485fd5b8751613c6a81614541565b6020890151909750613c7b81614559565b9550613c896040890161398e565b9450613c976060890161398e565b9350613ca56080890161398e565b925060a088015160ff81168114613cba578182fd5b9150613cc860c08901613951565b905092959891949750929550565b600060208284031215613ce7578081fd5b81516108b681614568565b600060208284031215613d03578081fd5b5051919050565b600080600080600080600060e0888a031215613d24578081fd5b873596506020880135613d3681614541565b9550604088013594506060880135613d4d81614568565b93506080880135613d5d81614559565b925060a0880135613d6d81614559565b915060c0880135613d7d81614541565b8091505092959891949750929550565b600080600060608486031215613da1578081fd5b833592506020840135613db381614559565b91506040840135613dc381614559565b809150509250925092565b60008060008060808587031215613de3578182fd5b84519350613df360208601613977565b6040860151606090960151949790965092505050565b60008060408385031215613e1b578182fd5b505080516020909101519092909150565b6000806000806000806000806000806000806101808d8f031215613e4e578586fd5b8c516bffffffffffffffffffffffff81168114613e69578687fd5b9b50613e7760208e016138ce565b9a50613e8560408e016138ce565b9950613e9360608e016138ce565b9850613ea160808e016139a0565b9750613eaf60a08e0161396c565b9650613ebd60c08e0161396c565b9550613ecb60e08e01613977565b94506101008d015193506101208d01519250613eea6101408e01613977565b9150613ef96101608e01613977565b90509295989b509295989b509295989b565b6000815180845260208085019450808401835b83811015613f435781516001600160a01b031687529582019590820190600101613f1e565b509495945050505050565b60008251613f60818460208701614462565b9190910192915050565b6020815260006108b66020830184613f0b565b60e081526000613f9060e083018a613f0b565b82810360208481019190915289518083528a820192820190845b81811015613fcb57845162ffffff1683529383019391830191600101613faa565b50508093505050508660408301528560608301528460020b6080830152613ff760a083018560020b9052565b8260c083015298975050505050505050565b606080825284519082018190526000906020906080840190828801845b8281101561404257815184529284019290840190600101614026565b505050908301949094525060400152919050565b6020815260008251806020840152614075816040850160208701614462565b601f01601f19169190910160400192915050565b60208082526009908201526837b7363ca7bbb732b960b91b604082015260600190565b81516001600160a01b03168152610160810160208301516140d860208401826001600160a01b03169052565b5060408301516140ef604084018262ffffff169052565b506060830151614104606084018260020b9052565b506080830151614119608084018260020b9052565b5060a083015160a083015260c083015160c083015260e083015160e08301526101008084015181840152506101208084015161415f828501826001600160a01b03169052565b505061014092830151919092015290565b604051601f8201601f1916810167ffffffffffffffff811182821017156141995761419961452b565b604052919050565b600067ffffffffffffffff8211156141bb576141bb61452b565b5060051b60200190565b60008160020b8360020b82821282627fffff038213811516156141ea576141ea6144ff565b82627fffff19038212811615614202576142026144ff565b50019392505050565b6000821982111561421e5761421e6144ff565b500190565b60008160020b8360020b8061423a5761423a614515565b627fffff19821460001982141615614254576142546144ff565b90059392505050565b60008261426c5761426c614515565b500490565b600181815b808511156142ac578160001904821115614292576142926144ff565b8085161561429f57918102915b93841c9390800290614276565b509250929050565b60006108b683836000826142ca57506001610806565b816142d757506000610806565b81600181146142ed57600281146142f757614313565b6001915050610806565b60ff841115614308576143086144ff565b50506001821b610806565b5060208310610133831016604e8410600b8410161715614336575081810a610806565b6143408383614271565b8060001904821115614354576143546144ff565b029392505050565b60008160020b8360020b627fffff83821384841383830485118282161615614386576143866144ff565b627fffff19868512828116878305871216156143a4576143a46144ff565b8787129250858205871284841616156143bf576143bf6144ff565b858505871281841616156143d5576143d56144ff565b5050509290910295945050505050565b60008160001904831182151516156143ff576143ff6144ff565b500290565b60008160020b8360020b82811281627fffff190183128115161561442a5761442a6144ff565b81627fffff018313811615614441576144416144ff565b5090039392505050565b60008282101561445d5761445d6144ff565b500390565b60005b8381101561447d578181015183820152602001614465565b838111156121d35750506000910152565b600181811c908216806144a257607f821691505b6020821081141561155d57634e487b7160e01b600052602260045260246000fd5b60006000198214156144d7576144d76144ff565b5060010190565b60008160020b627fffff198114156144f8576144f86144ff565b9003919050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461455657600080fd5b50565b8060020b811461455657600080fd5b62ffffff8116811461455657600080fdfea2646970667358221220e382c3367464d0a426f0f669f4f3927512aa846334f3ab190f93042202d81d4c64736f6c6343000804003300000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000009b00000000000000000000000000000000000000000000be951906eba2aa8000000000000000000000000000007b728fd84995fac43a500ae144a1e121916e5c07000000000000000000000000cf8834088b3b1e6d39938964a1d2a0c4ba7d42520000000000000000000000000000000000000000000000b4aeaab10258f400000000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000002da00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000098080c43486ffa945f7fa4a7d40b699ff404798b0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000006f5d189bae6209b0000000000000000000000000000000000000000000000000000000000000000000154275696c646572206f662050454f504c454c414e44000000000000000000000000000000000000000000000000000000000000000000000000000000000000074255494c44455200000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106102085760003560e01c806370a0823111610118578063a9059cbb116100a0578063e50092bf1161006f578063e50092bf146106a7578063f2fde38b146106c7578063f3ae2415146106e7578063f70b6f8c14610707578063f80219d01461073b57600080fd5b8063a9059cbb146105ed578063ac18de431461060d578063c45a01551461062d578063dd62ed3e1461066157600080fd5b80638da5cb5b116100e75780638da5cb5b1461055857806390858d891461057857806395d89b4114610598578063a0b38a54146105ad578063a457c2d7146105cd57600080fd5b806370a08231146104ca57806372311705146105005780637c097bcc14610522578063877562b61461053857600080fd5b80633737bcb41161019b5780634cf088d91161016a5780634cf088d9146103d757806350afeeb8146103ec57806352751ee5146103ff5780635ee167c0146104145780636d2ddb8a1461043457600080fd5b80633737bcb414610317578063395093511461034f57806342a49b051461036f5780634aa4a4fc146103a357600080fd5b806323b872dd116101d757806323b872dd146102a45780632b68b9c6146102c45780632d06177a146102db578063313ce567146102fb57600080fd5b806306fdde0314610214578063095ea7b31461023f57806318160ddd1461026f5780631f2121701461028e57600080fd5b3661020f57005b600080fd5b34801561022057600080fd5b50610229610763565b6040516102369190614056565b60405180910390f35b34801561024b57600080fd5b5061025f61025a366004613a5b565b6107f5565b6040519015158152602001610236565b34801561027b57600080fd5b506002545b604051908152602001610236565b34801561029a57600080fd5b5061028060085481565b3480156102b057600080fd5b5061025f6102bf366004613a1b565b61080c565b3480156102d057600080fd5b506102d96108bd565b005b3480156102e757600080fd5b506102d96102f63660046139ab565b6108fe565b34801561030757600080fd5b5060405160128152602001610236565b34801561032357600080fd5b50600f54610337906001600160a01b031681565b6040516001600160a01b039091168152602001610236565b34801561035b57600080fd5b5061025f61036a366004613a5b565b61097d565b34801561037b57600080fd5b506102807f00000000000000000000000000000000000000000000be951906eba2aa80000081565b3480156103af57600080fd5b506103377f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b3480156103e357600080fd5b506103376109b9565b6102d96103fa366004613d0a565b610a51565b34801561040b57600080fd5b506102d961129f565b34801561042057600080fd5b50600d54610337906001600160a01b031681565b34801561044057600080fd5b50600954600a54600b54604080516001600160801b038516815261ffff600160801b860481166020830152600160901b8604811692820192909252600160a01b850482166060820152600160b01b850482166080820152600160c01b8504821660a0820152600160d01b9094041660c084015260e083019190915261010082015261012001610236565b3480156104d657600080fd5b506102806104e53660046139ab565b6001600160a01b031660009081526020819052604090205490565b34801561050c57600080fd5b50610515611494565b6040516102369190613f6a565b34801561052e57600080fd5b50610280600c5481565b34801561054457600080fd5b50600e54610337906001600160a01b031681565b34801561056457600080fd5b50600554610337906001600160a01b031681565b34801561058457600080fd5b506102d9610593366004613a86565b611563565b3480156105a457600080fd5b50610229611998565b3480156105b957600080fd5b506102d96105c8366004613d8d565b6119a7565b3480156105d957600080fd5b5061025f6105e8366004613a5b565b611b28565b3480156105f957600080fd5b5061025f610608366004613a5b565b611bc1565b34801561061957600080fd5b506102d96106283660046139ab565b611bce565b34801561063957600080fd5b506103377f0000000000000000000000007b728fd84995fac43a500ae144a1e121916e5c0781565b34801561066d57600080fd5b5061028061067c3660046139e3565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3480156106b357600080fd5b506102d96106c2366004613b7c565b611c46565b3480156106d357600080fd5b506102d96106e23660046139ab565b611d4b565b3480156106f357600080fd5b5061025f6107023660046139ab565b611ddf565b34801561071357600080fd5b506102807f000000000000000000000000000000000000000000000000000000000000009b81565b34801561074757600080fd5b5061033773c36442b4a4522e871399cd717abdd847ab11fe8881565b6060600380546107729061448e565b80601f016020809104026020016040519081016040528092919081815260200182805461079e9061448e565b80156107eb5780601f106107c0576101008083540402835291602001916107eb565b820191906000526020600020905b8154815290600101906020018083116107ce57829003601f168201915b5050505050905090565b6000610802338484611ee5565b5060015b92915050565b6000610819848484612009565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156108a35760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6108b08533858403611ee5565b60019150505b9392505050565b6005546001600160a01b0316336001600160a01b0316146108f05760405162461bcd60e51b815260040161089a90614089565b6005546001600160a01b0316ff5b6005546001600160a01b0316336001600160a01b0316146109315760405162461bcd60e51b815260040161089a90614089565b61093c6006826121d9565b506040516001600160a01b03821681527f3630096a7f9a158ab9fae41e86bfe31fd2202585a26a9668242672566dae028d906020015b60405180910390a150565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916108029185906109b490869061420b565b611ee5565b60007f0000000000000000000000007b728fd84995fac43a500ae144a1e121916e5c076001600160a01b0316634cf088d96040518163ffffffff1660e01b815260040160206040518083038186803b158015610a1457600080fd5b505afa158015610a28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4c91906139c7565b905090565b6005546001600160a01b0316336001600160a01b031614610a845760405162461bcd60e51b815260040161089a90614089565b600f546001600160a01b031615610ad65760405162461bcd60e51b81526020600482015260166024820152754c5020504f4f4c20414c52454144592045584953545360501b604482015260640161089a565b60008711610b265760405162461bcd60e51b815260206004820152601a60248201527f4241534520544f4b454e20414d4f554e54204d555354203e2030000000000000604482015260640161089a565b60008511610b765760405162461bcd60e51b815260206004820152601b60248201527f51554f544520544f4b454e20414d4f554e54204d555354203e20300000000000604482015260640161089a565b600854871115610bc85760405162461bcd60e51b815260206004820152601a60248201527f4e4f5420454e4f5547482054454d504f52415259414d4f554e54000000000000604482015260640161089a565b6001600160a01b038616610c165760405162461bcd60e51b8152602060048201526015602482015274145553d511481513d2d153881393d50811561254d5605a1b604482015260640161089a565b6001600160a01b038616301415610c795760405162461bcd60e51b815260206004820152602160248201527f51554f544520544f4b454e2043414e204e4f54204245204241534520544f4b456044820152602760f91b606482015260840161089a565b8362ffffff166101f41480610c9457508362ffffff16610bb8145b80610ca557508362ffffff16612710145b610cdf5760405162461bcd60e51b815260206004820152600b60248201526a119151481253959053125160aa1b604482015260640161089a565b600073c36442b4a4522e871399cd717abdd847ab11fe8890506000816001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d3357600080fd5b505afa158015610d47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6b91906139c7565b604051630b4c774160e11b81523060048201526001600160a01b038a8116602483015262ffffff891660448301529190911690631698ee829060640160206040518083038186803b158015610dbf57600080fd5b505afa158015610dd3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df791906139c7565b9050610e1a3073c36442b4a4522e871399cd717abdd847ab11fe886000196121ee565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b0316886001600160a01b031614610e9257610e7d6001600160a01b03891673c36442b4a4522e871399cd717abdd847ab11fe886000196121ee565b610e926001600160a01b03891633308a61234a565b6000806001600160a01b038316610f0857610ebd6001600160a01b0385168c8c8c8c8c8c8c34612382565b600e80546001600160a01b03199081166001600160a01b0395861617909155600d8054821695851695909517909455600f805490941694909216939093179091559092509050610fe0565b6000610f188c8c8c8c8c8c612502565b600f80546001600160a01b038088166001600160a01b0319928316179092558251600d80549184169183169190911790556020830151600e805491841691909216179055604051634418b22b60e11b81529192508616906388316456903490610f859085906004016140ac565b6080604051808303818588803b158015610f9e57600080fd5b505af1158015610fb2573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610fd79190613dce565b90955093505050505b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b03168a6001600160a01b031614156111385773c36442b4a4522e871399cd717abdd847ab11fe886001600160a01b03166312210e8a6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561106957600080fd5b505af115801561107d573d6000803e3d6000fd5b5050505060004711156111335760408051600080825260208201909252339047906040516110ab9190613f4e565b60006040518083038185875af1925050503d80600081146110e8576040519150601f19603f3d011682016040523d82523d6000602084013e6110ed565b606091505b50509050806111315760405162461bcd60e51b815260206004820152601060248201526f1c99599d5b991155120819985a5b195960821b604482015260640161089a565b505b6111d0565b6040516370a0823160e01b81523060048201526000906001600160a01b038c16906370a082319060240160206040518083038186803b15801561117a57600080fd5b505afa15801561118e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111b29190613cf2565b905080156111ce576111ce6001600160a01b038c163383612643565b505b600d546001600160a01b03163014156112005781600860008282546111f5919061444b565b909155506112189050565b8060086000828254611212919061444b565b90915550505b600f54604080518d81526001600160a01b03808e1660208301529181018c905262ffffff8b166060820152818816608082015260028a810b60a083015289900b60c0820152911660e08201527f8e88eb4206bdf114aa000a4766c0aeb962de1a66253c1fda556d7a1904e42939906101000160405180910390a15050505050505050505050565b6040516370a0823160e01b815230600482015260009073c36442b4a4522e871399cd717abdd847ab11fe88906370a082319060240160206040518083038186803b1580156112ec57600080fd5b505afa158015611300573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113249190613cf2565b9050600081116113605760405162461bcd60e51b81526020600482015260076024820152661393c81413d3d360ca1b604482015260640161089a565b60008167ffffffffffffffff81111561138957634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156113b2578160200160208202803683370190505b50905060005b8281101561148657604051632f745c5960e01b81523060048201526024810182905273c36442b4a4522e871399cd717abdd847ab11fe8890632f745c599060440160206040518083038186803b15801561141157600080fd5b505afa158015611425573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114499190613cf2565b82828151811061146957634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061147e816144c3565b9150506113b8565b5061149081612673565b5050565b606060006114a260066128e2565b67ffffffffffffffff8111156114c857634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156114f1578160200160208202803683370190505b50905060005b61150160066128e2565b81101561155d576115136006826128ec565b82828151811061153357634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015280611555816144c3565b9150506114f7565b50919050565b61156e6006336128f8565b8061158c57506005546001600160a01b0316336001600160a01b0316145b6115cd5760405162461bcd60e51b815260206004820152601260248201527137b7363ca7bbb732b927b926b0b730b3b2b960711b604482015260640161089a565b845186511461161e5760405162461bcd60e51b815260206004820152601b60248201527f4d494e542041444452455353204c454e47544820494e56414c49440000000000604482015260640161089a565b600a54841461166f5760405162461bcd60e51b815260206004820152601760248201527f53544152542054494d455354414d5020494e56414c4944000000000000000000604482015260640161089a565b428311156116bf5760405162461bcd60e51b815260206004820152601760248201527f454e442054494d455354414d5020494e56414c49442031000000000000000000604482015260640161089a565b600a5483116117105760405162461bcd60e51b815260206004820152601760248201527f454e442054494d455354414d5020494e56414c49442032000000000000000000604482015260640161089a565b600061171d60098561291a565b90506000805b87518110156117785787818151811061174c57634e487b7160e01b600052603260045260246000fd5b602002602001015162ffffff1682611764919061420b565b915080611770816144c3565b915050611723565b5060005b875181101561180a576117f88982815181106117a857634e487b7160e01b600052603260045260246000fd5b6020026020010151838a84815181106117d157634e487b7160e01b600052603260045260246000fd5b602002602001015162ffffff16866117e991906143e5565b6117f3919061425d565b612ac2565b80611802816144c3565b91505061177c565b50600c547f000000000000000000000000000000000000000000000000000000000000009b606484040290600090611862907f00000000000000000000000000000000000000000000be951906eba2aa80000061444b565b90508082106118715780611873565b815b91508115611949576118853083612ac2565b8160086000828254611897919061420b565b9250508190555081600c60008282546118b0919061420b565b9091555050600f546001600160a01b03161561194957600f5460009081906118f99073c36442b4a4522e871399cd717abdd847ab11fe88906001600160a01b0316868b8b612ba1565b600d5491935091506001600160a01b031630141561192e578160086000828254611923919061444b565b909155506119469050565b8060086000828254611940919061444b565b90915550505b50505b7fc49eb5ce1ace8bd2972ed9bbe5d288c34c527e7e413f893d2ecd10ef8ec69ddf8a8a8a8a8a8a8a6040516119849796959493929190613f7d565b60405180910390a150505050505050505050565b6060600480546107729061448e565b6005546001600160a01b0316336001600160a01b0316146119da5760405162461bcd60e51b815260040161089a90614089565b600854831115611a2c5760405162461bcd60e51b815260206004820152601a60248201527f4e4f5420454e4f5547482054454d504f52415259414d4f554e54000000000000604482015260640161089a565b600f546001600160a01b0316611a6e5760405162461bcd60e51b81526020600482015260076024820152661393c81413d3d360ca1b604482015260640161089a565b600f546000908190611aa19073c36442b4a4522e871399cd717abdd847ab11fe88906001600160a01b0316878787612ba1565b600d5491935091506001600160a01b0316301415611ad6578160086000828254611acb919061444b565b90915550611aee9050565b8060086000828254611ae8919061444b565b90915550505b6040518581527f9ed28b0d0ade467ee410741c17cd51b21171398478cbbad5e9942f51fa8f56429060200160405180910390a15050505050565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015611baa5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161089a565b611bb73385858403611ee5565b5060019392505050565b6000610802338484612009565b6005546001600160a01b0316336001600160a01b031614611c015760405162461bcd60e51b815260040161089a90614089565b611c0c600682612cba565b506040516001600160a01b03821681527f1e25ed4cabec84d314dc176241019653f237da01f2bdd3a10cb0f38b33da676390602001610972565b73c36442b4a4522e871399cd717abdd847ab11fe8860005b8251811015611d41576000838281518110611c8957634e487b7160e01b600052603260045260246000fd5b60200260200101519050306001600160a01b0316836001600160a01b0316636352211e836040518263ffffffff1660e01b8152600401611ccb91815260200190565b60206040518083038186803b158015611ce357600080fd5b505afa158015611cf7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d1b91906139c7565b6001600160a01b031614611d2e57600080fd5b5080611d39816144c3565b915050611c5e565b5061149082612673565b6005546001600160a01b0316336001600160a01b031614611d7e5760405162461bcd60e51b815260040161089a90614089565b6001600160a01b038116611d9157600080fd5b600580546001600160a01b0319166001600160a01b0383169081179091556040519081527fcfaaa26691e16e66e73290fc725eee1a6b4e0e693a1640484937aac25ffb55a490602001610972565b60006108066006836128f8565b91040290565b81518354602084015160408501516060860151608087015160a088015160c08901516001600160801b0390971671ffffffffffffffffffffffffffffffffffff1990961695909517600160801b61ffff958616021763ffffffff60901b1916600160901b9385169390930261ffff60a01b191692909217600160a01b918416919091021763ffffffff60b01b1916600160b01b9183169190910261ffff60c01b191617600160c01b928216929092029190911761ffff60d01b1916600160d01b9190921602178355611ec7620151808261425d565b611ed490620151806143e5565b600184015550506000600290910155565b6001600160a01b038316611f475760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161089a565b6001600160a01b038216611fa85760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161089a565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831661206d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161089a565b6001600160a01b0382166120cf5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161089a565b6001600160a01b038316600090815260208190526040902054818110156121475760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161089a565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061217e90849061420b565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516121ca91815260200190565b60405180910390a35b50505050565b60006108b6836001600160a01b038416612ccf565b8015806122775750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b15801561223d57600080fd5b505afa158015612251573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122759190613cf2565b155b6122e25760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606482015260840161089a565b6040516001600160a01b03831660248201526044810182905261234590849063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612d1e565b505050565b6040516001600160a01b03808516602483015283166044820152606481018290526121d39085906323b872dd60e01b9060840161230e565b6000806000806000806123998e8e8e8e8e8e612502565b905080600001519450806020015193508e6001600160a01b03166313ead562826000015183602001518e8c6040518563ffffffff1660e01b815260040161240e94939291906001600160a01b039485168152928416602084015262ffffff919091166040830152909116606082015260800190565b602060405180830381600087803b15801561242857600080fd5b505af115801561243c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061246091906139c7565b95508e6001600160a01b0316638831645688836040518363ffffffff1660e01b815260040161248f91906140ac565b6080604051808303818588803b1580156124a857600080fd5b505af11580156124bc573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906124e19190613dce565b90919250909150809350819450505050995099509950995099945050505050565b6040805161016081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052908080806001600160a01b038a1630111561257f57508892503091508790508961258b565b50309250889150899050875b6000600a61259984836143e5565b6125a3919061425d565b90506000600a6125b384836143e5565b6125bd919061425d565b905060006125cd42610e1061420b565b60408051610160810182526001600160a01b03998a16815297909816602088015262ffffff909b1696860196909652600298890b60608601529690970b608084015260a083019190915260c082015260e08101949094525050610100820152306101208201526101408101919091529392505050565b6040516001600160a01b03831660248201526044810182905261234590849063a9059cbb60e01b9060640161230e565b60007f0000000000000000000000007b728fd84995fac43a500ae144a1e121916e5c076001600160a01b0316634cf088d96040518163ffffffff1660e01b815260040160206040518083038186803b1580156126ce57600080fd5b505afa1580156126e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061270691906139c7565b90506001600160a01b03811661274c5760405162461bcd60e51b815260206004820152600b60248201526a4e4f205f7374616b696e6760a81b604482015260640161089a565b60008060008060005b86518110156127ea576127bb87828151811061278157634e487b7160e01b600052603260045260246000fd5b6020908102919091010151600d54600e5473c36442b4a4522e871399cd717abdd847ab11fe8892916001600160a01b039081169116612df0565b90935091506127ca838661420b565b94506127d6828561420b565b9350806127e2816144c3565b915050612755565b5083156128405760006127fe60648661425d565b9050600061280c828761444b565b600d54909150612826906001600160a01b03168883612643565b61283d33600d546001600160a01b03169084612643565b50505b821561289557600061285360648561425d565b90506000612861828661444b565b600e5490915061287b906001600160a01b03168883612643565b61289233600e546001600160a01b03169084612643565b50505b336001600160a01b03167fd82360ec26aacb934381d978fccf02e426084b1f322819337105d62572b4d1cb8786866040516128d293929190614009565b60405180910390a2505050505050565b6000610806825490565b60006108b683836131ae565b6001600160a01b038116600090815260018301602052604081205415156108b6565b8154600283015460009161ffff600160d01b82048116926001600160801b03831692600160801b8104831692600160901b8204811692600160a01b8304821692600160b01b8104831692600160c01b9091041690889061297b90600161420b565b90506000620151808c60010154620151808d612997919061425d565b6129a490620151806143e5565b6129ae919061444b565b6129b8919061425d565b8c600201546129c7919061420b565b905060008080845b848111612aa05760006129ee8a6129e760018561444b565b8b91020490565b90508284821415806129ff57508783145b15612a7f57612a0e898361420b565b9050612a1a818d6142b4565b8e828f612a2791906142b4565b612a3191906143e5565b612a409064e8d4a510006143e5565b612a4a919061425d565b9050612a5b8f64e8d4a510006143e5565b612a65908261420b565b9050612a7664e8d4a510008261425d565b90508093508194505b612a89818761420b565b955050508080612a98906144c3565b9150506129cf565b50505060018d018c905560028d01919091559850505050505050505092915050565b6001600160a01b038216612b185760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161089a565b8060026000828254612b2a919061420b565b90915550506001600160a01b03821660009081526020819052604081208054839290612b5790849061420b565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600080600080600080612bb38a6131e6565b93509350935093508160020b8860020b1215612bce57600080fd5b8060020b8760020b1315612be157600080fd5b6000612bf28a866000878d8d612502565b9050846001600160a01b031681600001516001600160a01b03161415612c1e57600060e0820152612c27565b60006101008201525b604051634418b22b60e11b81526001600160a01b038d1690638831645690612c539084906004016140ac565b608060405180830381600087803b158015612c6d57600080fd5b505af1158015612c81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ca59190613dce565b909f909e509c50505050505050505050505050565b60006108b6836001600160a01b038416613504565b6000818152600183016020526040812054612d1657508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610806565b506000610806565b6000612d73826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166136219092919063ffffffff16565b8051909150156123455780806020019051810190612d919190613c0f565b6123455760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161089a565b600080600080876001600160a01b03166399fbab88886040518263ffffffff1660e01b8152600401612e2491815260200190565b6101806040518083038186803b158015612e3d57600080fd5b505afa158015612e51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e759190613e2c565b5050505050505050935093505050816001600160a01b0316866001600160a01b0316141580612eb65750806001600160a01b0316856001600160a01b031614155b15612ec85760009350600092506131a3565b6040805160808101825288815230602082018190526001600160801b03828401819052606083015291516370a0823160e01b81526004810192909252906000906001600160a01b038516906370a082319060240160206040518083038186803b158015612f3457600080fd5b505afa158015612f48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f6c9190613cf2565b6040516370a0823160e01b81523060048201529091506000906001600160a01b038516906370a082319060240160206040518083038186803b158015612fb157600080fd5b505afa158015612fc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fe99190613cf2565b6040805163fc6f786560e01b81528551600482015260208601516001600160a01b039081166024830152918601516001600160801b03908116604483015260608701511660648201529192508c169063fc6f7865906084016040805180830381600087803b15801561305a57600080fd5b505af115801561306e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130929190613e09565b50506040516370a0823160e01b815230600482015282906001600160a01b038716906370a082319060240160206040518083038186803b1580156130d557600080fd5b505afa1580156130e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061310d9190613cf2565b613117919061444b565b6040516370a0823160e01b815230600482015290975081906001600160a01b038616906370a082319060240160206040518083038186803b15801561315b57600080fd5b505afa15801561316f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131939190613cf2565b61319d919061444b565b95505050505b505094509492505050565b60008260000182815481106131d357634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b60008060008060008590506000816001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b15801561322c57600080fd5b505afa158015613240573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132649190613c45565b5050505050915050816001600160a01b031663ddca3f436040518163ffffffff1660e01b815260040160206040518083038186803b1580156132a557600080fd5b505afa1580156132b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132dd9190613cd6565b94506000826001600160a01b031663d0c93a7c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561331a57600080fd5b505afa15801561332e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133529190613c29565b9050826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561338d57600080fd5b505afa1580156133a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133c591906139c7565b6001600160a01b0316306001600160a01b0316141561346e576133e9828783613638565b94506133f486613682565b9350826001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561342f57600080fd5b505afa158015613443573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061346791906139c7565b96506134fa565b613477866136dd565b945061348482878361372d565b9350826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156134bf57600080fd5b505afa1580156134d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134f791906139c7565b96505b5050509193509193565b6000818152600183016020526040812054801561361757600061352860018361444b565b855490915060009061353c9060019061444b565b90508181146135bd57600086600001828154811061356a57634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508087600001848154811061359b57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b85548690806135dc57634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610806565b6000915050610806565b6060613630848460008561376d565b949350505050565b600080828561364686613682565b6136509190614404565b61365a9190614223565b9050613666818461435c565b61366f85613682565b6136799190614404565b95945050505050565b60008162ffffff166101f414156136a057610806620d89e5196144de565b8162ffffff16610bb814156136bc57610806620d89b3196144de565b8162ffffff1661271014156136d857610806620d899f196144de565b919050565b60008162ffffff166101f414156136f95750620d89e519919050565b8162ffffff16610bb814156137135750620d89b319919050565b8162ffffff1661271014156136d85750620d899f19919050565b6000808261373a856136dd565b6137449087614404565b61374e9190614223565b905061375a818461435c565b613763856136dd565b61367991906141c5565b6060824710156137ce5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161089a565b843b61381c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161089a565b600080866001600160a01b031685876040516138389190613f4e565b60006040518083038185875af1925050503d8060008114613875576040519150601f19603f3d011682016040523d82523d6000602084013e61387a565b606091505b509150915061388a828286613895565b979650505050505050565b606083156138a45750816108b6565b8251156138b45782518084602001fd5b8160405162461bcd60e51b815260040161089a9190614056565b80516136d881614541565b600082601f8301126138e9578081fd5b813560206138fe6138f9836141a1565b614170565b80838252828201915082860187848660051b890101111561391d578586fd5b855b8581101561394457813561393281614568565b8452928401929084019060010161391f565b5090979650505050505050565b805180151581146136d857600080fd5b80356136d881614559565b80516136d881614559565b80516001600160801b03811681146136d857600080fd5b805161ffff811681146136d857600080fd5b80516136d881614568565b6000602082840312156139bc578081fd5b81356108b681614541565b6000602082840312156139d8578081fd5b81516108b681614541565b600080604083850312156139f5578081fd5b8235613a0081614541565b91506020830135613a1081614541565b809150509250929050565b600080600060608486031215613a2f578081fd5b8335613a3a81614541565b92506020840135613a4a81614541565b929592945050506040919091013590565b60008060408385031215613a6d578081fd5b8235613a7881614541565b946020939093013593505050565b60008060008060008060c08789031215613a9e578384fd5b863567ffffffffffffffff80821115613ab5578586fd5b818901915089601f830112613ac8578586fd5b81356020613ad86138f9836141a1565b8083825282820191508286018e848660051b8901011115613af7578a8bfd5b8a96505b84871015613b22578035613b0e81614541565b835260019690960195918301918301613afb565b509a50508a013592505080821115613b38578586fd5b50613b4589828a016138d9565b9550506040870135935060608701359250613b6260808801613961565b9150613b7060a08801613961565b90509295509295509295565b60006020808385031215613b8e578182fd5b823567ffffffffffffffff811115613ba4578283fd5b8301601f81018513613bb4578283fd5b8035613bc26138f9826141a1565b80828252848201915084840188868560051b8701011115613be1578687fd5b8694505b83851015613c03578035835260019490940193918501918501613be5565b50979650505050505050565b600060208284031215613c20578081fd5b6108b682613951565b600060208284031215613c3a578081fd5b81516108b681614559565b600080600080600080600060e0888a031215613c5f578485fd5b8751613c6a81614541565b6020890151909750613c7b81614559565b9550613c896040890161398e565b9450613c976060890161398e565b9350613ca56080890161398e565b925060a088015160ff81168114613cba578182fd5b9150613cc860c08901613951565b905092959891949750929550565b600060208284031215613ce7578081fd5b81516108b681614568565b600060208284031215613d03578081fd5b5051919050565b600080600080600080600060e0888a031215613d24578081fd5b873596506020880135613d3681614541565b9550604088013594506060880135613d4d81614568565b93506080880135613d5d81614559565b925060a0880135613d6d81614559565b915060c0880135613d7d81614541565b8091505092959891949750929550565b600080600060608486031215613da1578081fd5b833592506020840135613db381614559565b91506040840135613dc381614559565b809150509250925092565b60008060008060808587031215613de3578182fd5b84519350613df360208601613977565b6040860151606090960151949790965092505050565b60008060408385031215613e1b578182fd5b505080516020909101519092909150565b6000806000806000806000806000806000806101808d8f031215613e4e578586fd5b8c516bffffffffffffffffffffffff81168114613e69578687fd5b9b50613e7760208e016138ce565b9a50613e8560408e016138ce565b9950613e9360608e016138ce565b9850613ea160808e016139a0565b9750613eaf60a08e0161396c565b9650613ebd60c08e0161396c565b9550613ecb60e08e01613977565b94506101008d015193506101208d01519250613eea6101408e01613977565b9150613ef96101608e01613977565b90509295989b509295989b509295989b565b6000815180845260208085019450808401835b83811015613f435781516001600160a01b031687529582019590820190600101613f1e565b509495945050505050565b60008251613f60818460208701614462565b9190910192915050565b6020815260006108b66020830184613f0b565b60e081526000613f9060e083018a613f0b565b82810360208481019190915289518083528a820192820190845b81811015613fcb57845162ffffff1683529383019391830191600101613faa565b50508093505050508660408301528560608301528460020b6080830152613ff760a083018560020b9052565b8260c083015298975050505050505050565b606080825284519082018190526000906020906080840190828801845b8281101561404257815184529284019290840190600101614026565b505050908301949094525060400152919050565b6020815260008251806020840152614075816040850160208701614462565b601f01601f19169190910160400192915050565b60208082526009908201526837b7363ca7bbb732b960b91b604082015260600190565b81516001600160a01b03168152610160810160208301516140d860208401826001600160a01b03169052565b5060408301516140ef604084018262ffffff169052565b506060830151614104606084018260020b9052565b506080830151614119608084018260020b9052565b5060a083015160a083015260c083015160c083015260e083015160e08301526101008084015181840152506101208084015161415f828501826001600160a01b03169052565b505061014092830151919092015290565b604051601f8201601f1916810167ffffffffffffffff811182821017156141995761419961452b565b604052919050565b600067ffffffffffffffff8211156141bb576141bb61452b565b5060051b60200190565b60008160020b8360020b82821282627fffff038213811516156141ea576141ea6144ff565b82627fffff19038212811615614202576142026144ff565b50019392505050565b6000821982111561421e5761421e6144ff565b500190565b60008160020b8360020b8061423a5761423a614515565b627fffff19821460001982141615614254576142546144ff565b90059392505050565b60008261426c5761426c614515565b500490565b600181815b808511156142ac578160001904821115614292576142926144ff565b8085161561429f57918102915b93841c9390800290614276565b509250929050565b60006108b683836000826142ca57506001610806565b816142d757506000610806565b81600181146142ed57600281146142f757614313565b6001915050610806565b60ff841115614308576143086144ff565b50506001821b610806565b5060208310610133831016604e8410600b8410161715614336575081810a610806565b6143408383614271565b8060001904821115614354576143546144ff565b029392505050565b60008160020b8360020b627fffff83821384841383830485118282161615614386576143866144ff565b627fffff19868512828116878305871216156143a4576143a46144ff565b8787129250858205871284841616156143bf576143bf6144ff565b858505871281841616156143d5576143d56144ff565b5050509290910295945050505050565b60008160001904831182151516156143ff576143ff6144ff565b500290565b60008160020b8360020b82811281627fffff190183128115161561442a5761442a6144ff565b81627fffff018313811615614441576144416144ff565b5090039392505050565b60008282101561445d5761445d6144ff565b500390565b60005b8381101561447d578181015183820152602001614465565b838111156121d35750506000910152565b600181811c908216806144a257607f821691505b6020821081141561155d57634e487b7160e01b600052602260045260246000fd5b60006000198214156144d7576144d76144ff565b5060010190565b60008160020b627fffff198114156144f8576144f86144ff565b9003919050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461455657600080fd5b50565b8060020b811461455657600080fd5b62ffffff8116811461455657600080fdfea2646970667358221220e382c3367464d0a426f0f669f4f3927512aa846334f3ab190f93042202d81d4c64736f6c63430008040033

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

00000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000009b00000000000000000000000000000000000000000000be951906eba2aa8000000000000000000000000000007b728fd84995fac43a500ae144a1e121916e5c07000000000000000000000000cf8834088b3b1e6d39938964a1d2a0c4ba7d42520000000000000000000000000000000000000000000000b4aeaab10258f400000000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000002da00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000098080c43486ffa945f7fa4a7d40b699ff404798b0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000006f5d189bae6209b0000000000000000000000000000000000000000000000000000000000000000000154275696c646572206f662050454f504c454c414e44000000000000000000000000000000000000000000000000000000000000000000000000000000000000074255494c44455200000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _genesisTokenAddressList (address[]): 0x98080C43486FfA945f7FA4A7d40B699Ff404798B
Arg [1] : _genesisTokenAmountList (uint256[]): 525900000000000000000000
Arg [2] : _lpRatio (uint256): 155
Arg [3] : _lpTotalAmount (uint256): 900000000000000000000000
Arg [4] : _factoryAddress (address): 0x7b728FD84995fAC43A500Ae144A1e121916E5c07
Arg [5] : _ownerAddress (address): 0xcf8834088b3b1e6D39938964a1d2A0c4BA7D4252
Arg [6] : _mintArgs (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [7] : _erc20Name (string): Builder of PEOPLELAND
Arg [8] : _erc20Symbol (string): BUILDER

-----Encoded View---------------
23 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000001e0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000220
Arg [2] : 000000000000000000000000000000000000000000000000000000000000009b
Arg [3] : 00000000000000000000000000000000000000000000be951906eba2aa800000
Arg [4] : 0000000000000000000000007b728fd84995fac43a500ae144a1e121916e5c07
Arg [5] : 000000000000000000000000cf8834088b3b1e6d39938964a1d2a0c4ba7d4252
Arg [6] : 0000000000000000000000000000000000000000000000b4aeaab10258f40000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [8] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [10] : 00000000000000000000000000000000000000000000000000000000000002da
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000260
Arg [14] : 00000000000000000000000000000000000000000000000000000000000002a0
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [16] : 00000000000000000000000098080c43486ffa945f7fa4a7d40b699ff404798b
Arg [17] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [18] : 000000000000000000000000000000000000000000006f5d189bae6209b00000
Arg [19] : 0000000000000000000000000000000000000000000000000000000000000015
Arg [20] : 4275696c646572206f662050454f504c454c414e440000000000000000000000
Arg [21] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [22] : 4255494c44455200000000000000000000000000000000000000000000000000


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.