ETH Price: $3,431.14 (-1.47%)
Gas: 5 Gwei

Contract

0xC25c516eB7d86b5EC38c07182f4A2F73aC81eead
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60808060191738942024-02-07 4:19:35161 days ago1707279575IN
 Create: GempadLock
0 ETH0.1373759525.87603666

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
GempadLock

Compiler Version
v0.8.22+commit.4fc1097e

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 30 : GempadLock.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.22;

import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";

import "../interfaces/IGempadLock.sol";
import "../interfaces/IUniswapV2Pair.sol";
import "../interfaces/IUniswapV2Factory.sol";
import "../interfaces/IUniswapV3Factory.sol";
import "../interfaces/IUniswapV3Pair.sol";
import "../interfaces/INonfungiblePositionManager.sol";
import "./FullMath.sol";

contract GempadLock is
    IGempadLock,
    IERC721Receiver,
    Initializable,
    OwnableUpgradeable
{
    using Address for address payable;
    using EnumerableSet for EnumerableSet.AddressSet;
    using EnumerableSet for EnumerableSet.UintSet;
    using SafeERC20 for IERC20;

    struct Fee {
        uint256 projectCreationFee;
        uint256 lpTokenNormalLockFee;
        uint256 lpTokenVestingLockFee;
        uint256 normalTokenNormalLockFee;
        uint256 normalTokenVestingLockFee;
    }

    struct Project {
        address owner;
        string metaData;
        EnumerableSet.AddressSet lpLockedTokens; //V3 pool addresses
    }

    struct Lock {
        uint256 id;
        address token; //if LP v3, it is a pool address
        address owner;
        uint256 amount;
        uint40 lockDate;
        uint40 tgeDate; // TGE date for vesting locks, unlock date for normal locks
        uint24 tgeBps; // In bips. Is 0 for normal locks
        uint40 cycle; // Is 0 for normal locks
        uint24 cycleBps; // In bips. Is 0 for normal locks
        uint256 unlockedAmount;
        string description;
        address nftManager;
        uint256 nftId;
    }

    struct CumulativeLockInfo {
        address projectToken;
        address factory;
        uint256 amount;
    }

    Fee public fee;
    Lock[] private _locks;
    mapping(address => EnumerableSet.UintSet) private _userLpLockIds;
    mapping(address => EnumerableSet.UintSet) private _userNormalLockIds;

    EnumerableSet.AddressSet private _lpLockedTokens; //if v3, pool addresses
    EnumerableSet.AddressSet private _normalLockedTokens;

    mapping(address => CumulativeLockInfo) public cumulativeLockInfo;
    mapping(address => EnumerableSet.UintSet) private _tokenToLockIds;
    mapping(address => bool) public isExcludedFromFee;
    mapping(address => Project) private projects;
    mapping(address => bool) public isAvailableNFT;
    
    event LockAdded(
        uint256 indexed id,
        Lock lock,
        CumulativeLockInfo cumulativeLockInfo,
        address owner,
        string metaData,
        address referrer,
        address locker
    );
    event LockRemoved(
        uint256 indexed id,
        Lock lock,
        uint256 amount,
        uint256 unlockedAt
    );

    event LockUpdated(uint256 indexed id, Lock lock);

    event LockVested(
        uint256 indexed id,
        Lock lock,
        uint256 amount,
        uint256 timestamp
    );
    event LockDescriptionChanged(uint256 lockId, string description);
    event LockOwnerChanged(uint256 lockId, address owner, address newOwner);
    event LockProjectTokenMetaDataChanged(address token, string metaData);
    event ProjectOwnerChanged(address token, address owner, address newOwner);
    event FeeUpdated(Fee fee);
    event FeeExcluded(address account);
    event NFTAvailableUpdated(address nft, bool isAvailable);
    function initialize() public initializer {
        __Ownable_init(msg.sender);
    }

    modifier validLock(uint256 lockId) {
        require(lockId < _locks.length, "Invalid lock ID");
        _;
    }

    modifier validNFT(address nft) {
        require(isAvailableNFT[nft], "Invalid NFT");
        _;
    }

    modifier isLockOwner(uint256 lockId) {
        Lock storage userLock = _locks[lockId];
        require(userLock.owner == msg.sender, "You are not the owner of this lock");
        _;
    }

    modifier validLockLPv3(uint256 lockId) {
        Lock storage userLock = _locks[lockId];
        require(userLock.nftManager != address(0), "No V3 LP lock");
        _;
    }

    function updateAvailabilityForNFT(address nft, bool isAvailable) external onlyOwner {
        require(isAvailableNFT[nft] != isAvailable, "the same");
        isAvailableNFT[nft] = isAvailable;
        emit NFTAvailableUpdated(nft, isAvailable);
    }

    function updateFee(
        uint256 projectCreationFee,
        uint256 lpTokenNormalLockFee,
        uint256 lpTokenVestingLockFee,
        uint256 normalTokenNormalLockFee,
        uint256 normalTokenVestingLockFee
    ) external onlyOwner {
        fee = Fee({
            projectCreationFee: projectCreationFee,
            lpTokenNormalLockFee: lpTokenNormalLockFee,
            lpTokenVestingLockFee: lpTokenVestingLockFee,
            normalTokenNormalLockFee: normalTokenNormalLockFee,
            normalTokenVestingLockFee: normalTokenVestingLockFee
        });
        emit FeeUpdated(fee);
    }

    function excludeFromFee(
        address account,
        bool isExcluded
    ) external onlyOwner {
        require(isExcludedFromFee[account] != isExcluded, "the same");
        isExcludedFromFee[account] = isExcluded;
        emit FeeExcluded(account);
    }

    function _payFee(
        address projectToken,
        bool isVesting,
        bool isLpToken
    ) internal {
        if (!isExcludedFromFee[_msgSender()]) {
            uint256 _fee = isLpToken
                ? isVesting
                    ? fee.lpTokenVestingLockFee
                    : fee.lpTokenNormalLockFee
                : isVesting
                ? fee.normalTokenVestingLockFee
                : fee.normalTokenNormalLockFee;
            if (projects[projectToken].owner == address(0)) {
                _fee += fee.projectCreationFee;
            }
            require(msg.value >= _fee, "Not enough funds for fees");
            (bool sent, ) = payable(owner()).call{value: _fee}("");
            require(sent, "Failed to charge fee");
        }
    }

    function multipleLock(
        address[] calldata owners,
        address token,
        bool isLpToken,
        uint256[] calldata amounts,
        uint40 unlockDate,
        string memory description,
        string memory metaData,
        address projectToken,
        address referrer
    ) external payable override returns (uint256[] memory) {
        _payFee(projectToken, false, isLpToken);       
        return
            _multipleLock(
                owners,
                amounts,
                token,
                isLpToken,
                [unlockDate, 0, 0, 0],
                description,
                metaData,
                projectToken,
                referrer
            );
    }

    function multipleVestingLock(
        address[] calldata owners,
        uint256[] calldata amounts,
        address token,
        bool isLpToken,
        uint40 tgeDate,
        uint24 tgeBps,
        uint40 cycle,
        uint24 cycleBps,
        string memory description,
        string memory metaData,
        address projectToken,
        address referrer
    ) external payable override returns (uint256[] memory) {
        _payFee(projectToken, true, isLpToken);
        {
            require(cycle > 0, "Invalid cycle");
            require(tgeBps > 0 && tgeBps < 1000000, "Invalid bips for TGE");
            require(
                cycleBps > 0 && cycleBps < 1000000,
                "Invalid bips for cycle"
            );
            require(
                tgeBps + cycleBps <= 1000000,
                "Sum of TGE bps and cycle should be less than 10000"
            );
        }
        return
            _multipleLock(
                owners,
                amounts,
                token,
                isLpToken,
                [tgeDate, tgeBps, cycle, cycleBps],
                description,
                metaData,
                projectToken,
                referrer
            );
    }

    function lockLpV3(
        address _owner,
        address nftManager,
        uint256 nftId,
        uint40 unlockDate,
        string memory description,
        string memory metaData,
        address projectToken,
        address referrer
    ) external payable override validNFT(nftManager) returns (uint256 id) {
        _payFee(projectToken, false, true);
        {            
            require(nftManager != address(0), "Invalid V3 LP manager");
            require(
                unlockDate > block.timestamp,
                "Unlock date should be in the future"
            );
        }

        (
            ,
            ,
            address token0,
            address token1,
            uint24 fee_,
            ,
            ,
            uint128 liquidity,
            ,
            ,
            ,

        ) = INonfungiblePositionManager(nftManager).positions(nftId);
        require(
            projectToken == token0 || projectToken == token1,
            "Invalid project token"
        );
        address factory = INonfungiblePositionManager(nftManager).factory();
        address token = IUniswapV3Factory(factory).getPool(
            token0,
            token1,
            fee_
        );
        require(factory != address(0) && token != address(0), "Invalid V3 LP");
        id = _locks.length;
        Lock memory newLock = Lock({
            id: id,
            token: token,
            owner: _owner,
            amount: liquidity,
            lockDate: uint40(block.timestamp),
            tgeDate: unlockDate,
            tgeBps: 0,
            cycle: 0,
            cycleBps: 0,
            unlockedAmount: 0,
            description: description,
            nftManager: nftManager,
            nftId: nftId
        });
        _locks.push(newLock);
        _userLpLockIds[_owner].add(id);
        _lpLockedTokens.add(token);

        CumulativeLockInfo storage tokenInfo = cumulativeLockInfo[token];
        if (tokenInfo.projectToken == address(0)) {
            tokenInfo.projectToken = projectToken;
            tokenInfo.factory = factory;
        } else {
            projectToken = tokenInfo.projectToken;
        }
        tokenInfo.amount = tokenInfo.amount + liquidity;

        _tokenToLockIds[token].add(id);
        Project storage project = projects[projectToken];
        if (project.owner == address(0)) {
            project.owner = msg.sender;
            project.metaData = metaData;
        }
        project.lpLockedTokens.add(token);

        INonfungiblePositionManager(nftManager).safeTransferFrom(
            msg.sender,
            address(this),
            nftId
        );

        emit LockAdded(
            id,
            _locks[id],
            tokenInfo,
            projects[projectToken].owner,
            projects[projectToken].metaData,
            referrer,
            msg.sender
        );
        return id;
    }

    function _multipleLock(
        address[] calldata owners,
        uint256[] calldata amounts,
        address token,
        bool isLpToken,
        uint40[4] memory vestingSettings, // avoid stack too deep
        string memory description,
        string memory metaData,
        address projectToken,
        address referrer
    ) internal returns (uint256[] memory) {
        {
            require(owners.length == amounts.length, "Length mismatch");
            require(
                vestingSettings[0] > block.timestamp,
                "TGE date should be set in the future"
            );
            require(token != address(0), "Invalid token");
        }
        {
            uint256 sumAmount = _sumAmount(amounts);
            _safeTransferFromEnsureExactAmount(
                token,
                msg.sender,
                address(this),
                sumAmount
            );
        }
        uint256 count = owners.length;
        uint256[] memory ids = new uint256[](count);
        for (uint256 i = 0; i < count; i++) {
            ids[i] = _createLock(
                owners[i],
                token,
                isLpToken,
                amounts[i],
                vestingSettings[0], // TGE date
                uint24(vestingSettings[1]), // TGE bps
                vestingSettings[2], // cycle
                uint24(vestingSettings[3]), // cycle bps
                description,
                metaData,
                projectToken
            );
            emit LockAdded(
                ids[i],
                _locks[ids[i]],
                cumulativeLockInfo[token],
                projects[projectToken].owner,
                projects[projectToken].metaData,
                referrer,
                msg.sender
            );
        }

        return ids;
    }

    function _sumAmount(
        uint256[] calldata amounts
    ) internal pure returns (uint256) {
        uint256 sum = 0;
        for (uint256 i = 0; i < amounts.length; i++) {
            if (amounts[i] == 0) {
                revert("The amount cannot be zero");
            }
            sum += amounts[i];
        }
        return sum;
    }

    function _createLock(
        address owner,
        address token,
        bool isLpToken,
        uint256 amount,
        uint40 tgeDate,
        uint24 tgeBps,
        uint40 cycle,
        uint24 cycleBps,
        string memory description,
        string memory metaData,
        address projectToken
    ) internal returns (uint256 id) {
        if (isLpToken) {
            address possibleFactoryAddress = _parseFactoryAddress(
                token,
                projectToken
            );
            id = _lockLpToken(
                owner,
                token,
                possibleFactoryAddress,
                amount,
                tgeDate,
                tgeBps,
                cycle,
                cycleBps,
                description,
                metaData,
                projectToken
            );
        } else {
            require(
                token == projectToken,
                "This token is not the project token"
            );
            id = _lockNormalToken(
                owner,
                token,
                amount,
                tgeDate,
                tgeBps,
                cycle,
                cycleBps,
                description,
                metaData
            );
        }
        return id;
    }

    function _lockLpToken(
        address owner,
        address token,
        address factory,
        uint256 amount,
        uint40 tgeDate,
        uint24 tgeBps,
        uint40 cycle,
        uint24 cycleBps,
        string memory description,
        string memory metaData,
        address projectToken
    ) private returns (uint256 id) {
        id = _registerLock(
            owner,
            token,
            amount,
            tgeDate,
            tgeBps,
            cycle,
            cycleBps,
            description
        );
        _userLpLockIds[owner].add(id);
        _lpLockedTokens.add(token);

        CumulativeLockInfo storage tokenInfo = cumulativeLockInfo[token];
        if (tokenInfo.projectToken == address(0)) {
            tokenInfo.projectToken = projectToken;
            tokenInfo.factory = factory;
        } else {
            projectToken = tokenInfo.projectToken;
        }
        tokenInfo.amount = tokenInfo.amount + amount;
        _tokenToLockIds[token].add(id);
        Project storage project = projects[projectToken];
        if (project.owner == address(0)) {
            project.owner = msg.sender;
            project.metaData = metaData;
        }
        project.lpLockedTokens.add(token);
    }

    function _lockNormalToken(
        address owner,
        address token,
        uint256 amount,
        uint40 tgeDate,
        uint24 tgeBps,
        uint40 cycle,
        uint24 cycleBps,
        string memory description,
        string memory metaData
    ) private returns (uint256 id) {
        id = _registerLock(
            owner,
            token,
            amount,
            tgeDate,
            tgeBps,
            cycle,
            cycleBps,
            description
        );
        _userNormalLockIds[owner].add(id);
        _normalLockedTokens.add(token);

        CumulativeLockInfo storage tokenInfo = cumulativeLockInfo[token];
        if (tokenInfo.projectToken == address(0)) {
            tokenInfo.projectToken = token;
            tokenInfo.factory = address(0);
        }
        tokenInfo.amount = tokenInfo.amount + amount;

        _tokenToLockIds[token].add(id);

        Project storage project = projects[token];
        if (project.owner == address(0)) {
            project.owner = msg.sender;
            project.metaData = metaData;
        }
    }

    function _registerLock(
        address owner,
        address token,
        uint256 amount,
        uint40 tgeDate,
        uint24 tgeBps,
        uint40 cycle,
        uint24 cycleBps,
        string memory description
    ) private returns (uint256 id) {
        id = _locks.length;
        Lock memory newLock = Lock({
            id: id,
            token: token,
            owner: owner,
            amount: amount,
            lockDate: uint40(block.timestamp),
            tgeDate: tgeDate,
            tgeBps: tgeBps,
            cycle: cycle,
            cycleBps: cycleBps,
            unlockedAmount: 0,
            description: description,
            nftManager: address(0),
            nftId: 0
        });
        _locks.push(newLock);
    }

    function unlock(uint256 lockId) external override validLock(lockId) isLockOwner(lockId) {
        Lock storage userLock = _locks[lockId];
       
        if (userLock.tgeBps > 0) {
            _vestingUnlock(userLock, false);
        } else {
            _normalUnlock(userLock, false);
        }
    }

    function unlockAllAvailable() external {
        uint256 length = _userLpLockIds[msg.sender].length();
        for (uint256 i = 0; i < length; i++) {
            Lock storage userLock = _locks[_userLpLockIds[msg.sender].at(i)];
            if (userLock.tgeBps > 0) {
                _vestingUnlock(userLock, true);
            } else {
                _normalUnlock(userLock, true);
            }
        }
        length = _userNormalLockIds[msg.sender].length();
        for (uint256 i = 0; i < length; i++) {
            Lock storage userLock = _locks[
                _userNormalLockIds[msg.sender].at(i)
            ];
            if (userLock.tgeBps > 0) {
                _vestingUnlock(userLock, true);
            } else {
                _normalUnlock(userLock, true);
            }
        }
    }

    function _normalUnlock(Lock storage userLock, bool _noRevert) internal {
        if (_noRevert) {
            if (!(block.timestamp >= userLock.tgeDate)) return;
            if (!(userLock.unlockedAmount == 0)) return;
        } else {
            require(
                block.timestamp >= userLock.tgeDate,
                "The lock is not unlocked yet"
            );
            require(userLock.unlockedAmount == 0, "Nothing to unlock");
        }
        uint256 unlockAmount = userLock.amount;
        CumulativeLockInfo storage tokenInfo = cumulativeLockInfo[
            userLock.token
        ];
        bool isLpToken = tokenInfo.factory != address(0);
        if (isLpToken) {
            _userLpLockIds[msg.sender].remove(userLock.id);
        } else {
            _userNormalLockIds[msg.sender].remove(userLock.id);
        }
        if (tokenInfo.amount <= unlockAmount) {
            tokenInfo.amount = 0;
        } else {
            tokenInfo.amount = tokenInfo.amount - unlockAmount;
        }
        if (tokenInfo.amount == 0) {
            if (isLpToken) {
                _lpLockedTokens.remove(userLock.token);
                projects[tokenInfo.projectToken].lpLockedTokens.remove(
                    userLock.token
                );
            } else {
                _normalLockedTokens.remove(userLock.token);
            }
        }
        _tokenToLockIds[userLock.token].remove(userLock.id);
        userLock.unlockedAmount = unlockAmount;
        if (userLock.nftManager != address(0)) {
            INonfungiblePositionManager(userLock.nftManager).safeTransferFrom(
                address(this),
                msg.sender,
                userLock.nftId
            );
        } else {
            IERC20(userLock.token).safeTransfer(msg.sender, unlockAmount);
        }
        

        emit LockRemoved(userLock.id, userLock, unlockAmount, block.timestamp);
    }

    function _vestingUnlock(Lock storage userLock, bool _noRevert) internal {
        uint256 withdrawable = _withdrawableTokens(userLock);
        uint256 newTotalUnlockAmount = userLock.unlockedAmount + withdrawable;
        if (_noRevert) {
            if (!(withdrawable > 0 && newTotalUnlockAmount <= userLock.amount))
                return;
        } else
            require(
                withdrawable > 0 && newTotalUnlockAmount <= userLock.amount,
                "Nothing to unlock"
            );

        CumulativeLockInfo storage tokenInfo = cumulativeLockInfo[
            userLock.token
        ];
        bool isLpToken = tokenInfo.factory != address(0);

        if (tokenInfo.amount <= withdrawable) {
            tokenInfo.amount = 0;
        } else {
            tokenInfo.amount = tokenInfo.amount - withdrawable;
        }

        if (tokenInfo.amount == 0) {
            if (isLpToken) {
                _lpLockedTokens.remove(userLock.token);
                projects[tokenInfo.projectToken].lpLockedTokens.remove(
                    userLock.token
                );
            } else {
                _normalLockedTokens.remove(userLock.token);
            }
        }
        userLock.unlockedAmount = newTotalUnlockAmount;

        IERC20(userLock.token).safeTransfer(userLock.owner, withdrawable);
        emit LockVested(userLock.id, userLock, withdrawable, block.timestamp);
        if (newTotalUnlockAmount == userLock.amount) {
            if (isLpToken) {
                _userLpLockIds[msg.sender].remove(userLock.id);
            } else {
                _userNormalLockIds[msg.sender].remove(userLock.id);
            }
            _tokenToLockIds[userLock.token].remove(userLock.id);
            emit LockRemoved(
                userLock.id,
                userLock,
                newTotalUnlockAmount,
                block.timestamp
            );
        }
    }

    function withdrawableTokens(
        uint256 lockId
    ) external view returns (uint256) {
        Lock memory userLock = getLockAt(lockId);
        return _withdrawableTokens(userLock);
    }

    function _withdrawableTokens(
        Lock memory userLock
    ) internal view returns (uint256) {
        if (userLock.amount == 0) return 0;
        if (userLock.unlockedAmount >= userLock.amount) return 0;
        if (block.timestamp < userLock.tgeDate) return 0;
        if (userLock.cycle == 0) return 0;

        uint256 tgeReleaseAmount = FullMath.mulDiv(
            userLock.amount,
            userLock.tgeBps,
            1000000
        );
        uint256 cycleReleaseAmount = FullMath.mulDiv(
            userLock.amount,
            userLock.cycleBps,
            1000000
        );
        uint256 currentTotal = 0;
        currentTotal =
            (((block.timestamp - userLock.tgeDate) / userLock.cycle) *
                cycleReleaseAmount) +
            tgeReleaseAmount; // Truncation is expected here
        
        uint256 withdrawable = 0;
        if (currentTotal > userLock.amount) {
            withdrawable = userLock.amount - userLock.unlockedAmount;
        } else {
            withdrawable = currentTotal - userLock.unlockedAmount;
        }
        return withdrawable;
    }

    function editLock(
        uint256 lockId,
        uint256 additionalAmount,
        uint40 newUnlockDate
    ) external override validLock(lockId) isLockOwner(lockId) {
        Lock storage userLock = _locks[lockId];
        require(userLock.unlockedAmount == 0, "Lock was unlocked");

        if (newUnlockDate > 0) {
            require(
                newUnlockDate >= userLock.tgeDate &&
                    newUnlockDate > block.timestamp,
                "New unlock time needs to be after current and old lock time"
            );
            userLock.tgeDate = newUnlockDate;
        }
        if (userLock.nftManager == address(0)) {
            if (additionalAmount > 0) {
                userLock.amount += additionalAmount;
                CumulativeLockInfo storage tokenInfo = cumulativeLockInfo[
                    userLock.token
                ];
                tokenInfo.amount = tokenInfo.amount + additionalAmount;
                _safeTransferFromEnsureExactAmount(
                    userLock.token,
                    msg.sender,
                    address(this),
                    additionalAmount
                );
            }
        }

        emit LockUpdated(userLock.id, userLock);
    }

    function increaseLiquidityCurrentRange(
        uint256 lockId,
        uint256 amount0ToAdd,
        uint256 amount1ToAdd
    ) external validLock(lockId) isLockOwner(lockId) validLockLPv3(lockId) returns (uint128 liquidity, uint256 amount0, uint256 amount1) {
        Lock storage userLock = _locks[lockId];
        require(userLock.unlockedAmount == 0, "Lock was unlocked");
        (
            ,
            ,
            address token0,
            address token1,
            ,
            ,
            ,
            ,
            ,
            ,
            ,

        ) = INonfungiblePositionManager(userLock.nftManager).positions(
                userLock.nftId
            );
        _safeTransferFromEnsureExactAmount(
            token0,
            msg.sender,
            address(this),
            amount0ToAdd
        );
        _safeTransferFromEnsureExactAmount(
            token1,
            msg.sender,
            address(this),
            amount1ToAdd
        );

        IERC20(token0).forceApprove(address(userLock.nftManager), amount0ToAdd);
        IERC20(token1).forceApprove(address(userLock.nftManager), amount1ToAdd);

        INonfungiblePositionManager.IncreaseLiquidityParams
            memory params = INonfungiblePositionManager
                .IncreaseLiquidityParams({
                    tokenId: userLock.nftId,
                    amount0Desired: amount0ToAdd,
                    amount1Desired: amount1ToAdd,
                    amount0Min: 0,
                    amount1Min: 0,
                    deadline: block.timestamp
                });

        (liquidity, amount0, amount1) = INonfungiblePositionManager(
            userLock.nftManager
        ).increaseLiquidity(params);
        CumulativeLockInfo storage tokenInfo = cumulativeLockInfo[
            userLock.token
        ];
        tokenInfo.amount += liquidity;
        userLock.amount += liquidity;
        emit LockUpdated(userLock.id, userLock);
    }

    function decreaseLiquidityCurrentRange(
        uint256 lockId,
        uint128 liquidity
    ) external validLock(lockId) isLockOwner(lockId) validLockLPv3(lockId) returns (uint256 amount0, uint256 amount1) {
        Lock storage userLock = _locks[lockId];
        require(block.timestamp >= userLock.tgeDate, "Not unlocked yet");
        require(userLock.amount >= liquidity, "More then Locked");
        require(userLock.unlockedAmount == 0, "Lock was unlocked");
        (
            ,
            ,
            address token0,
            address token1,
            ,
            ,
            ,
            ,
            ,
            ,
            ,

        ) = INonfungiblePositionManager(userLock.nftManager).positions(
                userLock.nftId
            );
        INonfungiblePositionManager.DecreaseLiquidityParams
            memory params = INonfungiblePositionManager
                .DecreaseLiquidityParams({
                    tokenId: userLock.nftId,
                    liquidity: liquidity,
                    amount0Min: 0,
                    amount1Min: 0,
                    deadline: block.timestamp
                });
        uint256 originalAmount0 = IERC20(token0).balanceOf(address(this));
        uint256 originalAmount1 = IERC20(token1).balanceOf(address(this));
        INonfungiblePositionManager(userLock.nftManager).decreaseLiquidity(
            params
        );
        amount0 = IERC20(token0).balanceOf(address(this)) - originalAmount0;
        amount1 = IERC20(token1).balanceOf(address(this)) - originalAmount1;
        IERC20(token0).safeTransfer(msg.sender, amount0);
        IERC20(token1).safeTransfer(msg.sender, amount1);
        CumulativeLockInfo storage tokenInfo = cumulativeLockInfo[
            userLock.token
        ];
        if (tokenInfo.amount > liquidity) {
            tokenInfo.amount -= liquidity;
        } else {
            tokenInfo.amount = 0;
            _lpLockedTokens.remove(userLock.token);
            projects[tokenInfo.projectToken].lpLockedTokens.remove(
                userLock.token
            );
        }
        userLock.amount -= liquidity;
        emit LockUpdated(userLock.id, userLock);
    }

    function collectFees(
        uint256 lockId
    ) external isLockOwner(lockId) validLockLPv3(lockId) returns (uint256 amount0, uint256 amount1) {
        Lock storage userLock = _locks[lockId];
        // set amount0Max and amount1Max to uint256.max to collect all fees
        // alternatively can set recipient to msg.sender and avoid another transaction in `sendToOwner`
        INonfungiblePositionManager.CollectParams
            memory params = INonfungiblePositionManager.CollectParams({
                tokenId: userLock.nftId,
                recipient: address(this),
                amount0Max: type(uint128).max,
                amount1Max: type(uint128).max
            });
        // send collected feed back to owner
        (
            ,
            ,
            address token0,
            address token1,
            ,
            ,
            ,
            ,
            ,
            ,
            ,

        ) = INonfungiblePositionManager(userLock.nftManager).positions(
                userLock.nftId
            );
        uint256 originalAmount0 = IERC20(token0).balanceOf(address(this));
        uint256 originalAmount1 = IERC20(token1).balanceOf(address(this));
        INonfungiblePositionManager(userLock.nftManager).collect(params);
        amount0 = IERC20(token0).balanceOf(address(this)) - originalAmount0;
        amount1 = IERC20(token1).balanceOf(address(this)) - originalAmount1;
        IERC20(token0).safeTransfer(userLock.owner, amount0);
        IERC20(token1).safeTransfer(userLock.owner, amount1);
    }

    function editLockDescription(
        uint256 lockId,
        string memory description
    ) external validLock(lockId) isLockOwner(lockId) {
        Lock storage userLock = _locks[lockId];
        userLock.description = description;
        emit LockDescriptionChanged(lockId, description);
    }

    function editProjectTokenMetaData(
        address token,
        string memory metaData
    ) external {
        require(
            projects[token].owner == msg.sender,
            "You are not the owner of this project"
        );
        projects[token].metaData = metaData;
        emit LockProjectTokenMetaDataChanged(token, metaData);
    }

    function transferProjectOwnerShip(address token, address newOwner) public {
        require(
            projects[token].owner == msg.sender,
            "You are not the owner of this project"
        );
        projects[token].owner = newOwner;
        emit ProjectOwnerChanged(token, msg.sender, newOwner);
    }

    function transferLockOwnership(
        uint256 lockId,
        address newOwner
    ) public validLock(lockId) isLockOwner(lockId) {
        Lock storage userLock = _locks[lockId];
        address currentOwner = userLock.owner;
        
        userLock.owner = newOwner;
        CumulativeLockInfo storage tokenInfo = cumulativeLockInfo[
            userLock.token
        ];

        bool isLpToken = tokenInfo.factory != address(0);

        if (isLpToken) {
            _userLpLockIds[currentOwner].remove(lockId);
            _userLpLockIds[newOwner].add(lockId);
        } else {
            _userNormalLockIds[currentOwner].remove(lockId);
            _userNormalLockIds[newOwner].add(lockId);
        }

        emit LockOwnerChanged(lockId, currentOwner, newOwner);
    }

    function _safeTransferFromEnsureExactAmount(
        address token,
        address sender,
        address recipient,
        uint256 amount
    ) internal {
        uint256 oldRecipientBalance = IERC20(token).balanceOf(recipient);
        IERC20(token).safeTransferFrom(sender, recipient, amount);
        uint256 newRecipientBalance = IERC20(token).balanceOf(recipient);
        require(
            newRecipientBalance - oldRecipientBalance == amount,
            "Not enough token transferred"
        );
    }

    function getTotalLockCount() external view returns (uint256) {
        // Returns total lock count, regardless of whether it has been unlocked or not
        return _locks.length;
    }

    function getLockAt(uint256 index) public view returns (Lock memory) {
        return _locks[index];
    }

    function allLpTokenLockedCount() public view returns (uint256) {
        return _lpLockedTokens.length();
    }

    function allNormalTokenLockedCount() public view returns (uint256) {
        return _normalLockedTokens.length();
    }

    function getCumulativeLpTokenLockInfoAt(
        uint256 index
    ) external view returns (CumulativeLockInfo memory) {
        return cumulativeLockInfo[_lpLockedTokens.at(index)];
    }

    function getCumulativeNormalTokenLockInfoAt(
        uint256 index
    ) external view returns (CumulativeLockInfo memory) {
        return cumulativeLockInfo[_normalLockedTokens.at(index)];
    }

    function lpLockCountForUser(address user) public view returns (uint256) {
        return _userLpLockIds[user].length();
    }

    function lpLockForUserAtIndex(
        address user,
        uint256 index
    ) external view returns (Lock memory) {
        require(lpLockCountForUser(user) > index, "Invalid index");
        return getLockAt(_userLpLockIds[user].at(index));
    }

    function normalLockCountForUser(
        address user
    ) public view returns (uint256) {
        return _userNormalLockIds[user].length();
    }

    function normalLockForUserAtIndex(
        address user,
        uint256 index
    ) external view returns (Lock memory) {
        require(normalLockCountForUser(user) > index, "Invalid index");
        return getLockAt(_userNormalLockIds[user].at(index));
    }

    function totalLockCountForToken(
        address token
    ) external view returns (uint256) {
        return _tokenToLockIds[token].length();
    }

    function getLocksForToken(
        address token,
        uint256 start,
        uint256 end
    ) public view returns (Lock[] memory) {
        if (end >= _tokenToLockIds[token].length()) {
            end = _tokenToLockIds[token].length() - 1;
        }
        uint256 length = end - start + 1;
        Lock[] memory locks = new Lock[](length);
        uint256 currentIndex = 0;
        for (uint256 i = start; i <= end; i++) {
            locks[currentIndex] = getLockAt(_tokenToLockIds[token].at(i));
            currentIndex++;
        }
        return locks;
    }

    function _parseFactoryAddress(
        address token,
        address projectToken
    ) internal view returns (address) {
        address possibleFactoryAddress = address(0);
        try IUniswapV2Pair(token).factory() returns (address factory) {
            possibleFactoryAddress = factory;
        } catch {
            revert("This is not a LP token");
        }
        require(
            possibleFactoryAddress != address(0) &&
                _isValidLpToken(token, possibleFactoryAddress, projectToken),
            "This is not a LP token."
        );
        return possibleFactoryAddress;
    }

    function _isValidLpToken(
        address token,
        address factory,
        address projectToken
    ) private view returns (bool) {
        IUniswapV2Pair pair = IUniswapV2Pair(token);
        if (projectToken != pair.token0() && projectToken != pair.token1())
            return false;
        address factoryPair = IUniswapV2Factory(factory).getPair(
            pair.token0(),
            pair.token1()
        );
        return factoryPair == token;
    }

    function getProject(
        address projectToken
    )
        external
        view
        returns (
            address owner,
            string memory metaData,
            address[] memory lpLockedTokens
        )
    {
        Project storage project = projects[projectToken];
        owner = project.owner;
        metaData = project.metaData;
        lpLockedTokens = project.lpLockedTokens.values();
    }

    function onERC721Received(
        address,
        address,
        uint256,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC721Received.selector;
    }
}

File 2 of 30 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is set to the address provided by the deployer. This can
 * later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
    /// @custom:storage-location erc7201:openzeppelin.storage.Ownable
    struct OwnableStorage {
        address _owner;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;

    function _getOwnableStorage() private pure returns (OwnableStorage storage $) {
        assembly {
            $.slot := OwnableStorageLocation
        }
    }

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    function __Ownable_init(address initialOwner) internal onlyInitializing {
        __Ownable_init_unchained(initialOwner);
    }

    function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        OwnableStorage storage $ = _getOwnableStorage();
        address oldOwner = $._owner;
        $._owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 30 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.20;

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```solidity
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 *
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Storage of the initializable contract.
     *
     * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions
     * when using with upgradeable contracts.
     *
     * @custom:storage-location erc7201:openzeppelin.storage.Initializable
     */
    struct InitializableStorage {
        /**
         * @dev Indicates that the contract has been initialized.
         */
        uint64 _initialized;
        /**
         * @dev Indicates that the contract is in the process of being initialized.
         */
        bool _initializing;
    }

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;

    /**
     * @dev The contract is already initialized.
     */
    error InvalidInitialization();

    /**
     * @dev The contract is not initializing.
     */
    error NotInitializing();

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint64 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts.
     *
     * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any
     * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in
     * production.
     *
     * Emits an {Initialized} event.
     */
    modifier initializer() {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        // Cache values to avoid duplicated sloads
        bool isTopLevelCall = !$._initializing;
        uint64 initialized = $._initialized;

        // Allowed calls:
        // - initialSetup: the contract is not in the initializing state and no previous version was
        //                 initialized
        // - construction: the contract is initialized at version 1 (no reininitialization) and the
        //                 current contract is just being deployed
        bool initialSetup = initialized == 0 && isTopLevelCall;
        bool construction = initialized == 1 && address(this).code.length == 0;

        if (!initialSetup && !construction) {
            revert InvalidInitialization();
        }
        $._initialized = 1;
        if (isTopLevelCall) {
            $._initializing = true;
        }
        _;
        if (isTopLevelCall) {
            $._initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * A reinitializer may be used after the original initialization step. This is essential to configure modules that
     * are added through upgrades and that require initialization.
     *
     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
     * cannot be nested. If one is invoked in the context of another, execution will revert.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     *
     * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.
     *
     * Emits an {Initialized} event.
     */
    modifier reinitializer(uint64 version) {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        if ($._initializing || $._initialized >= version) {
            revert InvalidInitialization();
        }
        $._initialized = version;
        $._initializing = true;
        _;
        $._initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        _checkInitializing();
        _;
    }

    /**
     * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.
     */
    function _checkInitializing() internal view virtual {
        if (!_isInitializing()) {
            revert NotInitializing();
        }
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     *
     * Emits an {Initialized} event the first time it is successfully executed.
     */
    function _disableInitializers() internal virtual {
        // solhint-disable-next-line var-name-mixedcase
        InitializableStorage storage $ = _getInitializableStorage();

        if ($._initializing) {
            revert InvalidInitialization();
        }
        if ($._initialized != type(uint64).max) {
            $._initialized = type(uint64).max;
            emit Initialized(type(uint64).max);
        }
    }

    /**
     * @dev Returns the highest version that has been initialized. See {reinitializer}.
     */
    function _getInitializedVersion() internal view returns (uint64) {
        return _getInitializableStorage()._initialized;
    }

    /**
     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
     */
    function _isInitializing() internal view returns (bool) {
        return _getInitializableStorage()._initializing;
    }

    /**
     * @dev Returns a pointer to the storage namespace.
     */
    // solhint-disable-next-line var-name-mixedcase
    function _getInitializableStorage() private pure returns (InitializableStorage storage $) {
        assembly {
            $.slot := INITIALIZABLE_STORAGE
        }
    }
}

File 4 of 30 : UUPSUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/UUPSUpgradeable.sol)

pragma solidity ^0.8.20;

import {IERC1822Proxiable} from "@openzeppelin/contracts/interfaces/draft-IERC1822.sol";
import {ERC1967Utils} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol";
import {Initializable} from "./Initializable.sol";

/**
 * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an
 * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.
 *
 * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is
 * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing
 * `UUPSUpgradeable` with a custom implementation of upgrades.
 *
 * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.
 */
abstract contract UUPSUpgradeable is Initializable, IERC1822Proxiable {
    /// @custom:oz-upgrades-unsafe-allow state-variable-immutable
    address private immutable __self = address(this);

    /**
     * @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgradeTo(address)`
     * and `upgradeToAndCall(address,bytes)` are present, and `upgradeTo` must be used if no function should be called,
     * while `upgradeToAndCall` will invoke the `receive` function if the second argument is the empty byte string.
     * If the getter returns `"5.0.0"`, only `upgradeToAndCall(address,bytes)` is present, and the second argument must
     * be the empty byte string if no function should be called, making it impossible to invoke the `receive` function
     * during an upgrade.
     */
    string public constant UPGRADE_INTERFACE_VERSION = "5.0.0";

    /**
     * @dev The call is from an unauthorized context.
     */
    error UUPSUnauthorizedCallContext();

    /**
     * @dev The storage `slot` is unsupported as a UUID.
     */
    error UUPSUnsupportedProxiableUUID(bytes32 slot);

    /**
     * @dev Check that the execution is being performed through a delegatecall call and that the execution context is
     * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case
     * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a
     * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to
     * fail.
     */
    modifier onlyProxy() {
        _checkProxy();
        _;
    }

    /**
     * @dev Check that the execution is not being performed through a delegate call. This allows a function to be
     * callable on the implementing contract but not through proxies.
     */
    modifier notDelegated() {
        _checkNotDelegated();
        _;
    }

    function __UUPSUpgradeable_init() internal onlyInitializing {
    }

    function __UUPSUpgradeable_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the
     * implementation. It is used to validate the implementation's compatibility when performing an upgrade.
     *
     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
     * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.
     */
    function proxiableUUID() external view virtual notDelegated returns (bytes32) {
        return ERC1967Utils.IMPLEMENTATION_SLOT;
    }

    /**
     * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call
     * encoded in `data`.
     *
     * Calls {_authorizeUpgrade}.
     *
     * Emits an {Upgraded} event.
     *
     * @custom:oz-upgrades-unsafe-allow-reachable delegatecall
     */
    function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy {
        _authorizeUpgrade(newImplementation);
        _upgradeToAndCallUUPS(newImplementation, data);
    }

    /**
     * @dev Reverts if the execution is not performed via delegatecall or the execution
     * context is not of a proxy with an ERC1967-compliant implementation pointing to self.
     * See {_onlyProxy}.
     */
    function _checkProxy() internal view virtual {
        if (
            address(this) == __self || // Must be called through delegatecall
            ERC1967Utils.getImplementation() != __self // Must be called through an active proxy
        ) {
            revert UUPSUnauthorizedCallContext();
        }
    }

    /**
     * @dev Reverts if the execution is performed via delegatecall.
     * See {notDelegated}.
     */
    function _checkNotDelegated() internal view virtual {
        if (address(this) != __self) {
            // Must not be called through delegatecall
            revert UUPSUnauthorizedCallContext();
        }
    }

    /**
     * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by
     * {upgradeToAndCall}.
     *
     * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.
     *
     * ```solidity
     * function _authorizeUpgrade(address) internal onlyOwner {}
     * ```
     */
    function _authorizeUpgrade(address newImplementation) internal virtual;

    /**
     * @dev Performs an implementation upgrade with a security check for UUPS proxies, and additional setup call.
     *
     * As a security check, {proxiableUUID} is invoked in the new implementation, and the return value
     * is expected to be the implementation slot in ERC1967.
     *
     * Emits an {IERC1967-Upgraded} event.
     */
    function _upgradeToAndCallUUPS(address newImplementation, bytes memory data) private {
        try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {
            if (slot != ERC1967Utils.IMPLEMENTATION_SLOT) {
                revert UUPSUnsupportedProxiableUUID(slot);
            }
            ERC1967Utils.upgradeToAndCall(newImplementation, data);
        } catch {
            // The implementation is not UUPS
            revert ERC1967Utils.ERC1967InvalidImplementation(newImplementation);
        }
    }
}

File 5 of 30 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;
import {Initializable} from "../proxy/utils/Initializable.sol";

/**
 * @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 ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

File 6 of 30 : draft-IERC1822.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC1822.sol)

pragma solidity ^0.8.20;

/**
 * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified
 * proxy whose upgrades are fully controlled by the current implementation.
 */
interface IERC1822Proxiable {
    /**
     * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation
     * address.
     *
     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
     * function revert if invoked through a proxy.
     */
    function proxiableUUID() external view returns (bytes32);
}

File 7 of 30 : IBeacon.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol)

pragma solidity ^0.8.20;

/**
 * @dev This is the interface that {BeaconProxy} expects of its beacon.
 */
interface IBeacon {
    /**
     * @dev Must return an address that can be used as a delegate call target.
     *
     * {UpgradeableBeacon} will check that this address is a contract.
     */
    function implementation() external view returns (address);
}

File 8 of 30 : ERC1967Utils.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/ERC1967/ERC1967Utils.sol)

pragma solidity ^0.8.20;

import {IBeacon} from "../beacon/IBeacon.sol";
import {Address} from "../../utils/Address.sol";
import {StorageSlot} from "../../utils/StorageSlot.sol";

/**
 * @dev This abstract contract provides getters and event emitting update functions for
 * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.
 */
library ERC1967Utils {
    // We re-declare ERC-1967 events here because they can't be used directly from IERC1967.
    // This will be fixed in Solidity 0.8.21. At that point we should remove these events.
    /**
     * @dev Emitted when the implementation is upgraded.
     */
    event Upgraded(address indexed implementation);

    /**
     * @dev Emitted when the admin account has changed.
     */
    event AdminChanged(address previousAdmin, address newAdmin);

    /**
     * @dev Emitted when the beacon is changed.
     */
    event BeaconUpgraded(address indexed beacon);

    /**
     * @dev Storage slot with the address of the current implementation.
     * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1.
     */
    // solhint-disable-next-line private-vars-leading-underscore
    bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;

    /**
     * @dev The `implementation` of the proxy is invalid.
     */
    error ERC1967InvalidImplementation(address implementation);

    /**
     * @dev The `admin` of the proxy is invalid.
     */
    error ERC1967InvalidAdmin(address admin);

    /**
     * @dev The `beacon` of the proxy is invalid.
     */
    error ERC1967InvalidBeacon(address beacon);

    /**
     * @dev An upgrade function sees `msg.value > 0` that may be lost.
     */
    error ERC1967NonPayable();

    /**
     * @dev Returns the current implementation address.
     */
    function getImplementation() internal view returns (address) {
        return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value;
    }

    /**
     * @dev Stores a new address in the EIP1967 implementation slot.
     */
    function _setImplementation(address newImplementation) private {
        if (newImplementation.code.length == 0) {
            revert ERC1967InvalidImplementation(newImplementation);
        }
        StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation;
    }

    /**
     * @dev Performs implementation upgrade with additional setup call if data is nonempty.
     * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected
     * to avoid stuck value in the contract.
     *
     * Emits an {IERC1967-Upgraded} event.
     */
    function upgradeToAndCall(address newImplementation, bytes memory data) internal {
        _setImplementation(newImplementation);
        emit Upgraded(newImplementation);

        if (data.length > 0) {
            Address.functionDelegateCall(newImplementation, data);
        } else {
            _checkNonPayable();
        }
    }

    /**
     * @dev Storage slot with the admin of the contract.
     * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1.
     */
    // solhint-disable-next-line private-vars-leading-underscore
    bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;

    /**
     * @dev Returns the current admin.
     *
     * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using
     * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.
     * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`
     */
    function getAdmin() internal view returns (address) {
        return StorageSlot.getAddressSlot(ADMIN_SLOT).value;
    }

    /**
     * @dev Stores a new address in the EIP1967 admin slot.
     */
    function _setAdmin(address newAdmin) private {
        if (newAdmin == address(0)) {
            revert ERC1967InvalidAdmin(address(0));
        }
        StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin;
    }

    /**
     * @dev Changes the admin of the proxy.
     *
     * Emits an {IERC1967-AdminChanged} event.
     */
    function changeAdmin(address newAdmin) internal {
        emit AdminChanged(getAdmin(), newAdmin);
        _setAdmin(newAdmin);
    }

    /**
     * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.
     * This is the keccak-256 hash of "eip1967.proxy.beacon" subtracted by 1.
     */
    // solhint-disable-next-line private-vars-leading-underscore
    bytes32 internal constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;

    /**
     * @dev Returns the current beacon.
     */
    function getBeacon() internal view returns (address) {
        return StorageSlot.getAddressSlot(BEACON_SLOT).value;
    }

    /**
     * @dev Stores a new beacon in the EIP1967 beacon slot.
     */
    function _setBeacon(address newBeacon) private {
        if (newBeacon.code.length == 0) {
            revert ERC1967InvalidBeacon(newBeacon);
        }

        StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon;

        address beaconImplementation = IBeacon(newBeacon).implementation();
        if (beaconImplementation.code.length == 0) {
            revert ERC1967InvalidImplementation(beaconImplementation);
        }
    }

    /**
     * @dev Change the beacon and trigger a setup call if data is nonempty.
     * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected
     * to avoid stuck value in the contract.
     *
     * Emits an {IERC1967-BeaconUpgraded} event.
     *
     * CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since
     * it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for
     * efficiency.
     */
    function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal {
        _setBeacon(newBeacon);
        emit BeaconUpgraded(newBeacon);

        if (data.length > 0) {
            Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);
        } else {
            _checkNonPayable();
        }
    }

    /**
     * @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract
     * if an upgrade doesn't perform an initialization call.
     */
    function _checkNonPayable() private {
        if (msg.value > 0) {
            revert ERC1967NonPayable();
        }
    }
}

File 9 of 30 : IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     *
     * CAUTION: See Security Considerations above.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 10 of 30 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

File 11 of 30 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC20Permit} from "../extensions/IERC20Permit.sol";
import {Address} from "../../../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;

    /**
     * @dev An operation with an ERC20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @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);
        if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @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).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // 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 cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;
    }
}

File 12 of 30 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.20;

import {IERC721} from "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 13 of 30 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.20;

import {IERC721} from "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

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

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

File 14 of 30 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon
     *   a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or
     *   {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon
     *   a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the address zero.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

File 15 of 30 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.20;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be
     * reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 16 of 30 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)

pragma solidity ^0.8.20;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error AddressInsufficientBalance(address account);

    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedInnerCall();

    /**
     * @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://consensys.net/diligence/blog/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.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert AddressInsufficientBalance(address(this));
        }

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert FailedInnerCall();
        }
    }

    /**
     * @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 or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {FailedInnerCall} error.
     *
     * 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.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @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`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert AddressInsufficientBalance(address(this));
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
     * unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {FailedInnerCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
     */
    function _revert(bytes memory returndata) private pure {
        // 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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert FailedInnerCall();
        }
    }
}

File 17 of 30 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 18 of 30 : StorageSlot.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.

pragma solidity ^0.8.20;

/**
 * @dev Library for reading and writing primitive types to specific storage slots.
 *
 * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
 * This library helps with reading and writing to such slots without the need for inline assembly.
 *
 * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
 *
 * Example usage to set ERC1967 implementation slot:
 * ```solidity
 * contract ERC1967 {
 *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
 *
 *     function _getImplementation() internal view returns (address) {
 *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
 *     }
 *
 *     function _setImplementation(address newImplementation) internal {
 *         require(newImplementation.code.length > 0);
 *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
 *     }
 * }
 * ```
 */
library StorageSlot {
    struct AddressSlot {
        address value;
    }

    struct BooleanSlot {
        bool value;
    }

    struct Bytes32Slot {
        bytes32 value;
    }

    struct Uint256Slot {
        uint256 value;
    }

    struct StringSlot {
        string value;
    }

    struct BytesSlot {
        bytes value;
    }

    /**
     * @dev Returns an `AddressSlot` with member `value` located at `slot`.
     */
    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BooleanSlot` with member `value` located at `slot`.
     */
    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
     */
    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Uint256Slot` with member `value` located at `slot`.
     */
    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `StringSlot` with member `value` located at `slot`.
     */
    function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `StringSlot` representation of the string storage pointer `store`.
     */
    function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := store.slot
        }
    }

    /**
     * @dev Returns an `BytesSlot` with member `value` located at `slot`.
     */
    function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
     */
    function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := store.slot
        }
    }
}

File 19 of 30 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/EnumerableSet.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.

pragma solidity ^0.8.20;

/**
 * @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.
 *
 * ```solidity
 * 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.
 *
 * [WARNING]
 * ====
 * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
 * unusable.
 * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
 * array of EnumerableSet.
 * ====
 */
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 is the index of the value in the `values` array plus 1.
        // Position 0 is used to mean a value is not in the set.
        mapping(bytes32 value => uint256) _positions;
    }

    /**
     * @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._positions[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 cache the value's position to prevent multiple reads from the same storage slot
        uint256 position = set._positions[value];

        if (position != 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 valueIndex = position - 1;
            uint256 lastIndex = set._values.length - 1;

            if (valueIndex != lastIndex) {
                bytes32 lastValue = set._values[lastIndex];

                // Move the lastValue to the index where the value to delete is
                set._values[valueIndex] = lastValue;
                // Update the tracked position of the lastValue (that was just moved)
                set._positions[lastValue] = position;
            }

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

            // Delete the tracked position for the deleted slot
            delete set._positions[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._positions[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) {
        bytes32[] memory store = _values(set._inner);
        bytes32[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

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

        /// @solidity memory-safe-assembly
        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 in 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;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }
}

File 20 of 30 : IERC721Permit.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.7.5;

import '@openzeppelin/contracts/token/ERC721/IERC721.sol';

/// @title ERC721 with permit
/// @notice Extension to ERC721 that includes a permit function for signature based approvals
interface IERC721Permit is IERC721 {
    /// @notice The permit typehash used in the permit signature
    /// @return The typehash for the permit
    function PERMIT_TYPEHASH() external pure returns (bytes32);

    /// @notice The domain separator used in the permit signature
    /// @return The domain seperator used in encoding of permit signature
    function DOMAIN_SEPARATOR() external view returns (bytes32);

    /// @notice Approve of a specific token ID for spending by spender via signature
    /// @param spender The account that is being approved
    /// @param tokenId The ID of the token that is being approved for spending
    /// @param deadline The deadline timestamp by which the call must be mined for the approve to work
    /// @param v Must produce valid secp256k1 signature from the holder along with `r` and `s`
    /// @param r Must produce valid secp256k1 signature from the holder along with `v` and `s`
    /// @param s Must produce valid secp256k1 signature from the holder along with `r` and `v`
    function permit(
        address spender,
        uint256 tokenId,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external payable;
}

File 21 of 30 : IGempadLock.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.22;

interface IGempadLock {
    // function lock(
    //     address owner,
    //     address token,
    //     bool isLpToken,        
    //     uint256 amount,
    //     uint256 unlockDate,
    //     string memory description,
    //     string memory _metaData,
    //     address projectToken,
    //     address referrer
    // ) external payable returns (uint256 lockId);

    function multipleLock(
        address[] calldata owners,
        address token,
        bool isLpToken,
        uint256[] calldata amounts,
        uint40 unlockDate,
        string memory description,
        string memory _metaData,
        address projectToken,
        address referrer
    ) external payable returns (uint256[] memory);

    // function vestingLock(
    //     address owner,
    //     address token,
    //     bool isLpToken,
    //     uint256 amount,
    //     uint256 tgeDate,
    //     uint256 tgeBps,
    //     uint256 cycle,
    //     uint256 cycleBps,
    //     string memory description,
    //     string memory _metaData,
    //     address projectToken,
    //     address referrer
    // ) external payable returns (uint256 lockId);

    function multipleVestingLock(
        address[] calldata owners,
        uint256[] calldata amounts,
        address token,
        bool isLpToken,
        uint40 tgeDate,
        uint24 tgeBps,
        uint40 cycle,
        uint24 cycleBps,
        string memory description,
        string memory _metaData,
        address projectToken,
        address referrer
    ) external payable returns (uint256[] memory);

    function unlock(uint256 lockId) external;

    function editLock(
        uint256 lockId,
        uint256 newAmount,
        uint40 newUnlockDate
    ) external;

    function lockLpV3(
        address owner,
        address nftManager,
        uint256 nftId,
        uint40 unlockDate,
        string memory description,
        string memory _metaData,
        address projectToken,
        address referrer
    ) external payable returns (uint256 lockId);

}

File 22 of 30 : INonfungiblePositionManager.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.7.5;
pragma abicoder v2;

import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol';

import './IPoolInitializer.sol';
import './IERC721Permit.sol';
import './IPeripheryPayments.sol';
import './IPeripheryImmutableState.sol';

/// @title Non-fungible token for positions
/// @notice Wraps Uniswap V3 positions in a non-fungible token interface which allows for them to be transferred
/// and authorized.
interface INonfungiblePositionManager is
    IPoolInitializer,
    IPeripheryPayments,
    IPeripheryImmutableState,
    IERC721Metadata,
    IERC721Enumerable,
    IERC721Permit
{
    /// @notice Emitted when liquidity is increased for a position NFT
    /// @dev Also emitted when a token is minted
    /// @param tokenId The ID of the token for which liquidity was increased
    /// @param liquidity The amount by which liquidity for the NFT position was increased
    /// @param amount0 The amount of token0 that was paid for the increase in liquidity
    /// @param amount1 The amount of token1 that was paid for the increase in liquidity
    event IncreaseLiquidity(uint256 indexed tokenId, uint128 liquidity, uint256 amount0, uint256 amount1);
    /// @notice Emitted when liquidity is decreased for a position NFT
    /// @param tokenId The ID of the token for which liquidity was decreased
    /// @param liquidity The amount by which liquidity for the NFT position was decreased
    /// @param amount0 The amount of token0 that was accounted for the decrease in liquidity
    /// @param amount1 The amount of token1 that was accounted for the decrease in liquidity
    event DecreaseLiquidity(uint256 indexed tokenId, uint128 liquidity, uint256 amount0, uint256 amount1);
    /// @notice Emitted when tokens are collected for a position NFT
    /// @dev The amounts reported may not be exactly equivalent to the amounts transferred, due to rounding behavior
    /// @param tokenId The ID of the token for which underlying tokens were collected
    /// @param recipient The address of the account that received the collected tokens
    /// @param amount0 The amount of token0 owed to the position that was collected
    /// @param amount1 The amount of token1 owed to the position that was collected
    event Collect(uint256 indexed tokenId, address recipient, uint256 amount0, uint256 amount1);

    /// @notice Returns the position information associated with a given token ID.
    /// @dev Throws if the token ID is not valid.
    /// @param tokenId The ID of the token that represents the position
    /// @return nonce The nonce for permits
    /// @return operator The address that is approved for spending
    /// @return token0 The address of the token0 for a specific pool
    /// @return token1 The address of the token1 for a specific pool
    /// @return fee The fee associated with the pool
    /// @return tickLower The lower end of the tick range for the position
    /// @return tickUpper The higher end of the tick range for the position
    /// @return liquidity The liquidity of the position
    /// @return feeGrowthInside0LastX128 The fee growth of token0 as of the last action on the individual position
    /// @return feeGrowthInside1LastX128 The fee growth of token1 as of the last action on the individual position
    /// @return tokensOwed0 The uncollected amount of token0 owed to the position as of the last computation
    /// @return tokensOwed1 The uncollected amount of token1 owed to the position as of the last computation
    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;
    }

    /// @notice Creates a new position wrapped in a NFT
    /// @dev Call this when the pool does exist and is initialized. Note that if the pool is created but not initialized
    /// a method does not exist, i.e. the pool is assumed to be initialized.
    /// @param params The params necessary to mint a position, encoded as `MintParams` in calldata
    /// @return tokenId The ID of the token that represents the minted position
    /// @return liquidity The amount of liquidity for this position
    /// @return amount0 The amount of token0
    /// @return amount1 The amount of token1
    function mint(MintParams calldata params)
        external
        payable
        returns (
            uint256 tokenId,
            uint128 liquidity,
            uint256 amount0,
            uint256 amount1
        );

    struct IncreaseLiquidityParams {
        uint256 tokenId;
        uint256 amount0Desired;
        uint256 amount1Desired;
        uint256 amount0Min;
        uint256 amount1Min;
        uint256 deadline;
    }

    /// @notice Increases the amount of liquidity in a position, with tokens paid by the `msg.sender`
    /// @param params tokenId The ID of the token for which liquidity is being increased,
    /// amount0Desired The desired amount of token0 to be spent,
    /// amount1Desired The desired amount of token1 to be spent,
    /// amount0Min The minimum amount of token0 to spend, which serves as a slippage check,
    /// amount1Min The minimum amount of token1 to spend, which serves as a slippage check,
    /// deadline The time by which the transaction must be included to effect the change
    /// @return liquidity The new liquidity amount as a result of the increase
    /// @return amount0 The amount of token0 to acheive resulting liquidity
    /// @return amount1 The amount of token1 to acheive resulting liquidity
    function increaseLiquidity(IncreaseLiquidityParams calldata params)
        external
        payable
        returns (
            uint128 liquidity,
            uint256 amount0,
            uint256 amount1
        );

    struct DecreaseLiquidityParams {
        uint256 tokenId;
        uint128 liquidity;
        uint256 amount0Min;
        uint256 amount1Min;
        uint256 deadline;
    }

    /// @notice Decreases the amount of liquidity in a position and accounts it to the position
    /// @param params tokenId The ID of the token for which liquidity is being decreased,
    /// amount The amount by which liquidity will be decreased,
    /// amount0Min The minimum amount of token0 that should be accounted for the burned liquidity,
    /// amount1Min The minimum amount of token1 that should be accounted for the burned liquidity,
    /// deadline The time by which the transaction must be included to effect the change
    /// @return amount0 The amount of token0 accounted to the position's tokens owed
    /// @return amount1 The amount of token1 accounted to the position's tokens owed
    function decreaseLiquidity(DecreaseLiquidityParams calldata params)
        external
        payable
        returns (uint256 amount0, uint256 amount1);

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

    /// @notice Collects up to a maximum amount of fees owed to a specific position to the recipient
    /// @param params tokenId The ID of the NFT for which tokens are being collected,
    /// recipient The account that should receive the tokens,
    /// amount0Max The maximum amount of token0 to collect,
    /// amount1Max The maximum amount of token1 to collect
    /// @return amount0 The amount of fees collected in token0
    /// @return amount1 The amount of fees collected in token1
    function collect(CollectParams calldata params) external payable returns (uint256 amount0, uint256 amount1);

    /// @notice Burns a token ID, which deletes it from the NFT contract. The token must have 0 liquidity and all tokens
    /// must be collected first.
    /// @param tokenId The ID of the token that is being burned
    function burn(uint256 tokenId) external payable;
}

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

/// @title Immutable state
/// @notice Functions that return immutable state of the router
interface IPeripheryImmutableState {
    /// @return Returns the address of the Uniswap V3 factory
    function factory() external view returns (address);

    /// @return Returns the address of WETH9
    function WETH9() external view returns (address);
}

File 24 of 30 : IPeripheryPayments.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.7.5;

/// @title Periphery Payments
/// @notice Functions to ease deposits and withdrawals of ETH
interface IPeripheryPayments {
    /// @notice Unwraps the contract's WETH9 balance and sends it to recipient as ETH.
    /// @dev The amountMinimum parameter prevents malicious contracts from stealing WETH9 from users.
    /// @param amountMinimum The minimum amount of WETH9 to unwrap
    /// @param recipient The address receiving ETH
    function unwrapWETH9(uint256 amountMinimum, address recipient) external payable;

    /// @notice Refunds any ETH balance held by this contract to the `msg.sender`
    /// @dev Useful for bundling with mint or increase liquidity that uses ether, or exact output swaps
    /// that use ether for the input amount
    function refundETH() external payable;

    /// @notice Transfers the full amount of a token held by this contract to recipient
    /// @dev The amountMinimum parameter prevents malicious contracts from stealing the token from users
    /// @param token The contract address of the token which will be transferred to `recipient`
    /// @param amountMinimum The minimum amount of token required for a transfer
    /// @param recipient The destination address of the token
    function sweepToken(
        address token,
        uint256 amountMinimum,
        address recipient
    ) external payable;
}

File 25 of 30 : IPoolInitializer.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.7.5;
pragma abicoder v2;

/// @title Creates and initializes V3 Pools
/// @notice Provides a method for creating and initializing a pool, if necessary, for bundling with other methods that
/// require the pool to exist.
interface IPoolInitializer {
    /// @notice Creates a new pool if it does not exist, then initializes if not initialized
    /// @dev This method can be bundled with others via IMulticall for the first action (e.g. mint) performed against a pool
    /// @param token0 The contract address of token0 of the pool
    /// @param token1 The contract address of token1 of the pool
    /// @param fee The fee amount of the v3 pool for the specified token pair
    /// @param sqrtPriceX96 The initial square root price of the pool as a Q64.96 value
    /// @return pool Returns the pool address based on the pair of tokens and fee, will return the newly created pool address if necessary
    function createAndInitializePoolIfNecessary(
        address token0,
        address token1,
        uint24 fee,
        uint160 sqrtPriceX96
    ) external payable returns (address pool);
}

File 26 of 30 : IUniswapV2Factory.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

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

    function feeTo() external view returns (address);

    function feeToSetter() external view returns (address);

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

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

    function allPairsLength() external view returns (uint256);

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

    function setFeeTo(address) external;

    function setFeeToSetter(address) external;
}

File 27 of 30 : IUniswapV2Pair.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

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

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

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

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

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

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

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

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

    function initialize(address, address) external;
}

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

/// @title The interface for the PancakeSwap V3 Factory
/// @notice The PancakeSwap V3 Factory facilitates creation of PancakeSwap V3 pools and control over the protocol fees
interface IUniswapV3Factory {
    struct TickSpacingExtraInfo {
        bool whitelistRequested;
        bool enabled;
    }
    function feeAmountTickSpacing(uint24 fee) external view returns (int24);
    function getPool(
        address tokenA,
        address tokenB,
        uint24 fee
    ) external view returns (address pool);
}

File 29 of 30 : IUniswapV3Pair.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

interface IUniswapV3Pair {
    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);
}

File 30 of 30 : FullMath.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.0;

/// @title Contains 512-bit math functions
/// @notice Facilitates multiplication and division that can have overflow of an intermediate value without any loss of precision
/// @dev Handles "phantom overflow" i.e., allows multiplication and division where an intermediate value overflows 256 bits
library FullMath {
    /// @notice Calculates floor(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
    /// @param a The multiplicand
    /// @param b The multiplier
    /// @param denominator The divisor
    /// @return result The 256-bit result
    /// @dev Credit to Remco Bloemen under MIT license https://xn--2-umb.com/21/muldiv
    function mulDiv(
        uint256 a,
        uint256 b,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        // 512-bit multiply [prod1 prod0] = a * b
        // Compute the product mod 2**256 and mod 2**256 - 1
        // then use the Chinese Remainder Theorem to reconstruct
        // the 512 bit result. The result is stored in two 256
        // variables such that product = prod1 * 2**256 + prod0
        uint256 prod0; // Least significant 256 bits of the product
        uint256 prod1; // Most significant 256 bits of the product
        /// @solidity memory-safe-assembly
        assembly {
            let mm := mulmod(a, b, not(0))
            prod0 := mul(a, b)
            prod1 := sub(sub(mm, prod0), lt(mm, prod0))
        }

        // Handle non-overflow cases, 256 by 256 division
        if (prod1 == 0) {
            require(denominator > 0);
            /// @solidity memory-safe-assembly
            assembly {
                result := div(prod0, denominator)
            }
            return result;
        }

        // Make sure the result is less than 2**256.
        // Also prevents denominator == 0
        require(denominator > prod1);

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

        // Make division exact by subtracting the remainder from [prod1 prod0]
        // Compute remainder using mulmod
        uint256 remainder;
        /// @solidity memory-safe-assembly
        assembly {
            remainder := mulmod(a, b, denominator)
        }
        // Subtract 256 bit number from 512 bit number
        /// @solidity memory-safe-assembly
        assembly {
            prod1 := sub(prod1, gt(remainder, prod0))
            prod0 := sub(prod0, remainder)
        }

        // Factor powers of two out of denominator
        // Compute largest power of two divisor of denominator.
        // Always >= 1.
        unchecked {
            uint256 twos = (type(uint256).max - denominator + 1) & denominator;
            // Divide denominator by power of two
            /// @solidity memory-safe-assembly
            assembly {
                denominator := div(denominator, twos)
            }

            // Divide [prod1 prod0] by the factors of two
            /// @solidity memory-safe-assembly
            assembly {
                prod0 := div(prod0, twos)
            }
            // Shift in bits from prod1 into prod0. For this we need
            // to flip `twos` such that it is 2**256 / twos.
            // If twos is zero, then it becomes one
            /// @solidity memory-safe-assembly
            assembly {
                twos := add(div(sub(0, twos), twos), 1)
            }
            prod0 |= prod1 * twos;

            // Invert denominator mod 2**256
            // Now that denominator is an odd number, it has an inverse
            // modulo 2**256 such that denominator * inv = 1 mod 2**256.
            // Compute the inverse by starting with a seed that is correct
            // correct for four bits. That is, denominator * inv = 1 mod 2**4
            uint256 inv = (3 * denominator) ^ 2;
            // Now use Newton-Raphson iteration to improve the precision.
            // Thanks to Hensel's lifting lemma, this also works in modular
            // arithmetic, doubling the correct bits in each step.
            inv *= 2 - denominator * inv; // inverse mod 2**8
            inv *= 2 - denominator * inv; // inverse mod 2**16
            inv *= 2 - denominator * inv; // inverse mod 2**32
            inv *= 2 - denominator * inv; // inverse mod 2**64
            inv *= 2 - denominator * inv; // inverse mod 2**128
            inv *= 2 - denominator * inv; // inverse mod 2**256

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"FeeExcluded","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint256","name":"projectCreationFee","type":"uint256"},{"internalType":"uint256","name":"lpTokenNormalLockFee","type":"uint256"},{"internalType":"uint256","name":"lpTokenVestingLockFee","type":"uint256"},{"internalType":"uint256","name":"normalTokenNormalLockFee","type":"uint256"},{"internalType":"uint256","name":"normalTokenVestingLockFee","type":"uint256"}],"indexed":false,"internalType":"struct GempadLock.Fee","name":"fee","type":"tuple"}],"name":"FeeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint40","name":"lockDate","type":"uint40"},{"internalType":"uint40","name":"tgeDate","type":"uint40"},{"internalType":"uint24","name":"tgeBps","type":"uint24"},{"internalType":"uint40","name":"cycle","type":"uint40"},{"internalType":"uint24","name":"cycleBps","type":"uint24"},{"internalType":"uint256","name":"unlockedAmount","type":"uint256"},{"internalType":"string","name":"description","type":"string"},{"internalType":"address","name":"nftManager","type":"address"},{"internalType":"uint256","name":"nftId","type":"uint256"}],"indexed":false,"internalType":"struct GempadLock.Lock","name":"lock","type":"tuple"},{"components":[{"internalType":"address","name":"projectToken","type":"address"},{"internalType":"address","name":"factory","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"indexed":false,"internalType":"struct GempadLock.CumulativeLockInfo","name":"cumulativeLockInfo","type":"tuple"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"string","name":"metaData","type":"string"},{"indexed":false,"internalType":"address","name":"referrer","type":"address"},{"indexed":false,"internalType":"address","name":"locker","type":"address"}],"name":"LockAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"lockId","type":"uint256"},{"indexed":false,"internalType":"string","name":"description","type":"string"}],"name":"LockDescriptionChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"lockId","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"LockOwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"string","name":"metaData","type":"string"}],"name":"LockProjectTokenMetaDataChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint40","name":"lockDate","type":"uint40"},{"internalType":"uint40","name":"tgeDate","type":"uint40"},{"internalType":"uint24","name":"tgeBps","type":"uint24"},{"internalType":"uint40","name":"cycle","type":"uint40"},{"internalType":"uint24","name":"cycleBps","type":"uint24"},{"internalType":"uint256","name":"unlockedAmount","type":"uint256"},{"internalType":"string","name":"description","type":"string"},{"internalType":"address","name":"nftManager","type":"address"},{"internalType":"uint256","name":"nftId","type":"uint256"}],"indexed":false,"internalType":"struct GempadLock.Lock","name":"lock","type":"tuple"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"unlockedAt","type":"uint256"}],"name":"LockRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint40","name":"lockDate","type":"uint40"},{"internalType":"uint40","name":"tgeDate","type":"uint40"},{"internalType":"uint24","name":"tgeBps","type":"uint24"},{"internalType":"uint40","name":"cycle","type":"uint40"},{"internalType":"uint24","name":"cycleBps","type":"uint24"},{"internalType":"uint256","name":"unlockedAmount","type":"uint256"},{"internalType":"string","name":"description","type":"string"},{"internalType":"address","name":"nftManager","type":"address"},{"internalType":"uint256","name":"nftId","type":"uint256"}],"indexed":false,"internalType":"struct GempadLock.Lock","name":"lock","type":"tuple"}],"name":"LockUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint40","name":"lockDate","type":"uint40"},{"internalType":"uint40","name":"tgeDate","type":"uint40"},{"internalType":"uint24","name":"tgeBps","type":"uint24"},{"internalType":"uint40","name":"cycle","type":"uint40"},{"internalType":"uint24","name":"cycleBps","type":"uint24"},{"internalType":"uint256","name":"unlockedAmount","type":"uint256"},{"internalType":"string","name":"description","type":"string"},{"internalType":"address","name":"nftManager","type":"address"},{"internalType":"uint256","name":"nftId","type":"uint256"}],"indexed":false,"internalType":"struct GempadLock.Lock","name":"lock","type":"tuple"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"LockVested","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"nft","type":"address"},{"indexed":false,"internalType":"bool","name":"isAvailable","type":"bool"}],"name":"NFTAvailableUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"ProjectOwnerChanged","type":"event"},{"inputs":[],"name":"allLpTokenLockedCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allNormalTokenLockedCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"lockId","type":"uint256"}],"name":"collectFees","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"cumulativeLockInfo","outputs":[{"internalType":"address","name":"projectToken","type":"address"},{"internalType":"address","name":"factory","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"lockId","type":"uint256"},{"internalType":"uint128","name":"liquidity","type":"uint128"}],"name":"decreaseLiquidityCurrentRange","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"lockId","type":"uint256"},{"internalType":"uint256","name":"additionalAmount","type":"uint256"},{"internalType":"uint40","name":"newUnlockDate","type":"uint40"}],"name":"editLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"lockId","type":"uint256"},{"internalType":"string","name":"description","type":"string"}],"name":"editLockDescription","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"string","name":"metaData","type":"string"}],"name":"editProjectTokenMetaData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"isExcluded","type":"bool"}],"name":"excludeFromFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint256","name":"projectCreationFee","type":"uint256"},{"internalType":"uint256","name":"lpTokenNormalLockFee","type":"uint256"},{"internalType":"uint256","name":"lpTokenVestingLockFee","type":"uint256"},{"internalType":"uint256","name":"normalTokenNormalLockFee","type":"uint256"},{"internalType":"uint256","name":"normalTokenVestingLockFee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getCumulativeLpTokenLockInfoAt","outputs":[{"components":[{"internalType":"address","name":"projectToken","type":"address"},{"internalType":"address","name":"factory","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct GempadLock.CumulativeLockInfo","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getCumulativeNormalTokenLockInfoAt","outputs":[{"components":[{"internalType":"address","name":"projectToken","type":"address"},{"internalType":"address","name":"factory","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct GempadLock.CumulativeLockInfo","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getLockAt","outputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint40","name":"lockDate","type":"uint40"},{"internalType":"uint40","name":"tgeDate","type":"uint40"},{"internalType":"uint24","name":"tgeBps","type":"uint24"},{"internalType":"uint40","name":"cycle","type":"uint40"},{"internalType":"uint24","name":"cycleBps","type":"uint24"},{"internalType":"uint256","name":"unlockedAmount","type":"uint256"},{"internalType":"string","name":"description","type":"string"},{"internalType":"address","name":"nftManager","type":"address"},{"internalType":"uint256","name":"nftId","type":"uint256"}],"internalType":"struct GempadLock.Lock","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"name":"getLocksForToken","outputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint40","name":"lockDate","type":"uint40"},{"internalType":"uint40","name":"tgeDate","type":"uint40"},{"internalType":"uint24","name":"tgeBps","type":"uint24"},{"internalType":"uint40","name":"cycle","type":"uint40"},{"internalType":"uint24","name":"cycleBps","type":"uint24"},{"internalType":"uint256","name":"unlockedAmount","type":"uint256"},{"internalType":"string","name":"description","type":"string"},{"internalType":"address","name":"nftManager","type":"address"},{"internalType":"uint256","name":"nftId","type":"uint256"}],"internalType":"struct GempadLock.Lock[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"projectToken","type":"address"}],"name":"getProject","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"string","name":"metaData","type":"string"},{"internalType":"address[]","name":"lpLockedTokens","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalLockCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"lockId","type":"uint256"},{"internalType":"uint256","name":"amount0ToAdd","type":"uint256"},{"internalType":"uint256","name":"amount1ToAdd","type":"uint256"}],"name":"increaseLiquidityCurrentRange","outputs":[{"internalType":"uint128","name":"liquidity","type":"uint128"},{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isAvailableNFT","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isExcludedFromFee","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"nftManager","type":"address"},{"internalType":"uint256","name":"nftId","type":"uint256"},{"internalType":"uint40","name":"unlockDate","type":"uint40"},{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"metaData","type":"string"},{"internalType":"address","name":"projectToken","type":"address"},{"internalType":"address","name":"referrer","type":"address"}],"name":"lockLpV3","outputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"lpLockCountForUser","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"lpLockForUserAtIndex","outputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint40","name":"lockDate","type":"uint40"},{"internalType":"uint40","name":"tgeDate","type":"uint40"},{"internalType":"uint24","name":"tgeBps","type":"uint24"},{"internalType":"uint40","name":"cycle","type":"uint40"},{"internalType":"uint24","name":"cycleBps","type":"uint24"},{"internalType":"uint256","name":"unlockedAmount","type":"uint256"},{"internalType":"string","name":"description","type":"string"},{"internalType":"address","name":"nftManager","type":"address"},{"internalType":"uint256","name":"nftId","type":"uint256"}],"internalType":"struct GempadLock.Lock","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"owners","type":"address[]"},{"internalType":"address","name":"token","type":"address"},{"internalType":"bool","name":"isLpToken","type":"bool"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"uint40","name":"unlockDate","type":"uint40"},{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"metaData","type":"string"},{"internalType":"address","name":"projectToken","type":"address"},{"internalType":"address","name":"referrer","type":"address"}],"name":"multipleLock","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address[]","name":"owners","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"address","name":"token","type":"address"},{"internalType":"bool","name":"isLpToken","type":"bool"},{"internalType":"uint40","name":"tgeDate","type":"uint40"},{"internalType":"uint24","name":"tgeBps","type":"uint24"},{"internalType":"uint40","name":"cycle","type":"uint40"},{"internalType":"uint24","name":"cycleBps","type":"uint24"},{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"metaData","type":"string"},{"internalType":"address","name":"projectToken","type":"address"},{"internalType":"address","name":"referrer","type":"address"}],"name":"multipleVestingLock","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"normalLockCountForUser","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"normalLockForUserAtIndex","outputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint40","name":"lockDate","type":"uint40"},{"internalType":"uint40","name":"tgeDate","type":"uint40"},{"internalType":"uint24","name":"tgeBps","type":"uint24"},{"internalType":"uint40","name":"cycle","type":"uint40"},{"internalType":"uint24","name":"cycleBps","type":"uint24"},{"internalType":"uint256","name":"unlockedAmount","type":"uint256"},{"internalType":"string","name":"description","type":"string"},{"internalType":"address","name":"nftManager","type":"address"},{"internalType":"uint256","name":"nftId","type":"uint256"}],"internalType":"struct GempadLock.Lock","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"totalLockCountForToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"lockId","type":"uint256"},{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferLockOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferProjectOwnerShip","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"lockId","type":"uint256"}],"name":"unlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlockAllAvailable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"nft","type":"address"},{"internalType":"bool","name":"isAvailable","type":"bool"}],"name":"updateAvailabilityForNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"projectCreationFee","type":"uint256"},{"internalType":"uint256","name":"lpTokenNormalLockFee","type":"uint256"},{"internalType":"uint256","name":"lpTokenVestingLockFee","type":"uint256"},{"internalType":"uint256","name":"normalTokenNormalLockFee","type":"uint256"},{"internalType":"uint256","name":"normalTokenVestingLockFee","type":"uint256"}],"name":"updateFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"lockId","type":"uint256"}],"name":"withdrawableTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

6080806040523461001757615ef790816200001d8239f35b600080fdfe6101c080604052600436101561001457600080fd5b600060a05260a0513560e01c90816307873ef114613748575080630d4f581a1461371d578063150b7a02146136b75780631834c397146131b45780631dedc1b8146131055780631fc48ef314612f25578063332f26d714612d9c578063475831c814612d7d5780634a92715a14612bc45780635342acb414612b8357806355dd813914612b425780635a04fb6914612a01578063617d6d6e14612758578063618df7a3146126ef5780636198e3391461220a57806368846266146121615780636dbdeab314612127578063715018a6146120b75780637c9315f3146120115780637e6706d314611f9b5780637fa96fb714611db95780638129fc1c14611c895780638da5cb5b14611c52578063a20b8c1814611b7b578063a2bcf12b14611789578063b17acdcd146113f9578063b982922e146113da578063bd41b433146112db578063cd0bdfb01461077e578063d3cac8851461058a578063ddca3f4314610549578063df8408fe146104a0578063e1444fd614610431578063e3676f88146103f5578063eb80bdae146103b9578063eeacf7861461031d578063f2fde38b146102ee578063f9870705146101f85763fd981c66146101d357600080fd5b346101f25760a0513660031901126101f2576020600554604051908152f35b60a05180fd5b346101f2576020806003193601126101f2576001600160a01b038061021b613780565b1660a05152600f8252604060a051208181541691600191600260405191610250836102498160018501613b65565b0384613958565b01946040519182828854918281520190819860a051528360a051209060a0515b8181106102db57505050829161028b856102a1930386613958565b60405197885260608389015260608801906137c7565b928684036040880152519283815201959260a051905b8382106102c45786880387f35b8451811688529682019693820193908501906102b7565b8254845292850192918801918801610270565b346101f25760203660031901126101f25761031761030a613780565b6103126141e8565b614131565b60a05180f35b346101f25760403660031901126101f2576103b56103a161039b610386610342613780565b6024359061034e613a78565b5060018060a01b03168060a05152600660205261037282604060a051205411614014565b60a051526006602052604060a05120615461565b905490610391613a78565b5060031b1c613ada565b50613bfb565b604051918291602083526020830190613807565b0390f35b346101f25760203660031901126101f2576001600160a01b036103da613780565b1660a0515260076020526020604060a0512054604051908152f35b346101f25760203660031901126101f2576001600160a01b03610416613780565b1660a05152600d6020526020604060a0512054604051908152f35b346101f25760203660031901126101f2576001600160a01b0380610453613780565b1660a05152600c602052604060a05120906103b5600282845416926001850154169301546040519384938460409194939294606082019560018060a01b0380921683521660208201520152565b346101f25760403660031901126101f2577f1922e0b3e6946217ad19fd23bfab3830587c7d0142344ed5b03b71dce5fd718360206104dc613780565b61053c6104e76139cb565b916104f06141e8565b60018060a01b0316918260a05152600e845261051c60ff604060a0512054168215159015151415613f96565b8260a05152600e8452604060a051209060ff801983541691151516179055565b604051908152a160a05180f35b346101f25760a0513660031901126101f25760a080515460015460025460035490600454926040519485526020850152604084015260608301526080820152f35b346101f25760403660031901126101f2576001600160401b036004356024358281116101f2576105be903690600401613a1e565b906105cc6005548210613cbe565b6105ed6105d882613ada565b50600201546001600160a01b03163314613cfc565b60066105f882613ada565b500182519384116107665761060d8154613b2b565b601f811161071c575b506020936001601f8211146106945760a0517f6a7e88bc91e63e1be6f3922aeef0ade2a8112f1b584601f86c30c411ecea9b259582610689575b508160011b916000199060031b1c19161790555b61068060405192839283526040602084015260408301906137c7565b0390a160a05180f35b905084015186610650565b601f198116948260a051528060a051209560a0515b81811061070457509582916001937f6a7e88bc91e63e1be6f3922aeef0ade2a8112f1b584601f86c30c411ecea9b2598106106eb575b5050811b019055610664565b86015160001960f88460031b161c1916905586806106df565b868301518855600190970196602092830192016106a9565b8160a05152602060a05120601f860160051c8101916020871061075c575b601f0160051c01905b8181106107505750610616565b60008155600101610743565b909150819061073a565b634e487b7160e01b60a051526041600452602460a051fd5b6101003660031901126101f257610793613780565b61079b61379b565b60643564ffffffffff811681036101f2576084356001600160401b0381116101f2576107cb903690600401613a1e565b60a4356001600160401b0381116101f2576107ea903690600401613a1e565b60c4356001600160a01b03811690036101f2576108056137b1565b9160018060a01b03851660a05152601060205260ff604060a051205416156112a85760c435933360a05152600e60205260ff604060a051205416156111b0575b6001600160a01b03861615611173574264ffffffffff821611156111225760405163133f757160e31b8152604435600482015296610180886024816001600160a01b038b165afa918215610d7c5760a0519889948594909185916110da575b5060c4356001600160a01b039081169087161480156110c2575b156110855760405163c45a015560e01b81529a60208c6004816001600160a01b038f165afa9b8c15610d7c5760a0519c611043575b50604051630b4c774160e11b81526001600160a01b039788166004820152908716602482015262ffffff909116604482015294602090869060649082908e165afa948515610d7c5760a05195611007575b506001600160a01b038a16151580610ff5575b15610fc05760055460805264ffffffffff6040519261097584613929565b6080805185526001600160a01b03888116602087015286811660408701526001600160801b0388166060870152428416868301529190921660a080860191909152805160c0860152805160e086015280516101008601525161012085015261014084019290925290891661016083015260443561018083015251600160401b111561076657600160805101600555610a0e608051613ada565b919091610fa7578051825560208101516001830180546001600160a01b039283166001600160a01b031991821617909155604083015160028501805491909316911617905560608101516003830155608081015160048301805460a084015169ffffffffff000000000060289190911b1664ffffffffff90931669ffffffffffffffffffff199091161791909117815560c0820151815464ffffffffff60681b60e085015160681b169062ffffff60901b61010086015160901b169262ffffff60501b9060501b16906affffffffffffffffffffff60501b1916171717905561012081015160058301556101408101518051906001600160401b03821161076657610b1c6006850154613b2b565b601f8111610f5d575b506020906001601f841114610ee4579180600894926101809460a05192610ed9575b50508160011b916000199060031b1c19161760068501555b6007840160018060a01b03610160830151166001600160601b0360a01b825416179055015191015560018060a01b031660a051526006602052610ba9608051604060a051206157c6565b50610bbc6001600160a01b038316615713565b5060a080516001600160a01b03848116909152600c6020529051604090208054909891811680610ecf57506001600160a01b03199081166001600160a01b03888116919091178a5560018a01805490921692169190911790555b610c2e6001600160801b036002890192168254613fcd565b905560018060a01b03811660a05152600d602052610c53608051604060a051206157c6565b5060a080516001600160a01b03868116909152600f6020529051604090208054909391811615610d89575b50610c99926001600160a01b039092169160020190506157c6565b506001600160a01b0383163b156101f257604051632142170760e11b815260a080513360048401523060248401526044803590840152905191949091859160649183916001600160a01b03165af1928315610d7c577f0a7da39a744acdb98c38712484e91c87d7633c3f2e3129a1535a756e43facb7093610d6d575b50610d21608051613ada565b509160018060a01b031660a05152600f602052610d5e604060a0512060018060a01b038154169260405194859460805198600133950192876140c9565b0390a260206040516080518152f35b610d7690613945565b84610d15565b6040513d60a051823e3d90fd5b6001600160a01b031916331783558051906001600160401b03821161076657610db56001850154613b2b565b601f8111610e85575b506020906001601f841114610e0b579180610c9995949260029460a05192610e00575b50508160011b916000199060031b1c19161760018401555b9192610c7e565b015190508a80610de1565b906001850160a05152602060a051209160a0515b601f1985168110610e6d575092610c9995949260019260029583601f19811610610e54575b505050811b016001840155610df9565b015160001960f88460031b161c191690558a8080610e44565b91926020600181928685015181550194019201610e1f565b6001850160a05152602060a05120601f840160051c810160208510610ec8575b601f830160051c82018110610ebb575050610dbe565b60a0518155600101610ea5565b5080610ea5565b9650610c16915050565b015190508e80610b47565b906006850160a05152602060a051209160a0515b601f1985168110610f45575092600894926001926101809583601f19811610610f2c575b505050811b016006850155610b5f565b015160001960f88460031b161c191690558e8080610f1c565b91926020600181928685015181550194019201610ef8565b6006850160a05152602060a05120601f840160051c810160208510610fa0575b601f830160051c82018110610f93575050610b25565b60a0518155600101610f7d565b5080610f7d565b634e487b7160e01b60a0515260a051600452602460a051fd5b60405162461bcd60e51b815260206004820152600d60248201526c0496e76616c6964205633204c5609c1b6044820152606490fd5b506001600160a01b0385161515610957565b9094506020813d60201161103b575b8161102360209383613958565b810103126101f25761103490613dcf565b938a610944565b3d9150611016565b91909b506020823d60201161107d575b8161106060209383613958565b810103126101f25761107562ffffff92613dcf565b9b90916108f3565b3d9150611053565b60405162461bcd60e51b815260206004820152601560248201527424b73b30b634b210383937b532b1ba103a37b5b2b760591b6044820152606490fd5b5060c4356001600160a01b03908116908c16146108be565b929a505093506111059192506101803d6101801161111b575b6110fd8183613958565b810190613e05565b5050505097965050509a9250949094998b6108a4565b503d6110f3565b60405162461bcd60e51b815260206004820152602360248201527f556e6c6f636b20646174652073686f756c6420626520696e207468652066757460448201526275726560e81b6064820152608490fd5b60405162461bcd60e51b815260206004820152601560248201527424b73b30b634b2102b199026281036b0b730b3b2b960591b6044820152606490fd5b60015460a080516001600160a01b0360c4358116909152600f602052905160409020541615611296575b8034106112515760a051600080516020615e828339815191525490918291829182916001600160a01b03165af161120f6143ad565b50610845575b60405162461bcd60e51b81526020600482015260146024820152734661696c656420746f206368617267652066656560601b6044820152606490fd5b60405162461bcd60e51b815260206004820152601960248201527f4e6f7420656e6f7567682066756e647320666f722066656573000000000000006044820152606490fd5b60a051546112a391613fcd565b6111da565b60405162461bcd60e51b815260206004820152600b60248201526a125b9d985b1a590813919560aa1b6044820152606490fd5b346101f25760a0513660031901126101f2573360a0515260066020906006602052604060a05120549060a0515b82811061138d57833360a05152600780602052604060a05120549060a0515b8281106113345760a05180f35b6001903360a0515282855261135d61135182604060a05120615461565b90549060031b1c613ada565b50600481015460501c62ffffff161561137f57611379906150a2565b01611327565b61138890614ead565b611379565b6001903360a051528285526113aa61135182604060a05120615461565b50600481015460501c62ffffff16156113cc576113c6906150a2565b01611308565b6113d590614ead565b6113c6565b346101f25760a0513660031901126101f2576020600854604051908152f35b346101f25760203660031901126101f25761144260043561141c6105d882613ada565b61143d61142882613ada565b50600701546001600160a01b03161515613d53565b613ada565b50600881015460405191611455836138f3565b8183523060208401526001600160801b0360408401526001600160801b03606084015260018060a01b03600782015416916040519063133f757160e31b82526004820152610180938482602481875afa918215610d7c5760a051958693611758575b50506040516370a0823160e01b8152306004820152906020826024816001600160a01b038a165afa918215610d7c5760a05192611724575b506040516370a0823160e01b8152306004820152946020866024816001600160a01b0388165afa958615610d7c5760a051966116ef575b50606060846001600160801b03936040938451958694859363fc6f786560e01b85528051600486015260018060a01b0360208201511660248601528288820151166044860152015116606483015260a051905af18015610d7c576116c1575b506040516370a0823160e01b8152306004820152906020826024816001600160a01b038a165afa8015610d7c5760a0519061168d575b6115c59250613ec3565b6040516370a0823160e01b81523060048201529093906020816024816001600160a01b0387165afa908115610d7c5760a05191611652575b5091604095611633866116166002979561164697613ec3565b968795019260018060a01b038454169060018060a01b03166141a5565b546001600160a01b0390811691166141a5565b82519182526020820152f35b93919290506020843d602011611685575b8161167060209383613958565b810103126101f25792519092919060406115fd565b3d9150611663565b506020823d6020116116b9575b816116a760209383613958565b810103126101f2576115c591516115bb565b3d915061169a565b6116e29060403d6040116116e8575b6116da8183613958565b810190613ead565b50611585565b503d6116d0565b9095506020813d60201161171c575b8161170b60209383613958565b810103126101f25751946060611526565b3d91506116fe565b9091506020813d602011611750575b8161174060209383613958565b810103126101f2575190866114ef565b3d9150611733565b80919296506117739350903d1061111b576110fd8183613958565b50505050505050509592509050939085806114b7565b6101803660031901126101f2576004356001600160401b0381116101f2576117b59036906004016139ee565b906024356001600160401b0381116101f2576117d59036906004016139ee565b906044356001600160a01b03811690036101f2576064351515606435036101f2576117fe6139da565b60a4359362ffffff851685036101f25760c4359164ffffffffff831683036101f25760e4359662ffffff881688036101f257610104356001600160401b0381116101f257611850903690600401613a1e565b926001600160401b0361012435116101f2576118723661012435600401613a1e565b94610144356001600160a01b03811690036101f257610164356001600160a01b03811690036101f2573360a05152600e60205260ff604060a05120541615611ab1575b64ffffffffff811615611a7c5762ffffff8916151580611a6b575b15611a2f5762ffffff8a16151580611a1e575b156119e05762ffffff8a1662ffffff8a160162ffffff81116119c85762ffffff620f4240911611611968576103b59964ffffffffff62ffffff928361195c9c83604051996119308b6138f3565b1689521660208801521660408601521660608401526101643596610144359660643593604435936143ed565b60405191829182613a3c565b60405162461bcd60e51b815260206004820152603260248201527f53756d206f66205447452062707320616e64206379636c652073686f756c642060448201527106265206c657373207468616e2031303030360741b6064820152608490fd5b634e487b7160e01b60a051526011600452602460a051fd5b60405162461bcd60e51b8152602060048201526016602482015275496e76616c6964206269707320666f72206379636c6560501b6044820152606490fd5b50620f424062ffffff8b16106118e3565b60405162461bcd60e51b8152602060048201526014602482015273496e76616c6964206269707320666f722054474560601b6044820152606490fd5b50620f424062ffffff8a16106118d0565b60405162461bcd60e51b815260206004820152600d60248201526c496e76616c6964206379636c6560981b6044820152606490fd5b60643515611b73576002545b60a080516001600160a01b03610144358116909152600f6020529051604090205482911615611b5e575b508034106112515760a051600080516020615e828339815191525490918291829182916001600160a01b03165af1611b1d6143ad565b506118b55760405162461bcd60e51b81526020600482015260146024820152734661696c656420746f206368617267652066656560601b6044820152606490fd5b611b6d915060a0515490613fcd565b8b611ae7565b600454611abd565b346101f25760203660031901126101f257600435611b976140aa565b50600854811015611c3a576103b59060018060a01b0380917ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee301541660a05152600c6020526002604060a0512060405192611bf18461390e565b80825416845260018201541660208401520154604082015260405191829182919091604080606083019460018060a01b0380825116855260208201511660208501520151910152565b634e487b7160e01b60a051526032600452602460a051fd5b346101f25760a0513660031901126101f257600080516020615e82833981519152546040516001600160a01b039091168152602090f35b346101f25760a0513660031901126101f2577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460ff8160401c1615906001600160401b03811680159081611db1575b6001149081611da7575b159081611d9e575b50611d8c5767ffffffffffffffff198116600117835581611d6d575b50611d1161589e565b611d1961589e565b611d2233614131565b611d2c5760a05180f35b68ff00000000000000001981541690557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a180610317565b68ffffffffffffffffff19166801000000000000000117825582611d08565b60405163f92ee8a960e01b8152600490fd5b90501584611cec565b303b159150611ce4565b839150611cda565b346101f25760403660031901126101f257611dd2613780565b6001600160401b036024358181116101f257611df2903690600401613a1e565b60018060a01b03809316918260a05152611e1b602094600f8652604060a0512054163314614050565b8260a05152600f845260019081604060a051200191835191821161076657611e438354613b2b565b601f8111611f4f575b50856001601f841114611ec15791808061068095937f34a72a61a8d50846e8b6e9ab45dfa9395581c29e12588d373c7c46cbd290ba5d9998979560a05193611eb6575b501b916000199060031b1c19161790555b60408051948594855284015260408301906137c7565b86015192508a611e8f565b601f929192198216908460a051528760a051209160a0515b818110611f3a575091839161068096947f34a72a61a8d50846e8b6e9ab45dfa9395581c29e12588d373c7c46cbd290ba5d9a9998969410611f21575b5050811b019055611ea0565b85015160001960f88460031b161c191690558880611f15565b87830151845592850192918901918901611ed9565b8360a051528660a05120601f840160051c810191888510611f91575b601f0160051c019082905b828110611f84575050611e4c565b60a0518155018290611f76565b9091508190611f6b565b346101f25760203660031901126101f257600435611fb76140aa565b50600a54811015611c3a576103b59060018060a01b0380917fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a801541660a05152600c6020526002604060a0512060405192611bf18461390e565b346101f25760a03660031901126101f2577f54221e4c37ec437494779513fa838d21b7e9a22be0bc8d99c2f4e1ed7873686560a060043560843560643560443560243561205c6141e8565b83608060405161206b816138c2565b878152836020820152846040820152856060820152015284865155806001558160025582600355836004556040519485526020850152604084015260608301526080820152a160a05180f35b346101f25760a0513660031901126101f2576120d16141e8565b600080516020615e8283398151915280546001600160a01b0319811690915560a051906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a360a05180f35b346101f25760203660031901126101f257612140613a78565b50602061215961215461039b600435613ada565b615274565b604051908152f35b346101f25760403660031901126101f2577fdf8ecfdb6703ae0e862b93ede08500fb7567691b1b3cb62e59c852b1f90c5343606061219d613780565b6121a561379b565b60018060a01b03809216918260a05152600f6020526121cd81604060a0512054163314614050565b8260a05152600f602052604060a05120911690816001600160601b0360a01b8254161790556040519182523360208301526040820152a160a05180f35b346101f25760203660031901126101f25761223a60043561222e6005548210613cbe565b61143d6105d882613ada565b506004810154605081901c62ffffff1615612476575061225c61215482613bfb565b61226a816005840154613fcd565b9181151580612468575b61227d90614e4b565b60018181015460a080516001600160a01b039283169052600c6020525160409020918201546002830154911615159361232f9290918280821161245557505060a05160028201555b6002810154156123e2575b5060058301859055600183015460028401546122fa9183916001600160a01b0390811691166141a5565b7faaf7efc60757926c7e969d14ed9ebedc165cdd8a84f854a7d8bcbb208156eb8a835492839260405191829142908884614e8b565b0390a260038201548414612348575b5050505060a05180f35b600080516020615ea283398151915292156123c357503360a051526006602052612379604060a05120825490615623565b505b60018060a01b0360018201541660a05152600d6020526123a2604060a05120825490615623565b508054926123b7604051928392429184614e8b565b0390a28080808061233e565b6123dc903360a051526007602052604060a05120615623565b5061237b565b84156124375760018401546123ff906001600160a01b0316615479565b505460a080516001600160a01b039283169052600f6020525160409020600185015461242f921690600201615623565b505b856122d0565b50600183015461244f906001600160a01b031661557a565b50612431565b61245e91613ec3565b60028201556122c5565b506003810154831115612274565b60281c64ffffffffff1642106126aa576005810190612496825415614e4b565b60038101546001808301805460a080516001600160a01b039283169052600c602052516040902092830154939591938693911615801590612689573360a0515260066020526124ec604060a05120875490615623565b505b6002820180548580821161267957505060a05181555b541561260f575b505060018060a01b0383541660a05152600d602052612531604060a05120855490615623565b5055600782018054909184916001600160a01b0316156125e25750505460088201546001600160a01b039091169190823b156101f257604051632142170760e11b815260a08051306004840152336024840152604483019390935251909384916064918391905af1918215610d7c57600080516020615ea2833981519152926125d3575b505b8054926125cb604051928392429184614e8b565b0390a2610317565b6125dc90613945565b836125b5565b54600080516020615ea283398151915293925061260a919033906001600160a01b03166141a5565b6125b7565b1561265e578354612628906001600160a01b0316615479565b505460a080516001600160a01b039283169052600f60205251604090208454612655921690600201615623565b505b858061250b565b508254612673906001600160a01b031661557a565b50612657565b61268291613ec3565b8155612504565b3360a0515260076020526126a4604060a05120875490615623565b506124ee565b60405162461bcd60e51b815260206004820152601c60248201527f546865206c6f636b206973206e6f7420756e6c6f636b656420796574000000006044820152606490fd5b346101f25760403660031901126101f2576103b56103a161039b610386612714613780565b60243590612720613a78565b5060018060a01b03168060a05152600760205261274482604060a051205411614014565b60a051526007602052604060a05120615461565b346101f2576060806003193601126101f2576002600435602435906127c6604435916127876005548210613cbe565b6127ac61279382613ada565b50909501546001600160a01b0395903390871614613cfc565b61143d8560076127bb84613ada565b500154161515613d53565b50916127d6600584015415613d8f565b6007830190848254166008850190815460405191829163133f757160e31b835260048301528160246101809384935afa8015610d7c578487926128579460a0519160a051946129d0575b50509061284b9161283382303384614221565b61283f85303387614221565b8b808a54169116614d5c565b88808754169116614d5c565b549060405160c08101908082106001600160401b0383111761076657889360c4926040528152602094858201938452604082019687528482019060a05182526080830160a05181528a60a0850192428452541692604051998a97889663219f5d1760e01b88525160048801525160248701525160448601525160648501525160848401525160a483015260a051905af1928315610d7c5760a051948594859490612989575b5060018201541660a05152600c825260026001600160801b03604060a051209616950161292a868254613fcd565b90556003810161293b868254613fcd565b90557ff48ccff9d505e383f2e780e5a9d762abe9f9dacd202f07d8e2f30a412f6f499761297682549260405191829186835286830190613ee6565b0390a26040519384528301526040820152f35b9550935091508484813d83116129c9575b6129a48183613958565b810103126101f2576129b584613df1565b9160408286015195015192949293876128fc565b503d61299a565b61284b9394506129ec9250803d1061111b576110fd8183613958565b5050505050505050949250905090918d612820565b346101f25760403660031901126101f2577f9075ad040756c0d8743a1fed927066a92c4755071615bf61e04b17583d961caf60606004356002612a4261379b565b612a4f6005548410613cbe565b612a74612a5b84613ada565b50909201546001600160a01b0392903390841614613cfc565b612a7d83613ada565b5091806001600285019485549583808816961680976001600160601b0360a01b1617905501541660a05152602090600c82526001604060a051200154161515600014612b0b578160a0515260068152612adb84604060a05120615623565b508260a0515260068152612af484604060a051206157c6565b505b6040519384528301526040820152a160a05180f35b8160a0515260078152612b2384604060a05120615623565b508260a0515260078152612b3c84604060a051206157c6565b50612af6565b346101f25760203660031901126101f2576001600160a01b03612b63613780565b1660a051526010602052602060ff604060a0512054166040519015158152f35b346101f25760203660031901126101f2576001600160a01b03612ba4613780565b1660a05152600e602052602060ff604060a0512054166040519015158152f35b6101203660031901126101f2576001600160401b036004358181116101f257612bf19036906004016139ee565b91612bfa61379b565b6044359182151583036101f2576064358181116101f257612c1f9036906004016139ee565b929093612c2a6139da565b9160a4358481116101f257612c43903690600401613a1e565b9360c4359081116101f257612c5c903690600401613a1e565b94612c656137b1565b61010435989097906001600160a01b03808b168b036101f25760a051903360a05152600e60205260ff604060a05120541615612ce2575b5050906103b59a61195c9a999897969594939264ffffffffff60405197612cc2896138f3565b16875260a051602088015260a051604088015260a05160608801526143ed565b919a9998979695949392918515612d6f578115612d67576002545b80828c168452600f6020528260408520541615612d54575b5080341061125157828092918192600080516020615e8283398151915254165af1612d3e6143ad565b5015611215579091929394959697988b80612c9c565b612d619150835490613fcd565b8e612d15565b600154612cfd565b905060a05190600354612cfd565b346101f25760a0513660031901126101f2576020600a54604051908152f35b346101f25760603660031901126101f257612db5613780565b6024356044359160018060a01b0316918260a05152600d90602092600d8452604060a051205480831015612f0f575b50612def8183613ec3565b92600195600185018095116119c857612e22612e0c869896613fda565b97612e1a604051998a613958565b808952613fda565b601f190160a0515b818110612ef357505060a0515b84841115612ea25787878760405191808301818452845180915260408401918060408360051b87010196019260a051905b838210612e755786880387f35b90919293948380612e91839a603f198b82030186528951613807565b999701959493919091019101612e68565b612ee4612eea918360a09a989a5152848952612ec961039b61038688604060a05120615461565b612ed3828a614000565b52612ede8189614000565b50613ff1565b93613ff1565b92969496612e37565b8790612f00999799613a78565b82828a01015201979597612e2a565b90915060001981019081116119c8579085612de4565b346101f25760603660031901126101f257600435602435906044359164ffffffffff808416938481036101f257612f8a600294612f656005548210613cbe565b61143d612f7182613ada565b50909601546001600160a01b0396903390881614613cfc565b5094612f9a600587015415613d8f565b80613049575b5050508160078401541615612ff5575b827ff48ccff9d505e383f2e780e5a9d762abe9f9dacd202f07d8e2f30a412f6f4997612fec825492604051918291602083526020830190613ee6565b0390a260a05180f35b8015612fb057613042916003840161300e838254613fcd565b9055600184018181541660a05152600c6020526002604060a0512001613035848254613fcd565b9055541630903390614221565b8180612fb0565b6004860192835460281c1681101590816130fb575b501561309057815469ffffffffff0000000000191660289190911b69ffffffffff000000000016179055838080612fa0565b60405162461bcd60e51b815260206004820152603b60248201527f4e657720756e6c6f636b2074696d65206e6565647320746f206265206166746560448201527f722063757272656e7420616e64206f6c64206c6f636b2074696d6500000000006064820152608490fd5b905042108661305e565b346101f25760403660031901126101f2577fa15a75d3903f0db68f0efd69dc2fa2942315db2812fae267db88368accdf71396040613141613780565b6131496139cb565b906131526141e8565b60018060a01b0316908160a0515260106020526131a360ff8460a05120541691613183811515809415151415613f96565b8360a0515260106020528460a051209060ff801983541691151516179055565b82519182526020820152a160a05180f35b346101f25760403660031901126101f2576024356004356001600160801b03821682036101f2576131f8906131ec6005548210613cbe565b61141c6105d882613ada565b509064ffffffffff600483015460281c16421061367f576001600160801b03811660038301541061364757613231600583015415613d8f565b6007820154600883015460405163133f757160e31b81526004810182905290929161018091906001600160a01b03168282602481845afa918215610d7c5760a051938493613616575b505060405194613289866138c2565b85526001600160801b038416602086015260a051604086015260a0516060860152426080860152604051906370a0823160e01b825230600483015260208260248160018060a01b0388165afa918215610d7c5760a051926135e2575b506040516370a0823160e01b8152306004820152956020876024816001600160a01b0388165afa968715610d7c5760a051976135ad575b50608060a460409283519485938492630624e65f60e11b8452805160048501526001600160801b036020820151166024850152868101516044850152606081015160648501520151608483015260a051905af18015610d7c5761358f575b506040516370a0823160e01b8152306004820152906020826024816001600160a01b0388165afa8015610d7c5760a0519061355b575b6133ba9250613ec3565b6040516370a0823160e01b81523060048201529094906020816024816001600160a01b0387165afa908115610d7c5760a0519161351f575b509361343860409794613484946134286134156001600160801b03968b9a613ec3565b98899333906001600160a01b03166141a5565b33906001600160a01b03166141a5565b6001840160018060a01b0381541660a05152600c6020528760a051209060028201918484168354116000146134d25750506134768383168254613ec3565b90555b166003830154613ec3565b60038201557ff48ccff9d505e383f2e780e5a9d762abe9f9dacd202f07d8e2f30a412f6f49976134c38254928651918291602083526020830190613ee6565b0390a282519182526020820152f35b60a051909255805461351992906134f1906001600160a01b0316615479565b505460a080516001600160a01b039283169052600f602052518a902091541690600201615623565b50613479565b96939490506020873d602011613553575b8161353d60209383613958565b810103126101f2579551929593926134386133f2565b3d9150613530565b506020823d602011613587575b8161357560209383613958565b810103126101f2576133ba91516133b0565b3d9150613568565b6135a79060403d6040116116e8576116da8183613958565b5061337a565b9096506020813d6020116135da575b816135c960209383613958565b810103126101f2575195608061331c565b3d91506135bc565b9091506020813d60201161360e575b816135fe60209383613958565b810103126101f2575190876132e5565b3d91506135f1565b80919294506136319350903d1061111b576110fd8183613958565b505050505050505093925090509190868061327a565b60405162461bcd60e51b815260206004820152601060248201526f135bdc99481d1a195b88131bd8dad95960821b6044820152606490fd5b60405162461bcd60e51b815260206004820152601060248201526f139bdd081d5b9b1bd8dad959081e595d60821b6044820152606490fd5b346101f25760803660031901126101f2576136d0613780565b506136d961379b565b506064356001600160401b0381116101f257366023820112156101f25761370a903690602481600401359101613994565b50604051630a85bd0160e11b8152602090f35b346101f25760203660031901126101f257613736613a78565b506103b56103a161039b600435613ada565b346101f25760203660031901126101f2576020906001600160a01b0361376c613780565b1660a0515260068252604060a05120548152f35b600435906001600160a01b038216820361379657565b600080fd5b602435906001600160a01b038216820361379657565b60e435906001600160a01b038216820361379657565b919082519283825260005b8481106137f3575050826000602080949584010152601f8019910116010190565b6020818301810151848301820152016137d2565b906101a091805182526138a760208201519360018060a01b03809516602085015284604084015116604085015260608301516060850152608083015164ffffffffff80911660808601528060a08501511660a086015260c08401519062ffffff80921660c087015260e08501511660e0860152610100908185015116908501526101208084015190850152610140908082850151928601528401906137c7565b92610160908183015116908301526101808091015191015290565b60a081019081106001600160401b038211176138dd57604052565b634e487b7160e01b600052604160045260246000fd5b608081019081106001600160401b038211176138dd57604052565b606081019081106001600160401b038211176138dd57604052565b6101a081019081106001600160401b038211176138dd57604052565b6001600160401b0381116138dd57604052565b90601f801991011681019081106001600160401b038211176138dd57604052565b6001600160401b0381116138dd57601f01601f191660200190565b9291926139a082613979565b916139ae6040519384613958565b829481845281830111613796578281602093846000960137010152565b60243590811515820361379657565b6084359064ffffffffff8216820361379657565b9181601f84011215613796578235916001600160401b038311613796576020808501948460051b01011161379657565b9080601f8301121561379657816020613a3993359101613994565b90565b602090602060408183019282815285518094520193019160005b828110613a64575050505090565b835185529381019392810192600101613a56565b60405190613a8582613929565b816101806000918281528260208201528260408201528260608201528260808201528260a08201528260c08201528260e082015282610100820152826101208201526060610140820152826101608201520152565b600554811015613b15576009906005600052027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00190600090565b634e487b7160e01b600052603260045260246000fd5b90600182811c92168015613b5b575b6020831014613b4557565b634e487b7160e01b600052602260045260246000fd5b91607f1691613b3a565b805460009392613b7482613b2b565b91828252602093600191600181169081600014613bdc5750600114613b9b575b5050505050565b90939495506000929192528360002092846000945b838610613bc857505050500101903880808080613b94565b805485870183015294019385908201613bb0565b60ff19168685015250505090151560051b010191503880808080613b94565b90604051613c0881613929565b610180600882948054845260018060a01b0380600183015416602086015280600283015416604086015260038201546060860152600482015464ffffffffff908181166080880152818160281c1660a088015262ffffff91828260501c1660c08901528160681c1660e088015260901c166101008601526005820154610120860152604051613ca581613c9e8160068701613b65565b0382613958565b6101408601526007820154166101608501520154910152565b15613cc557565b60405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a59081b1bd8dac81251608a1b6044820152606490fd5b15613d0357565b60405162461bcd60e51b815260206004820152602260248201527f596f7520617265206e6f7420746865206f776e6572206f662074686973206c6f604482015261636b60f01b6064820152608490fd5b15613d5a57565b60405162461bcd60e51b815260206004820152600d60248201526c4e6f205633204c50206c6f636b60981b6044820152606490fd5b15613d9657565b60405162461bcd60e51b8152602060048201526011602482015270131bd8dac81dd85cc81d5b9b1bd8dad959607a1b6044820152606490fd5b51906001600160a01b038216820361379657565b51908160020b820361379657565b51906001600160801b038216820361379657565b9190826101809103126137965781516001600160601b03811681036137965791613e3160208201613dcf565b91613e3e60408301613dcf565b91613e4b60608201613dcf565b91608082015162ffffff811681036137965791613e6a60a08201613de3565b91613e7760c08301613de3565b91613e8460e08201613df1565b916101008201519161012081015191613a39610160613ea66101408501613df1565b9301613df1565b9190826040910312613796576020825192015190565b91908203918211613ed057565b634e487b7160e01b600052601160045260246000fd5b9061018060086101a09380548452613f8160018060a01b039586600184015416602087015286600284015416604087015260038301546060870152600483015464ffffffffff908181166080890152818160281c1660a089015262ffffff91828260501c1660c08a01528160681c1660e089015260901c16610100870152600583015461012087015280610140870152850160068301613b65565b94600782015416610160850152015491015290565b15613f9d57565b60405162461bcd60e51b81526020600482015260086024820152677468652073616d6560c01b6044820152606490fd5b91908201809211613ed057565b6001600160401b0381116138dd5760051b60200190565b6000198114613ed05760010190565b8051821015613b155760209160051b010190565b1561401b57565b60405162461bcd60e51b815260206004820152600d60248201526c092dcecc2d8d2c840d2dcc8caf609b1b6044820152606490fd5b1561405757565b60405162461bcd60e51b815260206004820152602560248201527f596f7520617265206e6f7420746865206f776e6572206f6620746869732070726044820152641bda9958dd60da1b6064820152608490fd5b604051906140b78261390e565b60006040838281528260208201520152565b949695916141249060e0956140e8600294610100808b528a0190613ee6565b9160018060a01b0396879582878094541660208d01528360018201541660408d0152015460608b015216608089015287820360a0890152613b65565b961660c085015216910152565b6001600160a01b0390811690811561418c57600080516020615e8283398151915280546001600160a01b031981168417909155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b604051631e4fbdf760e01b815260006004820152602490fd5b60405163a9059cbb60e01b60208201526001600160a01b039290921660248301526044808301939093529181526141e6916141e1606483613958565b615381565b565b600080516020615e82833981519152546001600160a01b0316330361420957565b60405163118cdaa760e01b8152336004820152602490fd5b604080516370a0823160e01b8082526001600160a01b03868116600484018190526020989497949691909516949293908885602481895afa9485156143a25790899493929160009661436a575b5088516323b872dd60e01b868201526001600160a01b03918216602480830191909152929091166044820152606480820189905281529091906142bc906142b6608482613958565b87615381565b87519586938492835260048301525afa801561435f57600090614330575b6142e49250613ec3565b036142ed575050565b60649250519062461bcd60e51b82526004820152601c60248201527f4e6f7420656e6f75676820746f6b656e207472616e73666572726564000000006044820152fd5b508482813d8311614358575b6143468183613958565b81010312613796576142e491516142da565b503d61433c565b84513d6000823e3d90fd5b8581969297509392933d831161439b575b6143858183613958565b810103126137965792519388939190602461426e565b503d61437b565b88513d6000823e3d90fd5b3d156143d8573d906143be82613979565b916143cc6040519384613958565b82523d6000602084013e565b606090565b9190811015613b155760051b0190565b99959793919098949692996101005260e0526101a05260c052610120526101805261016052838303614d255764ffffffffff825116421015614cd4576101a0516001600160a01b031615614c9f576000805b858210614c2557614456915030336101a051614221565b61447261446284613fda565b6040516101405261014051613958565b82610140515261448183613fda565b601f190136602061014051013760005b8381106144a45750505050506101405190565b6144b28185610100516143dd565b356001600160a01b0381168103613796576144d0828760e0516143dd565b3564ffffffffff8551169062ffffff91826020880151169264ffffffffff604089015116906060890151169160008860001461495d575060405163c45a015560e01b81526101a051600090602090839060049082906001600160a01b03165afa9091828261491b575b505061457d5760405162461bcd60e51b81526020600482015260166024820152752a3434b99034b9903737ba1030902628103a37b5b2b760511b6044820152606490fd5b926001600160a01b038416151580614904575b156148bf576145ad92610180519660c05193876101a0518b6158df565b9360018060a01b031660005260066020526145cc8460406000206157c6565b506101a0516145e3906001600160a01b0316615713565b506101a0516001600160a01b039081166000908152600c6020526040902080549092918116806148ae57506001600160a01b03199081166001600160a01b03868116919091178455600184018054909216921691909117905561464d906002905b01918254613fcd565b905560018060a01b036101a05116600052600d6020526146718260406000206157c6565b506001600160a01b039081166000908152600f602052604090208054909181161561476a575b506101a05160019392916146b7916001600160a01b0316906002016157c6565b505b6146c68261014051614000565b526146d48161014051614000565b517f0a7da39a744acdb98c38712484e91c87d7633c3f2e3129a1535a756e43facb7061470c6147068461014051614000565b51613ada565b50848060a01b036101a05116600052600c6020526040600020858060a01b036101805116600052600f602052614761604060002091878060a01b038354169260405194859433938b61016051940192876140c9565b0390a201614491565b6001600160a01b0319163317815561012051516001600160401b0381116138dd576147986001830154613b2b565b601f8111614867575b506020601f82116001146147ee5791816146b79260019695946000916147e0575b50600019600383901b1c191690861b17818601555b91929350614697565b9050610120510151386147c2565b6001830160005260206000209060005b601f198416811061484c57508260019695949287926146b795601f19811610614830575b5050811b01858201556147d7565b61012051015160001960f88460031b161c191690553880614822565b909160206001819285610120510151815501930191016147fe565b600183016000526020600020601f830160051c8101602084106148a7575b601f830160051c8201811061489b5750506147a1565b60008155600101614885565b5080614885565b945061464d92600292509050614644565b60405162461bcd60e51b815260206004820152601760248201527f54686973206973206e6f742061204c5020746f6b656e2e0000000000000000006044820152606490fd5b5061491661018051856101a051615bd3565b614590565b909192506020823d602011614955575b8161493860209383613958565b81010312614952575061494a90613dcf565b903880614539565b80fd5b3d915061492b565b610180516101a0519196949293916001600160a01b03918216911603614bd4576149909360c05193866101a0518a6158df565b6001600160a01b0390931682526007602052604082206149b19084906157c6565b506101a0516149c8906001600160a01b0316615779565b506101a0516001600160a01b039081168352600c602052604083208054614a00926002929190811615614ba7575b5001918254613fcd565b90556101a0516001600160a01b03168152600d60205260408120614a259083906157c6565b506101a0516001600160a01b039081168252600f602052604082208054909291811615614a59575b505050906001916146b9565b6001600160a01b031916331782556101205151906001600160401b038211614b9357614a886001840154613b2b565b601f8111614b4f575b50602090601f8311600114614adc57918060019695949392879391614ace575b50600019600383901b1c191690821b179101555b90913880614a4d565b905061012051015138614ab1565b9060018401825260208220915b601f1984168110614b34575060019594939286928392601f1983168311614b18575b5050811b01910155614ac5565b61012051015160001960f88460031b161c191690553880614b0b565b90916020600181928561012051015181550193019101614ae9565b60018401825260208220601f840160051c810160208510614b8c575b601f830160051c82018110614b81575050614a91565b838155600101614b6b565b5080614b6b565b634e487b7160e01b81526041600452602490fd5b6101a0516001600160a01b03166001600160a01b03199182161782556001820180549091169055386149f6565b60405162461bcd60e51b815260206004820152602360248201527f5468697320746f6b656e206973206e6f74207468652070726f6a65637420746f60448201526235b2b760e91b6064820152608490fd5b614c32828760e0516143dd565b3515614c5a57614c52600191614c4b848960e0516143dd565b3590613fcd565b91019061443f565b60405162461bcd60e51b815260206004820152601960248201527f54686520616d6f756e742063616e6e6f74206265207a65726f000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b6044820152606490fd5b60405162461bcd60e51b8152602060048201526024808201527f54474520646174652073686f756c642062652073657420696e207468652066756044820152637475726560e01b6064820152608490fd5b60405162461bcd60e51b815260206004820152600f60248201526e098cadccee8d040dad2e6dac2e8c6d608b1b6044820152606490fd5b60405163095ea7b360e01b602082018181526001600160a01b0385166024840152604480840196909652948252909290614d97606485613958565b83516001600160a01b03958487169160009182919082855af190614db96143ad565b82614e19575b5081614e0e575b5015614dd3575050505050565b614e04946141e1926040519260208401521660248201526000604482015260448152614dfe816138f3565b82615381565b3880808080613b94565b90503b151538614dc6565b80519192508115918215614e31575b50509038614dbf565b614e449250602080918301019101615369565b3880614e28565b15614e5257565b60405162461bcd60e51b81526020600482015260116024820152704e6f7468696e6720746f20756e6c6f636b60781b6044820152606490fd5b614ea360409295949395606083526060830190613ee6565b9460208201520152565b9064ffffffffff600483015460281c16421061509e5760058201805461509957600383015492600181019360018060a01b0380865416956000968752600c6020528260409583878a208160018201541615158060001461507d57338c526006602052614f1d8a8d208a5490615623565b505b6002820180548680821161506d5750508c81555b5415615022575b50508354168952600d602052614f54878a20875490615623565b5055600784018054909190831615614ff9575090869154166008840154813b15614ff5578551632142170760e11b8152306004820152336024820152604481019190915291908290606490829084905af18015614feb57600080516020615ea283398151915294959650614fdc575b505b614fd782549451928392429184614e8b565b0390a2565b614fe590613945565b38614fc3565b84513d88823e3d90fd5b8280fd5b600080516020615ea2833981519152959697508391509161501d92541633906141a5565b614fc5565b1561505a5761503382865416615479565b5054168952600f6020526150506002888b20018585541690615623565b505b833880614f3a565b506150679084541661557a565b50615052565b61507691613ec3565b8155614f33565b338c5260076020526150938a8d208a5490615623565b50614f1f565b509050565b9050565b6150ae61215482613bfb565b9060058101906150bf838354613fcd565b83151580615266575b1561526057615169600183019360018060a01b0380865416906000918252600c6020526040978589842094838060018801541615159660028101805486808211156000146152505750508781555b5415615205575b50505561513581838a54168460028b015416906141a5565b7faaf7efc60757926c7e969d14ed9ebedc165cdd8a84f854a7d8bcbb208156eb8a87549586928b5191829142908c84614e8b565b0390a260038601548514615182575b5050505050505050565b600080516020615ea2833981519152966151c8948994156151eb575033835260066020526151b4848420885490615623565b505b54168152600d60205220835490615623565b506151db82549451928392429184614e8b565b0390a23880808080808080615178565b6151ff903385526007602052858520615623565b506151b6565b871561523d57615217828d5416615479565b5054168552600f60205261523460028c872001858c541690615623565b505b833861511d565b5061524a908b541661557a565b50615236565b61525991613ec3565b8155615116565b50505050565b5060038201548111156150c8565b6060810190815180156153615761012082019181835110156153585764ffffffffff918260a0830151169283421061534d5760e08301918183511615615341576152dc6152e39162ffffff6101006152d28260c08a01511684615834565b9701511690615834565b9442613ec3565b91511690811561532b5704828102928184041490151715613ed05761530791613fcd565b825181111561531e5750613a399151905190613ec3565b90613a3992505190613ec3565b634e487b7160e01b600052601260045260246000fd5b50505050505050600090565b505050505050600090565b50505050600090565b505050600090565b90816020910312613796575180151581036137965790565b6000806153aa9260018060a01b03169360208151910182865af16153a36143ad565b9083615e1e565b80519081151591826153d8575b50506153c05750565b60249060405190635274afe760e01b82526004820152fd5b6153eb9250602080918301019101615369565b1538806153b7565b600854811015613b155760086000527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30190600090565b600a54811015613b1557600a6000527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80190600090565b8054821015613b155760005260206000200190600090565b60008181526009602052604081205490919080156155755760001990808201818111615561576008549083820191821161554d57818103615502575b50505060085480156154ee578101906154cd826153f3565b909182549160031b1b19169055600855815260096020526040812055600190565b634e487b7160e01b84526031600452602484fd5b615537615511615520936153f3565b90549060031b1c9283926153f3565b819391549060031b91821b91600019901b19161790565b90558452600960205260408420553880806154b5565b634e487b7160e01b86526011600452602486fd5b634e487b7160e01b85526011600452602485fd5b505090565b6000818152600b60205260408120549091908015615575576000199080820181811161556157600a549083820191821161554d578181036155ef575b505050600a5480156154ee578101906155ce8261542a565b909182549160031b1b19169055600a558152600b6020526040812055600190565b61560d6155fe6155209361542a565b90549060031b1c92839261542a565b90558452600b60205260408420553880806155b6565b9060018201906000928184528260205260408420549081151560001461570c57600019918083018181116156f8578254908482019182116156e4578181036156af575b5050508054801561569b5782019161567e8383615461565b909182549160031b1b191690555582526020526040812055600190565b634e487b7160e01b86526031600452602486fd5b6156cf6156bf6155209386615461565b90549060031b1c92839286615461565b90558652846020526040862055388080615666565b634e487b7160e01b88526011600452602488fd5b634e487b7160e01b87526011600452602487fd5b5050505090565b60008181526009602052604081205461577457600854600160401b81101561576057908261574c615520846001604096016008556153f3565b905560085492815260096020522055600190565b634e487b7160e01b82526041600452602482fd5b905090565b6000818152600b602052604081205461577457600a54600160401b8110156157605790826157b261552084600160409601600a5561542a565b9055600a54928152600b6020522055600190565b9190600183016000908282528060205260408220541560001461582e57845494600160401b86101561581a578361580a615520886001604098999a01855584615461565b9055549382526020522055600190565b634e487b7160e01b83526041600452602483fd5b50925050565b906000198183098183029182808310920391808303921461589257620f42409082821115613796577fde8f6cefed634549b62c77574f722e1ac57e23f24d8fd5cb790fb65668c26139940990828211900360fa1b910360061c170290565b5050620f424091500490565b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c16156158cd57565b604051631afcd79f60e31b8152600490fd5b97969490959264ffffffffff929083916005549a604051996159008b613929565b8c8b526001600160a01b0390811660208c01521660408a0152606089015242821660808901521660a087015262ffffff93841660c08701521660e085015216610100830152600061012083018190526101408301919091526101608201819052610180820152600160401b8310156138dd576001830160055561598283613ada565b919091615bbd578051825560208101516001830180546001600160a01b039283166001600160a01b031991821617909155604083015160028501805491909316911617905560608101516003830155608081015160048301805460a084015169ffffffffff000000000060289190911b1664ffffffffff90931669ffffffffffffffffffff199091161791909117815560c0820151815464ffffffffff60681b60e085015160681b169062ffffff60901b61010086015160901b169262ffffff60501b9060501b16906affffffffffffffffffffff60501b191617171790556101208101516005830155600682016101408201518051906001600160401b0382116138dd57615a918354613b2b565b601f8111615b75575b50602090601f8311600114615b06579180610180949260089694600092615afb575b50508160011b916000199060031b1c19161790555b6007840160018060a01b03610160830151166001600160601b0360a01b8254161790550151910155565b015190503880615abc565b90601f198316918460005260206000209260005b818110615b5d575092600192859260089896610180989610615b44575b505050811b019055615ad1565b015160001960f88460031b161c19169055388080615b37565b92936020600181928786015181550195019301615b1a565b836000526020600020601f840160051c81019160208510615bb3575b601f0160051c01905b818110615ba75750615a9a565b60008155600101615b9a565b9091508190615b91565b634e487b7160e01b600052600060045260246000fd5b60408051630dfe168160e01b8082526001600160a01b0393841695939492936020929083826004818b5afa918215615dd857908791600093615de3575b50811691168114159081615d6d575b5061534d5783519081528181600481895afa90811561435f57600091615d38575b50835163d21220a760e01b81529282846004818a5afa938415615d2d5790869291600095615cea575b50855163e6a4390560e01b81529183166004830152938216602482015292829184916044918391165afa928315615ce05750600092615caa575b5050161490565b90809250813d8311615cd9575b615cc18183613958565b8101031261379657615cd290613dcf565b3880615ca3565b503d615cb7565b513d6000823e3d90fd5b84809296508194503d8311615d26575b615d048183613958565b81010312613796576044869182615d1b8695613dcf565b969250509192615c69565b503d615cfa565b85513d6000823e3d90fd5b90508181813d8311615d66575b615d4f8183613958565b8101031261379657615d6090613dcf565b38615c40565b503d615d45565b855163d21220a760e01b815290915083816004818b5afa908115615dd857908791600091615da0575b5016141538615c1f565b809250858092503d8311615dd1575b615db98183613958565b8101031261379657615dcb8791613dcf565b38615d96565b503d615daf565b86513d6000823e3d90fd5b85809294508193503d8311615e17575b615dfd8183613958565b810103126137965786615e108192613dcf565b9290615c10565b503d615df3565b90615e455750805115615e3357805190602001fd5b604051630a12f52160e11b8152600490fd5b81511580615e78575b615e56575090565b604051639996b31560e01b81526001600160a01b039091166004820152602490fd5b50803b15615e4e56fe9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300dea36d2c49887f58fd0b5a7e6c041881dcdd18153a548d43287ea7be9e821188a26469706673582212200f1ee9ef49b9cc8eb89b782681b5146379a4830f2ea1e3fca294c1ddef0d9b6064736f6c63430008160033

Deployed Bytecode

0x6101c080604052600436101561001457600080fd5b600060a05260a0513560e01c90816307873ef114613748575080630d4f581a1461371d578063150b7a02146136b75780631834c397146131b45780631dedc1b8146131055780631fc48ef314612f25578063332f26d714612d9c578063475831c814612d7d5780634a92715a14612bc45780635342acb414612b8357806355dd813914612b425780635a04fb6914612a01578063617d6d6e14612758578063618df7a3146126ef5780636198e3391461220a57806368846266146121615780636dbdeab314612127578063715018a6146120b75780637c9315f3146120115780637e6706d314611f9b5780637fa96fb714611db95780638129fc1c14611c895780638da5cb5b14611c52578063a20b8c1814611b7b578063a2bcf12b14611789578063b17acdcd146113f9578063b982922e146113da578063bd41b433146112db578063cd0bdfb01461077e578063d3cac8851461058a578063ddca3f4314610549578063df8408fe146104a0578063e1444fd614610431578063e3676f88146103f5578063eb80bdae146103b9578063eeacf7861461031d578063f2fde38b146102ee578063f9870705146101f85763fd981c66146101d357600080fd5b346101f25760a0513660031901126101f2576020600554604051908152f35b60a05180fd5b346101f2576020806003193601126101f2576001600160a01b038061021b613780565b1660a05152600f8252604060a051208181541691600191600260405191610250836102498160018501613b65565b0384613958565b01946040519182828854918281520190819860a051528360a051209060a0515b8181106102db57505050829161028b856102a1930386613958565b60405197885260608389015260608801906137c7565b928684036040880152519283815201959260a051905b8382106102c45786880387f35b8451811688529682019693820193908501906102b7565b8254845292850192918801918801610270565b346101f25760203660031901126101f25761031761030a613780565b6103126141e8565b614131565b60a05180f35b346101f25760403660031901126101f2576103b56103a161039b610386610342613780565b6024359061034e613a78565b5060018060a01b03168060a05152600660205261037282604060a051205411614014565b60a051526006602052604060a05120615461565b905490610391613a78565b5060031b1c613ada565b50613bfb565b604051918291602083526020830190613807565b0390f35b346101f25760203660031901126101f2576001600160a01b036103da613780565b1660a0515260076020526020604060a0512054604051908152f35b346101f25760203660031901126101f2576001600160a01b03610416613780565b1660a05152600d6020526020604060a0512054604051908152f35b346101f25760203660031901126101f2576001600160a01b0380610453613780565b1660a05152600c602052604060a05120906103b5600282845416926001850154169301546040519384938460409194939294606082019560018060a01b0380921683521660208201520152565b346101f25760403660031901126101f2577f1922e0b3e6946217ad19fd23bfab3830587c7d0142344ed5b03b71dce5fd718360206104dc613780565b61053c6104e76139cb565b916104f06141e8565b60018060a01b0316918260a05152600e845261051c60ff604060a0512054168215159015151415613f96565b8260a05152600e8452604060a051209060ff801983541691151516179055565b604051908152a160a05180f35b346101f25760a0513660031901126101f25760a080515460015460025460035490600454926040519485526020850152604084015260608301526080820152f35b346101f25760403660031901126101f2576001600160401b036004356024358281116101f2576105be903690600401613a1e565b906105cc6005548210613cbe565b6105ed6105d882613ada565b50600201546001600160a01b03163314613cfc565b60066105f882613ada565b500182519384116107665761060d8154613b2b565b601f811161071c575b506020936001601f8211146106945760a0517f6a7e88bc91e63e1be6f3922aeef0ade2a8112f1b584601f86c30c411ecea9b259582610689575b508160011b916000199060031b1c19161790555b61068060405192839283526040602084015260408301906137c7565b0390a160a05180f35b905084015186610650565b601f198116948260a051528060a051209560a0515b81811061070457509582916001937f6a7e88bc91e63e1be6f3922aeef0ade2a8112f1b584601f86c30c411ecea9b2598106106eb575b5050811b019055610664565b86015160001960f88460031b161c1916905586806106df565b868301518855600190970196602092830192016106a9565b8160a05152602060a05120601f860160051c8101916020871061075c575b601f0160051c01905b8181106107505750610616565b60008155600101610743565b909150819061073a565b634e487b7160e01b60a051526041600452602460a051fd5b6101003660031901126101f257610793613780565b61079b61379b565b60643564ffffffffff811681036101f2576084356001600160401b0381116101f2576107cb903690600401613a1e565b60a4356001600160401b0381116101f2576107ea903690600401613a1e565b60c4356001600160a01b03811690036101f2576108056137b1565b9160018060a01b03851660a05152601060205260ff604060a051205416156112a85760c435933360a05152600e60205260ff604060a051205416156111b0575b6001600160a01b03861615611173574264ffffffffff821611156111225760405163133f757160e31b8152604435600482015296610180886024816001600160a01b038b165afa918215610d7c5760a0519889948594909185916110da575b5060c4356001600160a01b039081169087161480156110c2575b156110855760405163c45a015560e01b81529a60208c6004816001600160a01b038f165afa9b8c15610d7c5760a0519c611043575b50604051630b4c774160e11b81526001600160a01b039788166004820152908716602482015262ffffff909116604482015294602090869060649082908e165afa948515610d7c5760a05195611007575b506001600160a01b038a16151580610ff5575b15610fc05760055460805264ffffffffff6040519261097584613929565b6080805185526001600160a01b03888116602087015286811660408701526001600160801b0388166060870152428416868301529190921660a080860191909152805160c0860152805160e086015280516101008601525161012085015261014084019290925290891661016083015260443561018083015251600160401b111561076657600160805101600555610a0e608051613ada565b919091610fa7578051825560208101516001830180546001600160a01b039283166001600160a01b031991821617909155604083015160028501805491909316911617905560608101516003830155608081015160048301805460a084015169ffffffffff000000000060289190911b1664ffffffffff90931669ffffffffffffffffffff199091161791909117815560c0820151815464ffffffffff60681b60e085015160681b169062ffffff60901b61010086015160901b169262ffffff60501b9060501b16906affffffffffffffffffffff60501b1916171717905561012081015160058301556101408101518051906001600160401b03821161076657610b1c6006850154613b2b565b601f8111610f5d575b506020906001601f841114610ee4579180600894926101809460a05192610ed9575b50508160011b916000199060031b1c19161760068501555b6007840160018060a01b03610160830151166001600160601b0360a01b825416179055015191015560018060a01b031660a051526006602052610ba9608051604060a051206157c6565b50610bbc6001600160a01b038316615713565b5060a080516001600160a01b03848116909152600c6020529051604090208054909891811680610ecf57506001600160a01b03199081166001600160a01b03888116919091178a5560018a01805490921692169190911790555b610c2e6001600160801b036002890192168254613fcd565b905560018060a01b03811660a05152600d602052610c53608051604060a051206157c6565b5060a080516001600160a01b03868116909152600f6020529051604090208054909391811615610d89575b50610c99926001600160a01b039092169160020190506157c6565b506001600160a01b0383163b156101f257604051632142170760e11b815260a080513360048401523060248401526044803590840152905191949091859160649183916001600160a01b03165af1928315610d7c577f0a7da39a744acdb98c38712484e91c87d7633c3f2e3129a1535a756e43facb7093610d6d575b50610d21608051613ada565b509160018060a01b031660a05152600f602052610d5e604060a0512060018060a01b038154169260405194859460805198600133950192876140c9565b0390a260206040516080518152f35b610d7690613945565b84610d15565b6040513d60a051823e3d90fd5b6001600160a01b031916331783558051906001600160401b03821161076657610db56001850154613b2b565b601f8111610e85575b506020906001601f841114610e0b579180610c9995949260029460a05192610e00575b50508160011b916000199060031b1c19161760018401555b9192610c7e565b015190508a80610de1565b906001850160a05152602060a051209160a0515b601f1985168110610e6d575092610c9995949260019260029583601f19811610610e54575b505050811b016001840155610df9565b015160001960f88460031b161c191690558a8080610e44565b91926020600181928685015181550194019201610e1f565b6001850160a05152602060a05120601f840160051c810160208510610ec8575b601f830160051c82018110610ebb575050610dbe565b60a0518155600101610ea5565b5080610ea5565b9650610c16915050565b015190508e80610b47565b906006850160a05152602060a051209160a0515b601f1985168110610f45575092600894926001926101809583601f19811610610f2c575b505050811b016006850155610b5f565b015160001960f88460031b161c191690558e8080610f1c565b91926020600181928685015181550194019201610ef8565b6006850160a05152602060a05120601f840160051c810160208510610fa0575b601f830160051c82018110610f93575050610b25565b60a0518155600101610f7d565b5080610f7d565b634e487b7160e01b60a0515260a051600452602460a051fd5b60405162461bcd60e51b815260206004820152600d60248201526c0496e76616c6964205633204c5609c1b6044820152606490fd5b506001600160a01b0385161515610957565b9094506020813d60201161103b575b8161102360209383613958565b810103126101f25761103490613dcf565b938a610944565b3d9150611016565b91909b506020823d60201161107d575b8161106060209383613958565b810103126101f25761107562ffffff92613dcf565b9b90916108f3565b3d9150611053565b60405162461bcd60e51b815260206004820152601560248201527424b73b30b634b210383937b532b1ba103a37b5b2b760591b6044820152606490fd5b5060c4356001600160a01b03908116908c16146108be565b929a505093506111059192506101803d6101801161111b575b6110fd8183613958565b810190613e05565b5050505097965050509a9250949094998b6108a4565b503d6110f3565b60405162461bcd60e51b815260206004820152602360248201527f556e6c6f636b20646174652073686f756c6420626520696e207468652066757460448201526275726560e81b6064820152608490fd5b60405162461bcd60e51b815260206004820152601560248201527424b73b30b634b2102b199026281036b0b730b3b2b960591b6044820152606490fd5b60015460a080516001600160a01b0360c4358116909152600f602052905160409020541615611296575b8034106112515760a051600080516020615e828339815191525490918291829182916001600160a01b03165af161120f6143ad565b50610845575b60405162461bcd60e51b81526020600482015260146024820152734661696c656420746f206368617267652066656560601b6044820152606490fd5b60405162461bcd60e51b815260206004820152601960248201527f4e6f7420656e6f7567682066756e647320666f722066656573000000000000006044820152606490fd5b60a051546112a391613fcd565b6111da565b60405162461bcd60e51b815260206004820152600b60248201526a125b9d985b1a590813919560aa1b6044820152606490fd5b346101f25760a0513660031901126101f2573360a0515260066020906006602052604060a05120549060a0515b82811061138d57833360a05152600780602052604060a05120549060a0515b8281106113345760a05180f35b6001903360a0515282855261135d61135182604060a05120615461565b90549060031b1c613ada565b50600481015460501c62ffffff161561137f57611379906150a2565b01611327565b61138890614ead565b611379565b6001903360a051528285526113aa61135182604060a05120615461565b50600481015460501c62ffffff16156113cc576113c6906150a2565b01611308565b6113d590614ead565b6113c6565b346101f25760a0513660031901126101f2576020600854604051908152f35b346101f25760203660031901126101f25761144260043561141c6105d882613ada565b61143d61142882613ada565b50600701546001600160a01b03161515613d53565b613ada565b50600881015460405191611455836138f3565b8183523060208401526001600160801b0360408401526001600160801b03606084015260018060a01b03600782015416916040519063133f757160e31b82526004820152610180938482602481875afa918215610d7c5760a051958693611758575b50506040516370a0823160e01b8152306004820152906020826024816001600160a01b038a165afa918215610d7c5760a05192611724575b506040516370a0823160e01b8152306004820152946020866024816001600160a01b0388165afa958615610d7c5760a051966116ef575b50606060846001600160801b03936040938451958694859363fc6f786560e01b85528051600486015260018060a01b0360208201511660248601528288820151166044860152015116606483015260a051905af18015610d7c576116c1575b506040516370a0823160e01b8152306004820152906020826024816001600160a01b038a165afa8015610d7c5760a0519061168d575b6115c59250613ec3565b6040516370a0823160e01b81523060048201529093906020816024816001600160a01b0387165afa908115610d7c5760a05191611652575b5091604095611633866116166002979561164697613ec3565b968795019260018060a01b038454169060018060a01b03166141a5565b546001600160a01b0390811691166141a5565b82519182526020820152f35b93919290506020843d602011611685575b8161167060209383613958565b810103126101f25792519092919060406115fd565b3d9150611663565b506020823d6020116116b9575b816116a760209383613958565b810103126101f2576115c591516115bb565b3d915061169a565b6116e29060403d6040116116e8575b6116da8183613958565b810190613ead565b50611585565b503d6116d0565b9095506020813d60201161171c575b8161170b60209383613958565b810103126101f25751946060611526565b3d91506116fe565b9091506020813d602011611750575b8161174060209383613958565b810103126101f2575190866114ef565b3d9150611733565b80919296506117739350903d1061111b576110fd8183613958565b50505050505050509592509050939085806114b7565b6101803660031901126101f2576004356001600160401b0381116101f2576117b59036906004016139ee565b906024356001600160401b0381116101f2576117d59036906004016139ee565b906044356001600160a01b03811690036101f2576064351515606435036101f2576117fe6139da565b60a4359362ffffff851685036101f25760c4359164ffffffffff831683036101f25760e4359662ffffff881688036101f257610104356001600160401b0381116101f257611850903690600401613a1e565b926001600160401b0361012435116101f2576118723661012435600401613a1e565b94610144356001600160a01b03811690036101f257610164356001600160a01b03811690036101f2573360a05152600e60205260ff604060a05120541615611ab1575b64ffffffffff811615611a7c5762ffffff8916151580611a6b575b15611a2f5762ffffff8a16151580611a1e575b156119e05762ffffff8a1662ffffff8a160162ffffff81116119c85762ffffff620f4240911611611968576103b59964ffffffffff62ffffff928361195c9c83604051996119308b6138f3565b1689521660208801521660408601521660608401526101643596610144359660643593604435936143ed565b60405191829182613a3c565b60405162461bcd60e51b815260206004820152603260248201527f53756d206f66205447452062707320616e64206379636c652073686f756c642060448201527106265206c657373207468616e2031303030360741b6064820152608490fd5b634e487b7160e01b60a051526011600452602460a051fd5b60405162461bcd60e51b8152602060048201526016602482015275496e76616c6964206269707320666f72206379636c6560501b6044820152606490fd5b50620f424062ffffff8b16106118e3565b60405162461bcd60e51b8152602060048201526014602482015273496e76616c6964206269707320666f722054474560601b6044820152606490fd5b50620f424062ffffff8a16106118d0565b60405162461bcd60e51b815260206004820152600d60248201526c496e76616c6964206379636c6560981b6044820152606490fd5b60643515611b73576002545b60a080516001600160a01b03610144358116909152600f6020529051604090205482911615611b5e575b508034106112515760a051600080516020615e828339815191525490918291829182916001600160a01b03165af1611b1d6143ad565b506118b55760405162461bcd60e51b81526020600482015260146024820152734661696c656420746f206368617267652066656560601b6044820152606490fd5b611b6d915060a0515490613fcd565b8b611ae7565b600454611abd565b346101f25760203660031901126101f257600435611b976140aa565b50600854811015611c3a576103b59060018060a01b0380917ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee301541660a05152600c6020526002604060a0512060405192611bf18461390e565b80825416845260018201541660208401520154604082015260405191829182919091604080606083019460018060a01b0380825116855260208201511660208501520151910152565b634e487b7160e01b60a051526032600452602460a051fd5b346101f25760a0513660031901126101f257600080516020615e82833981519152546040516001600160a01b039091168152602090f35b346101f25760a0513660031901126101f2577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460ff8160401c1615906001600160401b03811680159081611db1575b6001149081611da7575b159081611d9e575b50611d8c5767ffffffffffffffff198116600117835581611d6d575b50611d1161589e565b611d1961589e565b611d2233614131565b611d2c5760a05180f35b68ff00000000000000001981541690557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a180610317565b68ffffffffffffffffff19166801000000000000000117825582611d08565b60405163f92ee8a960e01b8152600490fd5b90501584611cec565b303b159150611ce4565b839150611cda565b346101f25760403660031901126101f257611dd2613780565b6001600160401b036024358181116101f257611df2903690600401613a1e565b60018060a01b03809316918260a05152611e1b602094600f8652604060a0512054163314614050565b8260a05152600f845260019081604060a051200191835191821161076657611e438354613b2b565b601f8111611f4f575b50856001601f841114611ec15791808061068095937f34a72a61a8d50846e8b6e9ab45dfa9395581c29e12588d373c7c46cbd290ba5d9998979560a05193611eb6575b501b916000199060031b1c19161790555b60408051948594855284015260408301906137c7565b86015192508a611e8f565b601f929192198216908460a051528760a051209160a0515b818110611f3a575091839161068096947f34a72a61a8d50846e8b6e9ab45dfa9395581c29e12588d373c7c46cbd290ba5d9a9998969410611f21575b5050811b019055611ea0565b85015160001960f88460031b161c191690558880611f15565b87830151845592850192918901918901611ed9565b8360a051528660a05120601f840160051c810191888510611f91575b601f0160051c019082905b828110611f84575050611e4c565b60a0518155018290611f76565b9091508190611f6b565b346101f25760203660031901126101f257600435611fb76140aa565b50600a54811015611c3a576103b59060018060a01b0380917fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a801541660a05152600c6020526002604060a0512060405192611bf18461390e565b346101f25760a03660031901126101f2577f54221e4c37ec437494779513fa838d21b7e9a22be0bc8d99c2f4e1ed7873686560a060043560843560643560443560243561205c6141e8565b83608060405161206b816138c2565b878152836020820152846040820152856060820152015284865155806001558160025582600355836004556040519485526020850152604084015260608301526080820152a160a05180f35b346101f25760a0513660031901126101f2576120d16141e8565b600080516020615e8283398151915280546001600160a01b0319811690915560a051906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a360a05180f35b346101f25760203660031901126101f257612140613a78565b50602061215961215461039b600435613ada565b615274565b604051908152f35b346101f25760403660031901126101f2577fdf8ecfdb6703ae0e862b93ede08500fb7567691b1b3cb62e59c852b1f90c5343606061219d613780565b6121a561379b565b60018060a01b03809216918260a05152600f6020526121cd81604060a0512054163314614050565b8260a05152600f602052604060a05120911690816001600160601b0360a01b8254161790556040519182523360208301526040820152a160a05180f35b346101f25760203660031901126101f25761223a60043561222e6005548210613cbe565b61143d6105d882613ada565b506004810154605081901c62ffffff1615612476575061225c61215482613bfb565b61226a816005840154613fcd565b9181151580612468575b61227d90614e4b565b60018181015460a080516001600160a01b039283169052600c6020525160409020918201546002830154911615159361232f9290918280821161245557505060a05160028201555b6002810154156123e2575b5060058301859055600183015460028401546122fa9183916001600160a01b0390811691166141a5565b7faaf7efc60757926c7e969d14ed9ebedc165cdd8a84f854a7d8bcbb208156eb8a835492839260405191829142908884614e8b565b0390a260038201548414612348575b5050505060a05180f35b600080516020615ea283398151915292156123c357503360a051526006602052612379604060a05120825490615623565b505b60018060a01b0360018201541660a05152600d6020526123a2604060a05120825490615623565b508054926123b7604051928392429184614e8b565b0390a28080808061233e565b6123dc903360a051526007602052604060a05120615623565b5061237b565b84156124375760018401546123ff906001600160a01b0316615479565b505460a080516001600160a01b039283169052600f6020525160409020600185015461242f921690600201615623565b505b856122d0565b50600183015461244f906001600160a01b031661557a565b50612431565b61245e91613ec3565b60028201556122c5565b506003810154831115612274565b60281c64ffffffffff1642106126aa576005810190612496825415614e4b565b60038101546001808301805460a080516001600160a01b039283169052600c602052516040902092830154939591938693911615801590612689573360a0515260066020526124ec604060a05120875490615623565b505b6002820180548580821161267957505060a05181555b541561260f575b505060018060a01b0383541660a05152600d602052612531604060a05120855490615623565b5055600782018054909184916001600160a01b0316156125e25750505460088201546001600160a01b039091169190823b156101f257604051632142170760e11b815260a08051306004840152336024840152604483019390935251909384916064918391905af1918215610d7c57600080516020615ea2833981519152926125d3575b505b8054926125cb604051928392429184614e8b565b0390a2610317565b6125dc90613945565b836125b5565b54600080516020615ea283398151915293925061260a919033906001600160a01b03166141a5565b6125b7565b1561265e578354612628906001600160a01b0316615479565b505460a080516001600160a01b039283169052600f60205251604090208454612655921690600201615623565b505b858061250b565b508254612673906001600160a01b031661557a565b50612657565b61268291613ec3565b8155612504565b3360a0515260076020526126a4604060a05120875490615623565b506124ee565b60405162461bcd60e51b815260206004820152601c60248201527f546865206c6f636b206973206e6f7420756e6c6f636b656420796574000000006044820152606490fd5b346101f25760403660031901126101f2576103b56103a161039b610386612714613780565b60243590612720613a78565b5060018060a01b03168060a05152600760205261274482604060a051205411614014565b60a051526007602052604060a05120615461565b346101f2576060806003193601126101f2576002600435602435906127c6604435916127876005548210613cbe565b6127ac61279382613ada565b50909501546001600160a01b0395903390871614613cfc565b61143d8560076127bb84613ada565b500154161515613d53565b50916127d6600584015415613d8f565b6007830190848254166008850190815460405191829163133f757160e31b835260048301528160246101809384935afa8015610d7c578487926128579460a0519160a051946129d0575b50509061284b9161283382303384614221565b61283f85303387614221565b8b808a54169116614d5c565b88808754169116614d5c565b549060405160c08101908082106001600160401b0383111761076657889360c4926040528152602094858201938452604082019687528482019060a05182526080830160a05181528a60a0850192428452541692604051998a97889663219f5d1760e01b88525160048801525160248701525160448601525160648501525160848401525160a483015260a051905af1928315610d7c5760a051948594859490612989575b5060018201541660a05152600c825260026001600160801b03604060a051209616950161292a868254613fcd565b90556003810161293b868254613fcd565b90557ff48ccff9d505e383f2e780e5a9d762abe9f9dacd202f07d8e2f30a412f6f499761297682549260405191829186835286830190613ee6565b0390a26040519384528301526040820152f35b9550935091508484813d83116129c9575b6129a48183613958565b810103126101f2576129b584613df1565b9160408286015195015192949293876128fc565b503d61299a565b61284b9394506129ec9250803d1061111b576110fd8183613958565b5050505050505050949250905090918d612820565b346101f25760403660031901126101f2577f9075ad040756c0d8743a1fed927066a92c4755071615bf61e04b17583d961caf60606004356002612a4261379b565b612a4f6005548410613cbe565b612a74612a5b84613ada565b50909201546001600160a01b0392903390841614613cfc565b612a7d83613ada565b5091806001600285019485549583808816961680976001600160601b0360a01b1617905501541660a05152602090600c82526001604060a051200154161515600014612b0b578160a0515260068152612adb84604060a05120615623565b508260a0515260068152612af484604060a051206157c6565b505b6040519384528301526040820152a160a05180f35b8160a0515260078152612b2384604060a05120615623565b508260a0515260078152612b3c84604060a051206157c6565b50612af6565b346101f25760203660031901126101f2576001600160a01b03612b63613780565b1660a051526010602052602060ff604060a0512054166040519015158152f35b346101f25760203660031901126101f2576001600160a01b03612ba4613780565b1660a05152600e602052602060ff604060a0512054166040519015158152f35b6101203660031901126101f2576001600160401b036004358181116101f257612bf19036906004016139ee565b91612bfa61379b565b6044359182151583036101f2576064358181116101f257612c1f9036906004016139ee565b929093612c2a6139da565b9160a4358481116101f257612c43903690600401613a1e565b9360c4359081116101f257612c5c903690600401613a1e565b94612c656137b1565b61010435989097906001600160a01b03808b168b036101f25760a051903360a05152600e60205260ff604060a05120541615612ce2575b5050906103b59a61195c9a999897969594939264ffffffffff60405197612cc2896138f3565b16875260a051602088015260a051604088015260a05160608801526143ed565b919a9998979695949392918515612d6f578115612d67576002545b80828c168452600f6020528260408520541615612d54575b5080341061125157828092918192600080516020615e8283398151915254165af1612d3e6143ad565b5015611215579091929394959697988b80612c9c565b612d619150835490613fcd565b8e612d15565b600154612cfd565b905060a05190600354612cfd565b346101f25760a0513660031901126101f2576020600a54604051908152f35b346101f25760603660031901126101f257612db5613780565b6024356044359160018060a01b0316918260a05152600d90602092600d8452604060a051205480831015612f0f575b50612def8183613ec3565b92600195600185018095116119c857612e22612e0c869896613fda565b97612e1a604051998a613958565b808952613fda565b601f190160a0515b818110612ef357505060a0515b84841115612ea25787878760405191808301818452845180915260408401918060408360051b87010196019260a051905b838210612e755786880387f35b90919293948380612e91839a603f198b82030186528951613807565b999701959493919091019101612e68565b612ee4612eea918360a09a989a5152848952612ec961039b61038688604060a05120615461565b612ed3828a614000565b52612ede8189614000565b50613ff1565b93613ff1565b92969496612e37565b8790612f00999799613a78565b82828a01015201979597612e2a565b90915060001981019081116119c8579085612de4565b346101f25760603660031901126101f257600435602435906044359164ffffffffff808416938481036101f257612f8a600294612f656005548210613cbe565b61143d612f7182613ada565b50909601546001600160a01b0396903390881614613cfc565b5094612f9a600587015415613d8f565b80613049575b5050508160078401541615612ff5575b827ff48ccff9d505e383f2e780e5a9d762abe9f9dacd202f07d8e2f30a412f6f4997612fec825492604051918291602083526020830190613ee6565b0390a260a05180f35b8015612fb057613042916003840161300e838254613fcd565b9055600184018181541660a05152600c6020526002604060a0512001613035848254613fcd565b9055541630903390614221565b8180612fb0565b6004860192835460281c1681101590816130fb575b501561309057815469ffffffffff0000000000191660289190911b69ffffffffff000000000016179055838080612fa0565b60405162461bcd60e51b815260206004820152603b60248201527f4e657720756e6c6f636b2074696d65206e6565647320746f206265206166746560448201527f722063757272656e7420616e64206f6c64206c6f636b2074696d6500000000006064820152608490fd5b905042108661305e565b346101f25760403660031901126101f2577fa15a75d3903f0db68f0efd69dc2fa2942315db2812fae267db88368accdf71396040613141613780565b6131496139cb565b906131526141e8565b60018060a01b0316908160a0515260106020526131a360ff8460a05120541691613183811515809415151415613f96565b8360a0515260106020528460a051209060ff801983541691151516179055565b82519182526020820152a160a05180f35b346101f25760403660031901126101f2576024356004356001600160801b03821682036101f2576131f8906131ec6005548210613cbe565b61141c6105d882613ada565b509064ffffffffff600483015460281c16421061367f576001600160801b03811660038301541061364757613231600583015415613d8f565b6007820154600883015460405163133f757160e31b81526004810182905290929161018091906001600160a01b03168282602481845afa918215610d7c5760a051938493613616575b505060405194613289866138c2565b85526001600160801b038416602086015260a051604086015260a0516060860152426080860152604051906370a0823160e01b825230600483015260208260248160018060a01b0388165afa918215610d7c5760a051926135e2575b506040516370a0823160e01b8152306004820152956020876024816001600160a01b0388165afa968715610d7c5760a051976135ad575b50608060a460409283519485938492630624e65f60e11b8452805160048501526001600160801b036020820151166024850152868101516044850152606081015160648501520151608483015260a051905af18015610d7c5761358f575b506040516370a0823160e01b8152306004820152906020826024816001600160a01b0388165afa8015610d7c5760a0519061355b575b6133ba9250613ec3565b6040516370a0823160e01b81523060048201529094906020816024816001600160a01b0387165afa908115610d7c5760a0519161351f575b509361343860409794613484946134286134156001600160801b03968b9a613ec3565b98899333906001600160a01b03166141a5565b33906001600160a01b03166141a5565b6001840160018060a01b0381541660a05152600c6020528760a051209060028201918484168354116000146134d25750506134768383168254613ec3565b90555b166003830154613ec3565b60038201557ff48ccff9d505e383f2e780e5a9d762abe9f9dacd202f07d8e2f30a412f6f49976134c38254928651918291602083526020830190613ee6565b0390a282519182526020820152f35b60a051909255805461351992906134f1906001600160a01b0316615479565b505460a080516001600160a01b039283169052600f602052518a902091541690600201615623565b50613479565b96939490506020873d602011613553575b8161353d60209383613958565b810103126101f2579551929593926134386133f2565b3d9150613530565b506020823d602011613587575b8161357560209383613958565b810103126101f2576133ba91516133b0565b3d9150613568565b6135a79060403d6040116116e8576116da8183613958565b5061337a565b9096506020813d6020116135da575b816135c960209383613958565b810103126101f2575195608061331c565b3d91506135bc565b9091506020813d60201161360e575b816135fe60209383613958565b810103126101f2575190876132e5565b3d91506135f1565b80919294506136319350903d1061111b576110fd8183613958565b505050505050505093925090509190868061327a565b60405162461bcd60e51b815260206004820152601060248201526f135bdc99481d1a195b88131bd8dad95960821b6044820152606490fd5b60405162461bcd60e51b815260206004820152601060248201526f139bdd081d5b9b1bd8dad959081e595d60821b6044820152606490fd5b346101f25760803660031901126101f2576136d0613780565b506136d961379b565b506064356001600160401b0381116101f257366023820112156101f25761370a903690602481600401359101613994565b50604051630a85bd0160e11b8152602090f35b346101f25760203660031901126101f257613736613a78565b506103b56103a161039b600435613ada565b346101f25760203660031901126101f2576020906001600160a01b0361376c613780565b1660a0515260068252604060a05120548152f35b600435906001600160a01b038216820361379657565b600080fd5b602435906001600160a01b038216820361379657565b60e435906001600160a01b038216820361379657565b919082519283825260005b8481106137f3575050826000602080949584010152601f8019910116010190565b6020818301810151848301820152016137d2565b906101a091805182526138a760208201519360018060a01b03809516602085015284604084015116604085015260608301516060850152608083015164ffffffffff80911660808601528060a08501511660a086015260c08401519062ffffff80921660c087015260e08501511660e0860152610100908185015116908501526101208084015190850152610140908082850151928601528401906137c7565b92610160908183015116908301526101808091015191015290565b60a081019081106001600160401b038211176138dd57604052565b634e487b7160e01b600052604160045260246000fd5b608081019081106001600160401b038211176138dd57604052565b606081019081106001600160401b038211176138dd57604052565b6101a081019081106001600160401b038211176138dd57604052565b6001600160401b0381116138dd57604052565b90601f801991011681019081106001600160401b038211176138dd57604052565b6001600160401b0381116138dd57601f01601f191660200190565b9291926139a082613979565b916139ae6040519384613958565b829481845281830111613796578281602093846000960137010152565b60243590811515820361379657565b6084359064ffffffffff8216820361379657565b9181601f84011215613796578235916001600160401b038311613796576020808501948460051b01011161379657565b9080601f8301121561379657816020613a3993359101613994565b90565b602090602060408183019282815285518094520193019160005b828110613a64575050505090565b835185529381019392810192600101613a56565b60405190613a8582613929565b816101806000918281528260208201528260408201528260608201528260808201528260a08201528260c08201528260e082015282610100820152826101208201526060610140820152826101608201520152565b600554811015613b15576009906005600052027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00190600090565b634e487b7160e01b600052603260045260246000fd5b90600182811c92168015613b5b575b6020831014613b4557565b634e487b7160e01b600052602260045260246000fd5b91607f1691613b3a565b805460009392613b7482613b2b565b91828252602093600191600181169081600014613bdc5750600114613b9b575b5050505050565b90939495506000929192528360002092846000945b838610613bc857505050500101903880808080613b94565b805485870183015294019385908201613bb0565b60ff19168685015250505090151560051b010191503880808080613b94565b90604051613c0881613929565b610180600882948054845260018060a01b0380600183015416602086015280600283015416604086015260038201546060860152600482015464ffffffffff908181166080880152818160281c1660a088015262ffffff91828260501c1660c08901528160681c1660e088015260901c166101008601526005820154610120860152604051613ca581613c9e8160068701613b65565b0382613958565b6101408601526007820154166101608501520154910152565b15613cc557565b60405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a59081b1bd8dac81251608a1b6044820152606490fd5b15613d0357565b60405162461bcd60e51b815260206004820152602260248201527f596f7520617265206e6f7420746865206f776e6572206f662074686973206c6f604482015261636b60f01b6064820152608490fd5b15613d5a57565b60405162461bcd60e51b815260206004820152600d60248201526c4e6f205633204c50206c6f636b60981b6044820152606490fd5b15613d9657565b60405162461bcd60e51b8152602060048201526011602482015270131bd8dac81dd85cc81d5b9b1bd8dad959607a1b6044820152606490fd5b51906001600160a01b038216820361379657565b51908160020b820361379657565b51906001600160801b038216820361379657565b9190826101809103126137965781516001600160601b03811681036137965791613e3160208201613dcf565b91613e3e60408301613dcf565b91613e4b60608201613dcf565b91608082015162ffffff811681036137965791613e6a60a08201613de3565b91613e7760c08301613de3565b91613e8460e08201613df1565b916101008201519161012081015191613a39610160613ea66101408501613df1565b9301613df1565b9190826040910312613796576020825192015190565b91908203918211613ed057565b634e487b7160e01b600052601160045260246000fd5b9061018060086101a09380548452613f8160018060a01b039586600184015416602087015286600284015416604087015260038301546060870152600483015464ffffffffff908181166080890152818160281c1660a089015262ffffff91828260501c1660c08a01528160681c1660e089015260901c16610100870152600583015461012087015280610140870152850160068301613b65565b94600782015416610160850152015491015290565b15613f9d57565b60405162461bcd60e51b81526020600482015260086024820152677468652073616d6560c01b6044820152606490fd5b91908201809211613ed057565b6001600160401b0381116138dd5760051b60200190565b6000198114613ed05760010190565b8051821015613b155760209160051b010190565b1561401b57565b60405162461bcd60e51b815260206004820152600d60248201526c092dcecc2d8d2c840d2dcc8caf609b1b6044820152606490fd5b1561405757565b60405162461bcd60e51b815260206004820152602560248201527f596f7520617265206e6f7420746865206f776e6572206f6620746869732070726044820152641bda9958dd60da1b6064820152608490fd5b604051906140b78261390e565b60006040838281528260208201520152565b949695916141249060e0956140e8600294610100808b528a0190613ee6565b9160018060a01b0396879582878094541660208d01528360018201541660408d0152015460608b015216608089015287820360a0890152613b65565b961660c085015216910152565b6001600160a01b0390811690811561418c57600080516020615e8283398151915280546001600160a01b031981168417909155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b604051631e4fbdf760e01b815260006004820152602490fd5b60405163a9059cbb60e01b60208201526001600160a01b039290921660248301526044808301939093529181526141e6916141e1606483613958565b615381565b565b600080516020615e82833981519152546001600160a01b0316330361420957565b60405163118cdaa760e01b8152336004820152602490fd5b604080516370a0823160e01b8082526001600160a01b03868116600484018190526020989497949691909516949293908885602481895afa9485156143a25790899493929160009661436a575b5088516323b872dd60e01b868201526001600160a01b03918216602480830191909152929091166044820152606480820189905281529091906142bc906142b6608482613958565b87615381565b87519586938492835260048301525afa801561435f57600090614330575b6142e49250613ec3565b036142ed575050565b60649250519062461bcd60e51b82526004820152601c60248201527f4e6f7420656e6f75676820746f6b656e207472616e73666572726564000000006044820152fd5b508482813d8311614358575b6143468183613958565b81010312613796576142e491516142da565b503d61433c565b84513d6000823e3d90fd5b8581969297509392933d831161439b575b6143858183613958565b810103126137965792519388939190602461426e565b503d61437b565b88513d6000823e3d90fd5b3d156143d8573d906143be82613979565b916143cc6040519384613958565b82523d6000602084013e565b606090565b9190811015613b155760051b0190565b99959793919098949692996101005260e0526101a05260c052610120526101805261016052838303614d255764ffffffffff825116421015614cd4576101a0516001600160a01b031615614c9f576000805b858210614c2557614456915030336101a051614221565b61447261446284613fda565b6040516101405261014051613958565b82610140515261448183613fda565b601f190136602061014051013760005b8381106144a45750505050506101405190565b6144b28185610100516143dd565b356001600160a01b0381168103613796576144d0828760e0516143dd565b3564ffffffffff8551169062ffffff91826020880151169264ffffffffff604089015116906060890151169160008860001461495d575060405163c45a015560e01b81526101a051600090602090839060049082906001600160a01b03165afa9091828261491b575b505061457d5760405162461bcd60e51b81526020600482015260166024820152752a3434b99034b9903737ba1030902628103a37b5b2b760511b6044820152606490fd5b926001600160a01b038416151580614904575b156148bf576145ad92610180519660c05193876101a0518b6158df565b9360018060a01b031660005260066020526145cc8460406000206157c6565b506101a0516145e3906001600160a01b0316615713565b506101a0516001600160a01b039081166000908152600c6020526040902080549092918116806148ae57506001600160a01b03199081166001600160a01b03868116919091178455600184018054909216921691909117905561464d906002905b01918254613fcd565b905560018060a01b036101a05116600052600d6020526146718260406000206157c6565b506001600160a01b039081166000908152600f602052604090208054909181161561476a575b506101a05160019392916146b7916001600160a01b0316906002016157c6565b505b6146c68261014051614000565b526146d48161014051614000565b517f0a7da39a744acdb98c38712484e91c87d7633c3f2e3129a1535a756e43facb7061470c6147068461014051614000565b51613ada565b50848060a01b036101a05116600052600c6020526040600020858060a01b036101805116600052600f602052614761604060002091878060a01b038354169260405194859433938b61016051940192876140c9565b0390a201614491565b6001600160a01b0319163317815561012051516001600160401b0381116138dd576147986001830154613b2b565b601f8111614867575b506020601f82116001146147ee5791816146b79260019695946000916147e0575b50600019600383901b1c191690861b17818601555b91929350614697565b9050610120510151386147c2565b6001830160005260206000209060005b601f198416811061484c57508260019695949287926146b795601f19811610614830575b5050811b01858201556147d7565b61012051015160001960f88460031b161c191690553880614822565b909160206001819285610120510151815501930191016147fe565b600183016000526020600020601f830160051c8101602084106148a7575b601f830160051c8201811061489b5750506147a1565b60008155600101614885565b5080614885565b945061464d92600292509050614644565b60405162461bcd60e51b815260206004820152601760248201527f54686973206973206e6f742061204c5020746f6b656e2e0000000000000000006044820152606490fd5b5061491661018051856101a051615bd3565b614590565b909192506020823d602011614955575b8161493860209383613958565b81010312614952575061494a90613dcf565b903880614539565b80fd5b3d915061492b565b610180516101a0519196949293916001600160a01b03918216911603614bd4576149909360c05193866101a0518a6158df565b6001600160a01b0390931682526007602052604082206149b19084906157c6565b506101a0516149c8906001600160a01b0316615779565b506101a0516001600160a01b039081168352600c602052604083208054614a00926002929190811615614ba7575b5001918254613fcd565b90556101a0516001600160a01b03168152600d60205260408120614a259083906157c6565b506101a0516001600160a01b039081168252600f602052604082208054909291811615614a59575b505050906001916146b9565b6001600160a01b031916331782556101205151906001600160401b038211614b9357614a886001840154613b2b565b601f8111614b4f575b50602090601f8311600114614adc57918060019695949392879391614ace575b50600019600383901b1c191690821b179101555b90913880614a4d565b905061012051015138614ab1565b9060018401825260208220915b601f1984168110614b34575060019594939286928392601f1983168311614b18575b5050811b01910155614ac5565b61012051015160001960f88460031b161c191690553880614b0b565b90916020600181928561012051015181550193019101614ae9565b60018401825260208220601f840160051c810160208510614b8c575b601f830160051c82018110614b81575050614a91565b838155600101614b6b565b5080614b6b565b634e487b7160e01b81526041600452602490fd5b6101a0516001600160a01b03166001600160a01b03199182161782556001820180549091169055386149f6565b60405162461bcd60e51b815260206004820152602360248201527f5468697320746f6b656e206973206e6f74207468652070726f6a65637420746f60448201526235b2b760e91b6064820152608490fd5b614c32828760e0516143dd565b3515614c5a57614c52600191614c4b848960e0516143dd565b3590613fcd565b91019061443f565b60405162461bcd60e51b815260206004820152601960248201527f54686520616d6f756e742063616e6e6f74206265207a65726f000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b6044820152606490fd5b60405162461bcd60e51b8152602060048201526024808201527f54474520646174652073686f756c642062652073657420696e207468652066756044820152637475726560e01b6064820152608490fd5b60405162461bcd60e51b815260206004820152600f60248201526e098cadccee8d040dad2e6dac2e8c6d608b1b6044820152606490fd5b60405163095ea7b360e01b602082018181526001600160a01b0385166024840152604480840196909652948252909290614d97606485613958565b83516001600160a01b03958487169160009182919082855af190614db96143ad565b82614e19575b5081614e0e575b5015614dd3575050505050565b614e04946141e1926040519260208401521660248201526000604482015260448152614dfe816138f3565b82615381565b3880808080613b94565b90503b151538614dc6565b80519192508115918215614e31575b50509038614dbf565b614e449250602080918301019101615369565b3880614e28565b15614e5257565b60405162461bcd60e51b81526020600482015260116024820152704e6f7468696e6720746f20756e6c6f636b60781b6044820152606490fd5b614ea360409295949395606083526060830190613ee6565b9460208201520152565b9064ffffffffff600483015460281c16421061509e5760058201805461509957600383015492600181019360018060a01b0380865416956000968752600c6020528260409583878a208160018201541615158060001461507d57338c526006602052614f1d8a8d208a5490615623565b505b6002820180548680821161506d5750508c81555b5415615022575b50508354168952600d602052614f54878a20875490615623565b5055600784018054909190831615614ff9575090869154166008840154813b15614ff5578551632142170760e11b8152306004820152336024820152604481019190915291908290606490829084905af18015614feb57600080516020615ea283398151915294959650614fdc575b505b614fd782549451928392429184614e8b565b0390a2565b614fe590613945565b38614fc3565b84513d88823e3d90fd5b8280fd5b600080516020615ea2833981519152959697508391509161501d92541633906141a5565b614fc5565b1561505a5761503382865416615479565b5054168952600f6020526150506002888b20018585541690615623565b505b833880614f3a565b506150679084541661557a565b50615052565b61507691613ec3565b8155614f33565b338c5260076020526150938a8d208a5490615623565b50614f1f565b509050565b9050565b6150ae61215482613bfb565b9060058101906150bf838354613fcd565b83151580615266575b1561526057615169600183019360018060a01b0380865416906000918252600c6020526040978589842094838060018801541615159660028101805486808211156000146152505750508781555b5415615205575b50505561513581838a54168460028b015416906141a5565b7faaf7efc60757926c7e969d14ed9ebedc165cdd8a84f854a7d8bcbb208156eb8a87549586928b5191829142908c84614e8b565b0390a260038601548514615182575b5050505050505050565b600080516020615ea2833981519152966151c8948994156151eb575033835260066020526151b4848420885490615623565b505b54168152600d60205220835490615623565b506151db82549451928392429184614e8b565b0390a23880808080808080615178565b6151ff903385526007602052858520615623565b506151b6565b871561523d57615217828d5416615479565b5054168552600f60205261523460028c872001858c541690615623565b505b833861511d565b5061524a908b541661557a565b50615236565b61525991613ec3565b8155615116565b50505050565b5060038201548111156150c8565b6060810190815180156153615761012082019181835110156153585764ffffffffff918260a0830151169283421061534d5760e08301918183511615615341576152dc6152e39162ffffff6101006152d28260c08a01511684615834565b9701511690615834565b9442613ec3565b91511690811561532b5704828102928184041490151715613ed05761530791613fcd565b825181111561531e5750613a399151905190613ec3565b90613a3992505190613ec3565b634e487b7160e01b600052601260045260246000fd5b50505050505050600090565b505050505050600090565b50505050600090565b505050600090565b90816020910312613796575180151581036137965790565b6000806153aa9260018060a01b03169360208151910182865af16153a36143ad565b9083615e1e565b80519081151591826153d8575b50506153c05750565b60249060405190635274afe760e01b82526004820152fd5b6153eb9250602080918301019101615369565b1538806153b7565b600854811015613b155760086000527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30190600090565b600a54811015613b1557600a6000527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80190600090565b8054821015613b155760005260206000200190600090565b60008181526009602052604081205490919080156155755760001990808201818111615561576008549083820191821161554d57818103615502575b50505060085480156154ee578101906154cd826153f3565b909182549160031b1b19169055600855815260096020526040812055600190565b634e487b7160e01b84526031600452602484fd5b615537615511615520936153f3565b90549060031b1c9283926153f3565b819391549060031b91821b91600019901b19161790565b90558452600960205260408420553880806154b5565b634e487b7160e01b86526011600452602486fd5b634e487b7160e01b85526011600452602485fd5b505090565b6000818152600b60205260408120549091908015615575576000199080820181811161556157600a549083820191821161554d578181036155ef575b505050600a5480156154ee578101906155ce8261542a565b909182549160031b1b19169055600a558152600b6020526040812055600190565b61560d6155fe6155209361542a565b90549060031b1c92839261542a565b90558452600b60205260408420553880806155b6565b9060018201906000928184528260205260408420549081151560001461570c57600019918083018181116156f8578254908482019182116156e4578181036156af575b5050508054801561569b5782019161567e8383615461565b909182549160031b1b191690555582526020526040812055600190565b634e487b7160e01b86526031600452602486fd5b6156cf6156bf6155209386615461565b90549060031b1c92839286615461565b90558652846020526040862055388080615666565b634e487b7160e01b88526011600452602488fd5b634e487b7160e01b87526011600452602487fd5b5050505090565b60008181526009602052604081205461577457600854600160401b81101561576057908261574c615520846001604096016008556153f3565b905560085492815260096020522055600190565b634e487b7160e01b82526041600452602482fd5b905090565b6000818152600b602052604081205461577457600a54600160401b8110156157605790826157b261552084600160409601600a5561542a565b9055600a54928152600b6020522055600190565b9190600183016000908282528060205260408220541560001461582e57845494600160401b86101561581a578361580a615520886001604098999a01855584615461565b9055549382526020522055600190565b634e487b7160e01b83526041600452602483fd5b50925050565b906000198183098183029182808310920391808303921461589257620f42409082821115613796577fde8f6cefed634549b62c77574f722e1ac57e23f24d8fd5cb790fb65668c26139940990828211900360fa1b910360061c170290565b5050620f424091500490565b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c16156158cd57565b604051631afcd79f60e31b8152600490fd5b97969490959264ffffffffff929083916005549a604051996159008b613929565b8c8b526001600160a01b0390811660208c01521660408a0152606089015242821660808901521660a087015262ffffff93841660c08701521660e085015216610100830152600061012083018190526101408301919091526101608201819052610180820152600160401b8310156138dd576001830160055561598283613ada565b919091615bbd578051825560208101516001830180546001600160a01b039283166001600160a01b031991821617909155604083015160028501805491909316911617905560608101516003830155608081015160048301805460a084015169ffffffffff000000000060289190911b1664ffffffffff90931669ffffffffffffffffffff199091161791909117815560c0820151815464ffffffffff60681b60e085015160681b169062ffffff60901b61010086015160901b169262ffffff60501b9060501b16906affffffffffffffffffffff60501b191617171790556101208101516005830155600682016101408201518051906001600160401b0382116138dd57615a918354613b2b565b601f8111615b75575b50602090601f8311600114615b06579180610180949260089694600092615afb575b50508160011b916000199060031b1c19161790555b6007840160018060a01b03610160830151166001600160601b0360a01b8254161790550151910155565b015190503880615abc565b90601f198316918460005260206000209260005b818110615b5d575092600192859260089896610180989610615b44575b505050811b019055615ad1565b015160001960f88460031b161c19169055388080615b37565b92936020600181928786015181550195019301615b1a565b836000526020600020601f840160051c81019160208510615bb3575b601f0160051c01905b818110615ba75750615a9a565b60008155600101615b9a565b9091508190615b91565b634e487b7160e01b600052600060045260246000fd5b60408051630dfe168160e01b8082526001600160a01b0393841695939492936020929083826004818b5afa918215615dd857908791600093615de3575b50811691168114159081615d6d575b5061534d5783519081528181600481895afa90811561435f57600091615d38575b50835163d21220a760e01b81529282846004818a5afa938415615d2d5790869291600095615cea575b50855163e6a4390560e01b81529183166004830152938216602482015292829184916044918391165afa928315615ce05750600092615caa575b5050161490565b90809250813d8311615cd9575b615cc18183613958565b8101031261379657615cd290613dcf565b3880615ca3565b503d615cb7565b513d6000823e3d90fd5b84809296508194503d8311615d26575b615d048183613958565b81010312613796576044869182615d1b8695613dcf565b969250509192615c69565b503d615cfa565b85513d6000823e3d90fd5b90508181813d8311615d66575b615d4f8183613958565b8101031261379657615d6090613dcf565b38615c40565b503d615d45565b855163d21220a760e01b815290915083816004818b5afa908115615dd857908791600091615da0575b5016141538615c1f565b809250858092503d8311615dd1575b615db98183613958565b8101031261379657615dcb8791613dcf565b38615d96565b503d615daf565b86513d6000823e3d90fd5b85809294508193503d8311615e17575b615dfd8183613958565b810103126137965786615e108192613dcf565b9290615c10565b503d615df3565b90615e455750805115615e3357805190602001fd5b604051630a12f52160e11b8152600490fd5b81511580615e78575b615e56575090565b604051639996b31560e01b81526001600160a01b039091166004820152602490fd5b50803b15615e4e56fe9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300dea36d2c49887f58fd0b5a7e6c041881dcdd18153a548d43287ea7be9e821188a26469706673582212200f1ee9ef49b9cc8eb89b782681b5146379a4830f2ea1e3fca294c1ddef0d9b6064736f6c63430008160033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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