ETH Price: $3,482.16 (+0.53%)

Token

Locked Lizard (LLZ)
 

Overview

Max Total Supply

0 LLZ

Holders

904

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
2 LLZ
0x240B8b8bB4Fac46ceA2dF4c83AFDF260009C2741
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
LizardLounge

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 20000 runs

Other Settings:
default evmVersion
File 1 of 16 : LizardLounge.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity 0.8.17;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "./ABDKMath64x64.sol";
import "./interfaces/IEthLizards.sol";
import "./interfaces/IGenesisEthLizards.sol";
import "./interfaces/IUSDC.sol";

/**
 * @title The staking contract for Ethlizards
 * @author kmao (@kmao37)
 * @notice Lets users stake their Ethlizard NFTs accruing continuous compound interest,
 * and also claim rewards based on their share of the pool(s).
 * See docs at docs.ethlizards.io
 * @dev One Ethlizard is assigned the value of 100 * 1e18 (without any rebases), and we store the overall
 * combined shares of all of the Ethlizards in order to calculate the specific percentage share of an Ethlizards.
 * Rebases refer to the daily interest that is applied to each Ethlizard.
 * Resets refer to when rewards are released into a pool for claim.
 * Technical documentation can be found at docs.ethlizards.io
 */
contract LizardLounge is ERC721, Ownable {
    IEthlizards public immutable Ethlizards;
    IGenesisEthlizards public immutable GenesisLiz;
    IUSDC public immutable USDc;

    // Last ID of the EthlizardsV2 Collection
    uint256 constant MAXETHLIZARDID = 5049;
    // The default assigned share of a staked Ethlizard, which is 100,
    // we multiply by 1e18 for more precise calculation and storage of a user's shares
    uint256 constant DEFAULTLIZARDSHARE = 100 * 1e18;

    // When a LLZ is first initially minted
    event LockedLizardMinted(address mintedAddress, uint256 mintedId);
    // When a LLZ is transferred from this contract, ie, a user stakes their Ethlizards again
    event LockedLizardReMinted(address ownerAddress, uint256 lizardId);
    // When a user claims rewards from their lizard
    event RewardsClaimed(uint256 tokenId, uint256 rewardsClaimed);
    // A deposit is made
    event RewardsDeposited(uint256 depositAmount);
    // AllowedContracts is updated
    event AllowedContractsUpdated(address allowedContract, bool status);
    // Reset Share Value is updated
    event ResetShareValueUpdated(uint256 newResetShareValue);
    // Council address is updated
    event CouncilAddressUpdated(address councilAddress);
    // Updating the min days a user needs to be staked to withdraw their funds
    event MinLockedTimeUpdated(uint256 minLockedTime);
    // Min Reset Value has been updated
    event MinResetValueUpdated(uint256 newMinResetValue);
    // BaseURI has been updated
    event BaseURIUpdated(string newBaseuri);

    // Stores which tokenId was staked by which address
    mapping(uint256 => address) public originalLockedLizardOwners;
    // Stores the timestamp deposited per tokenId
    mapping(uint256 => uint256) public timeLizardLocked;
    // Stores the tokenId, and it's current claim status on each specific pool,
    // when a claim is made, we make it true
    mapping(uint256 => mapping(uint256 => bool)) stakePoolClaims;
    // Stores which contracts Locked Lizards are able to interact and approve to
    mapping(address => bool) public allowedContracts;

    struct Pool {
        // Timestamp of reset/pool creation
        uint256 time;
        // USDC value stored in the pool
        uint256 value;
        // The current overallShare when the pool is created
        uint256 currentGlobalShare;
    }

    // Pool structure
    Pool[] pool;

    // Flipstate for staking deposits
    bool public depositsActive;
    // Address of the EthlizardsDAO
    address public ethlizardsDAO = 0xa5D55281917936818665c6cB87959b6a147D9306;
    // Council address used for depositing rewards
    address public councilAddress;
    // Current count of rewards that are not in a pool, in 1e6 decimals
    uint256 public currentRewards;
    // Total count of the rewards that have been invested
    uint256 public totalRewardsInvested;
    // Current count of Ethlizards staked
    uint256 public currentEthlizardStaked;
    // Current count of Ethlizards staked
    uint256 public currentGenesisEthlizardStaked;
    // The timestamp when deposits are enabled
    uint256 public startTimestamp;
    // Global counter for the combined shares of all Ethlizards
    uint256 public overallShare;
    // The timestamp of the last rebase
    uint256 public lastGlobalUpdate;
    // Counter for resets
    uint256 public resetCounter = 0;
    // Refers to the current percentage of inflation kept per reset
    // EG, 20 = 80% slash in inflation, 20% of inflated shares kept per reset.
    uint256 public resetShareValue = 20;
    // The minimum rewards to be deposited for a reset to occur/a pool to be created.
    // Is in 1e6 format due to USDC's restrictions
    uint256 public minResetValue = 50000 * 1e6;
    // How long a lizard is locked up for
    uint256 public minLockedTime = 90 days;
    // Counter for rebases
    uint256 public rebaseCounter = 0;
    // This is the current approximated rebase value, stored in 64.64 fixed point format.
    // The real rebase value is calculated by nominator/2^64.
    int128 public nominator = 18.5389777940780994 * 1e18;
    // Metadata for LLZs
    string public baseURI = "https://ipfs.io/ipfsx";

    /**
     * @notice Deploys the smart contract and assigns interfaces
     * @param ethLizardsAddress Existing address of EthlizardsV2
     * @param genesisLizaddress Existing address of Genesis Ethlizards
     * @param USDCAddress Existing address of USDC
     */
    constructor(IEthlizards ethLizardsAddress, IGenesisEthlizards genesisLizaddress, IUSDC USDCAddress)
        ERC721("Locked Lizard", "LLZ")
    {
        Ethlizards = ethLizardsAddress;
        GenesisLiz = genesisLizaddress;
        USDc = USDCAddress;
    }

    /// @dev Modifier created to prevent marketplace sales and listings of Locked Lizard NFTs
    modifier onlyApprovedContracts(address operator) {
        if (!allowedContracts[operator]) {
            revert NotWhitelistedContract();
        }
        _;
    }

    /**
     * @notice Allows user to deposit their regular and Genesis Ethlizards for staking
     * @dev Upon initial call, a user will mint a Locked Lizard per Ethlizards (genesis and regular) they stake.
     * with matching tokenIds. Upon withdrawing their stake and staking their Ethlizard again,
     * the LLZ will be stored in the contract and thus when a later deposit is made, it is transferred
     * to the user. Genesis Ids are incremented by 5049 (The last tokenId of a regular Ethlizard).
     * @param _regularTokenIds The array of tokenIds that is deposited by the caller
     * @param _genesisTokenIds The array of Genesis tokenIds that is deposited by the caller
     */
    function depositStake(uint256[] calldata _regularTokenIds, uint256[] calldata _genesisTokenIds) external {
        if (!depositsActive) {
            revert DepositsInactive();
        }

        if (msg.sender != tx.origin) {
            revert CallerNotAnAddress();
        }

        if (_regularTokenIds.length > 0) {
            Ethlizards.batchTransferFrom(msg.sender, address(this), _regularTokenIds);
        }
        if (_genesisTokenIds.length > 0) {
            GenesisLiz.batchTransferFrom(msg.sender, address(this), _genesisTokenIds);
        }

        // Iterate over the regular Ethlizards deposits
        for (uint256 i = 0; i < _regularTokenIds.length; i++) {
            // First time stakers mint their new LLZ
            if (!_exists(_regularTokenIds[i])) {
                mintLLZ(_regularTokenIds[i]);
            } else {
                // Later deposits
                _safeTransfer(address(this), (msg.sender), _regularTokenIds[i], "");
                emit LockedLizardReMinted(msg.sender, _regularTokenIds[i]);
            }

            // add the timestamp the lizard was locked, and map user's address to deposited tokenId
            originalLockedLizardOwners[_regularTokenIds[i]] = msg.sender;
            timeLizardLocked[_regularTokenIds[i]] = block.timestamp;
            currentEthlizardStaked++;
        }

        // Iterate over the genesis Ethlizards deposits
        for (uint256 i = 0; i < _genesisTokenIds.length; i++) {
            // First time stakers mint their new LLZ, exception is here is the genesis ids
            uint256 newGenesisId = _genesisTokenIds[i] + MAXETHLIZARDID;
            if (!_exists(newGenesisId)) {
                mintLLZ(newGenesisId);
                emit LockedLizardMinted(msg.sender, newGenesisId);
            } else {
                // Later deposits
                _safeTransfer(address(this), (msg.sender), newGenesisId, "");
                emit LockedLizardReMinted(msg.sender, newGenesisId);
            }

            // add the timestamp the lizard was locked, and map user's address to deposited newGenesisId
            originalLockedLizardOwners[newGenesisId] = msg.sender;
            timeLizardLocked[newGenesisId] = block.timestamp;
            currentGenesisEthlizardStaked++;
        }

        /// @notice Calls a global update to the overallShare, then add the new shares
        updateGlobalShares();
        uint256 totalDeposit =
            (_regularTokenIds.length * DEFAULTLIZARDSHARE) + (_genesisTokenIds.length * DEFAULTLIZARDSHARE * 2);
        overallShare += totalDeposit;
    }

    /**
     * @notice Allows a user to withdraw their stake
     * @dev Users should only be able to withdraw their stake of both Genesis and regular Ethlizard,
     * and remove their current raw share from the overallShare.
     * @param _regularTokenIds The array of regular Ethlizards tokenIds that is deposited by the caller
     * @param _genesisTokenIds The array of genesis Ethlizards tokenIds that is deposited by the caller
     */
    function withdrawStake(uint256[] calldata _regularTokenIds, uint256[] calldata _genesisTokenIds) external {
        if (msg.sender != tx.origin) {
            revert CallerNotAnAddress();
        }

        /// @dev We need to update the overall share values first to ensure the future rebases are accurate
        updateGlobalShares();
        // Array of Locked Lizard tokenIds we transfer back to the staking contract
        /// @dev Loop for regular Ethlizard tokenIds
        for (uint256 i = 0; i < _regularTokenIds.length; i++) {
            if (originalLockedLizardOwners[_regularTokenIds[i]] != msg.sender) {
                revert CallerNotdepositor({
                    depositor: originalLockedLizardOwners[_regularTokenIds[i]],
                    caller: msg.sender
                });
            }

            if (!isLizardWithdrawable(_regularTokenIds[i])) {
                revert LizardNotWithdrawable();
            }

            // Remove the current raw share from the overall total
            uint256 regularShare = getCurrentShareRaw(_regularTokenIds[i]);
            overallShare = overallShare - regularShare;

            // Reset values
            timeLizardLocked[_regularTokenIds[i]] = 0;
            originalLockedLizardOwners[_regularTokenIds[i]] = address(0);
            currentEthlizardStaked--;

            // Transfer the token
            transferFrom(msg.sender, address(this), _regularTokenIds[i]);
        }

        for (uint256 i = 0; i < _genesisTokenIds.length; i++) {
            if (originalLockedLizardOwners[_genesisTokenIds[i]] != msg.sender) {
                revert CallerNotdepositor({
                    depositor: originalLockedLizardOwners[_genesisTokenIds[i]],
                    caller: msg.sender
                });
            }

            if (!isLizardWithdrawable(_genesisTokenIds[i])) {
                revert LizardNotWithdrawable();
            }

            // Remove the current raw share from the overall total
            uint256 genesisShare = getCurrentShareRaw(_genesisTokenIds[i]) * 2;
            overallShare = overallShare - genesisShare;

            // Reset values
            uint256 genesisId = _genesisTokenIds[i] + MAXETHLIZARDID;
            timeLizardLocked[genesisId] = 0;
            originalLockedLizardOwners[genesisId] = address(0);
            currentGenesisEthlizardStaked--;

            // Transfer the token
            transferFrom(msg.sender, address(this), _genesisTokenIds[i]);
        }

        if (_regularTokenIds.length > 0) {
            Ethlizards.batchTransferFrom(address(this), msg.sender, _regularTokenIds);
        }
        if (_genesisTokenIds.length > 0) {
            GenesisLiz.batchTransferFrom(address(this), msg.sender, _genesisTokenIds);
        }
    }

    /**
     * @notice Allows a user to claim their rewards
     * @dev When users unstake their NFT, they will lose their rewards, and the funds
     * will be locked into the contract.
     * @param _tokenIds Array of Locked Lizard tokenIds
     * @param _poolNumber Number of the pool where the user is trying to claim rewards from
     */
    function claimReward(uint256[] calldata _tokenIds, uint256 _poolNumber) external {
        uint256 claimableRewards;

        for (uint256 i = 0; i < _tokenIds.length; i++) {
            if (originalLockedLizardOwners[_tokenIds[i]] != msg.sender) {
                revert CallerNotdepositor({depositor: originalLockedLizardOwners[_tokenIds[i]], caller: msg.sender});
            }

            if (isRewardsClaimed(_tokenIds[i], _poolNumber)) {
                revert RewardsAlreadyClaimed({tokenId: _tokenIds[i], poolNumber: _poolNumber});
            }

            if (timeLizardLocked[_tokenIds[i]] >= pool[_poolNumber].time) {
                revert TokenStakedAfterPoolCreation({
                    tokenStakedTime: timeLizardLocked[_tokenIds[i]],
                    poolTime: pool[_poolNumber].time
                });
            }

            // Rewards calculation
            if (_tokenIds[i] > MAXETHLIZARDID) {
                // Genesis tokens have 2x more rewards share
                claimableRewards += (claimCalculation(_tokenIds[i], _poolNumber)) * 2;
                stakePoolClaims[_tokenIds[i]][_poolNumber] = true;
                emit RewardsClaimed(_tokenIds[i], (claimCalculation(_tokenIds[i], _poolNumber)) * 2);
            } else {
                claimableRewards += claimCalculation(_tokenIds[i], _poolNumber);
                stakePoolClaims[_tokenIds[i]][_poolNumber] = true;
                emit RewardsClaimed(_tokenIds[i], (claimCalculation(_tokenIds[i], _poolNumber)));
            }
        }

        // Transfer the USDC rewards to the user, this function does not require approvals
        USDc.transfer(msg.sender, claimableRewards);
    }

    /// @dev Required implementation for a smart contract to receive ERC721 token
    function onERC721Received(address, address, uint256, bytes calldata) external pure returns (bytes4) {
        return IERC721Receiver.onERC721Received.selector;
    }

    /**
     * @notice Allows a user to send their Locked Lizard NFT back to the original depositor address
     * @dev As the claim function requires the user to hold the LLZ whilst also be the original depositor,
     * this function sends their LLZs back to them.
     * @param _tokenIds Array of Locked Lizard tokenIds
     */
    function retractLockedLizard(uint256[] calldata _tokenIds) external {
        for (uint256 i = 0; i < _tokenIds.length; i++) {
            if (originalLockedLizardOwners[_tokenIds[i]] != msg.sender) {
                revert CallerNotdepositor({depositor: originalLockedLizardOwners[_tokenIds[i]], caller: msg.sender});
            }

            _safeTransfer(
                ownerOf(_tokenIds[i]),
                (originalLockedLizardOwners[_tokenIds[i]]),
                /// @dev Don't think using msg.sender here is as safe as this
                _tokenIds[i],
                ""
            );
        }
    }

    /**
     * @notice Allows an approved council address to deposit rewards
     * @dev Council members deposit USDC, and once the deposited rewards reach the minResetValue,
     * a new pool is created and the currentRewards counter is reset.
     * @param _depositAmount Amount of USDC to withdrawal, in 6 DP
     */
    function depositRewards(uint256 _depositAmount) external {
        if (msg.sender != councilAddress) {
            revert AddressNotCouncil({council: councilAddress, caller: msg.sender});
        }
        USDc.transferFrom(msg.sender, address(this), _depositAmount);
        currentRewards += _depositAmount;
        totalRewardsInvested += _depositAmount;
        if (currentRewards >= minResetValue) {
            resetCounter++;
            createPool(currentRewards);
        }

        emit RewardsDeposited(_depositAmount);
    }

    /**
     * @notice Checks if a lizard is withdrawable
     * @dev A lizard is withdrawable if it been over minLockedTime since it was deposited
     * @param _tokenId TokenId of the lizard
     */
    function isLizardWithdrawable(uint256 _tokenId) public view returns (bool) {
        if (block.timestamp - timeLizardLocked[_tokenId] >= minLockedTime) {
            return true;
        } else {
            return false;
        }
    }

    /**
     * @notice Checks if the rewards of a lizard for a specific pool have been claimed
     * @dev Default mapping is false, when claim is made, mapping is updated to be true
     * @param _tokenId TokenId of the lizard
     * @param _poolNumber The pool number
     */
    function isRewardsClaimed(uint256 _tokenId, uint256 _poolNumber) public view returns (bool) {
        return stakePoolClaims[_tokenId][_poolNumber];
    }

    /**
     * @dev Overriden approval function to limit contract interactions and marketplace listings
     */
    function setApprovalForAll(address operator, bool approved) public override onlyApprovedContracts(operator) {
        super.setApprovalForAll(operator, approved);
    }

    /**
     * @dev Overriden approval function to limit contract interactions and marketplace listings
     */
    function approve(address operator, uint256 tokenId) public override onlyApprovedContracts(operator) {
        super.approve(operator, tokenId);
    }

    /**
     * @dev Flips the state of deposits, only called once.
     */
    function setDepositsActive() external onlyOwner {
        if (depositsActive) {
            revert DepositsAlreadyActive();
        }
        depositsActive = true;
        startTimestamp = block.timestamp;
        lastGlobalUpdate = block.timestamp;
    }

    /**
     * @notice This function can only be called by the EthlizardsDAO address
     *  This should only be used in emergency scenarios
     * @param _withdrawalAmount Amount of USDC to withdrawal, in 6 DP
     */
    function withdrawalToDAO(uint256 _withdrawalAmount) external {
        if (msg.sender != ethlizardsDAO) {
            revert AddressNotDAO();
        }
        USDc.transfer(msg.sender, _withdrawalAmount);
    }

    /**
     * @dev Sets contracts users are allowed to approve contract interactions with
     * @param _address Contract address where access is being modified
     * @param access The access of the address (false = users aren't allowed to approve, vice versa)
     */
    function setAllowedContracts(address _address, bool access) external onlyOwner {
        allowedContracts[_address] = access;
        emit AllowedContractsUpdated(_address, access);
    }

    /**
     * @dev Sets the reset value. Values are stored in percentages, 20 = 20% of inflation rewards kept per reset
     * @param _newShareResetValue New reset value
     */
    function setResetShareValue(uint256 _newShareResetValue) external onlyOwner {
        if (_newShareResetValue >= 100) {
            revert ShareResetTooHigh();
        }
        resetShareValue = _newShareResetValue;
        emit ResetShareValueUpdated(_newShareResetValue);
    }

    /**
     * @dev Whitelists a council address to be able to deposit rewards.
     * There can only be one council address at the same time.
     * @param _councilAddress The council's address
     */
    function setCouncilAddress(address _councilAddress) external onlyOwner {
        councilAddress = _councilAddress;
        emit CouncilAddressUpdated(_councilAddress);
    }

    /**
     * @dev Updates how long a user needs to stake before they can withdraw their NFT
     * @param _minLockedTime The amount of seconds a user needs to stake
     */
    function setMinLockedTime(uint256 _minLockedTime) external onlyOwner {
        minLockedTime = _minLockedTime;
        emit MinLockedTimeUpdated(minLockedTime);
    }

    /**
     * @dev Modifies the minimum value for a reset to occur and a new pool to be created
     * @param _newMinResetValue The minimum value for a reset, keep in mind USDC uses 6 decimal points
     * so an input of 100,000,000,000 would be 100,000 USDC
     */
    function setMinResetValue(uint256 _newMinResetValue) external onlyOwner {
        minResetValue = _newMinResetValue;
        emit MinResetValueUpdated(_newMinResetValue);
    }

    /**
     * @notice Updates metadata
     */
    function setBaseURI(string calldata _baseURI) external onlyOwner {
        baseURI = _baseURI;
        emit BaseURIUpdated(_baseURI);
    }

    /**
     * @notice Overriden tokenURI to accept ipfs links
     */
    function tokenURI(uint256 _tokenId) public view override returns (string memory) {
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, Strings.toString(_tokenId), ".json")) : "";
    }

    /**
     * @notice Gets the current raw share of an Ethlizard
     * @dev See technical documentation for how user's shares are calculated
     * @param _tokenId TokenId for which share is being calculated
     */
    function getCurrentShareRaw(uint256 _tokenId) public view returns (uint256) {
        // The current raw share which gets iterated over throughout the code
        uint256 currentShareRaw;

        // Counter for the current pool
        uint256 currPool;
        // Counter for the previous pool
        uint256 prevPool;

        // Case A: If there is only 1 pool, we do not need to factor into resets.
        // Case B: If no pools have been created after the user has staked, we do not need to factor in resets.
        if ((pool.length == 0) || (pool[pool.length - 1].time) < timeLizardLocked[_tokenId]) {
            currentShareRaw = calculateShareFromTime(block.timestamp, timeLizardLocked[_tokenId], DEFAULTLIZARDSHARE);
            return currentShareRaw;
        } // Case C: One or more pools created, but the user was staked before the creation of all of them.
        else if (timeLizardLocked[_tokenId] <= pool[0].time) {
            // Will always be the first pool because the the user is staked before creation of any pools
            currentShareRaw = calculateShareFromTime(pool[0].time, timeLizardLocked[_tokenId], DEFAULTLIZARDSHARE);

            currentShareRaw = resetShareRaw(currentShareRaw);
            // Setting the values for the loop
            currPool = 1;
            prevPool = currPool - 1;
        } // Case D: User was staked between 2 pools
        else {
            // Iterate through the pools and set currPool to the next pool created after user is staked.
            currPool = pool.length - 1;
            prevPool = currPool - 1;
            while (timeLizardLocked[_tokenId] < pool[prevPool].time) {
                currPool--;
                prevPool--;
            }
            // Calculate first share which is done by the first pool created after token staked
            currentShareRaw =
                calculateShareFromTime(pool[currPool].time, timeLizardLocked[_tokenId], DEFAULTLIZARDSHARE);
            currentShareRaw = resetShareRaw(currentShareRaw);
            currPool++;
            prevPool++;
        }

        // Counter for the last reset
        uint256 lastReset = pool.length - 1;

        // Looping over the pools
        while (currPool <= lastReset) {
            currentShareRaw = calculateShareFromTime(pool[currPool].time, pool[prevPool].time, currentShareRaw);
            currentShareRaw = resetShareRaw(currentShareRaw);
            currPool++;
            prevPool++;
        }

        // Finding the inflation between the current time and the last pool's reset's time.
        currentShareRaw = calculateShareFromTime(block.timestamp, pool[lastReset].time, currentShareRaw);
        return currentShareRaw;
    }

    /**
     * @notice Creates a new pool for rewards
     * @dev A new pool is created everytime a reset occurs, and they contain a user's rewards.
     * Reset of user's shares and inflation occurs after the values are pushed to the pool.
     */
    function createPool(uint256 _value) internal {
        updateGlobalShares();
        pool.push(Pool(block.timestamp, _value, overallShare));
        currentRewards = 0;
        resetGlobalShares();
    }

    /**
     * @notice Resets the inflation for a user's shares
     * @dev See technical documentation for how shares are calculated
     */
    function resetGlobalShares() internal {
        uint256 nonInflatedOverallShare =
            (currentEthlizardStaked * DEFAULTLIZARDSHARE) + (currentGenesisEthlizardStaked * DEFAULTLIZARDSHARE * 2);

        overallShare = (((overallShare - nonInflatedOverallShare) * resetShareValue) / 100) + (nonInflatedOverallShare);
    }

    /**
     * @notice Updates the global counter shares
     * @dev See technical documentation for how shares are calculated
     */
    function updateGlobalShares() internal {
        uint256 requiredRebases = ((block.timestamp - lastGlobalUpdate) / 1 days);
        if (requiredRebases >= 1) {
            overallShare = ((overallShare * calculateRebasePercentage(requiredRebases)) / 1e18);
            rebaseCounter += requiredRebases;
            lastGlobalUpdate += requiredRebases * 1 days;
        }
    }

    /**
     * @notice Calculates the rewards of a tokenId for the specific pool
     * @param _tokenId The tokenId which rewards are being claimed
     * @param _poolNumber The pool in which rewards are being claimed from
     */

    function claimCalculation(uint256 _tokenId, uint256 _poolNumber) public view returns (uint256 owedAmount) {
        // The current raw share which gets iterated over throughout the code
        uint256 currentShareRaw;
        // Counter for the current pool
        uint256 currPool;
        // Counter for the previous pool
        uint256 prevPool;

        // Case A: If there is only 1 pool, we do not need to factor into any resets
        if (_poolNumber == 0) {
            currentShareRaw =
                calculateShareFromTime(pool[_poolNumber].time, timeLizardLocked[_tokenId], DEFAULTLIZARDSHARE);
            owedAmount = (currentShareRaw * pool[_poolNumber].value) / pool[_poolNumber].currentGlobalShare;
            return owedAmount;
        } // Case B: One or more pools created, but the user was staked before the creation of all of them.
        else if (timeLizardLocked[_tokenId] <= pool[0].time) {
            // Second case runs if there has been at least 1 reset
            // and the user was staked before the first reset
            currentShareRaw = calculateShareFromTime(pool[0].time, timeLizardLocked[_tokenId], DEFAULTLIZARDSHARE);
            currPool = 1;
            prevPool = currPool - 1;
        } // Case C: User was staked between 2 pools
        else {
            // Iterate through the pools and set currPool to the next pool created after the user has staked.
            currPool = pool.length - 1;
            prevPool = currPool - 1;
            while (timeLizardLocked[_tokenId] < pool[prevPool].time) {
                currPool--;
                prevPool--;
            }
            // Calculate first share which is done by the first pool created after token staked
            currentShareRaw =
                calculateShareFromTime(pool[currPool].time, timeLizardLocked[_tokenId], DEFAULTLIZARDSHARE);
            currPool++;
            prevPool++;
        }

        // Loop to apply inflations
        while (currPool <= _poolNumber) {
            currentShareRaw = resetShareRaw(currentShareRaw);
            currentShareRaw = calculateShareFromTime(pool[currPool].time, pool[prevPool].time, currentShareRaw);
            prevPool++;
            currPool++;
        }
        // Calculate the rewards the user can claim
        owedAmount = (currentShareRaw * pool[_poolNumber].value) / pool[_poolNumber].currentGlobalShare;
        return owedAmount;
    }

    /**
     * @notice Takes 2 different unix timestamps and returns the inflation-applied raw share of it.
     * If 0 is called from requiredRebases, the rebase percentage will just be 1.
     */
    function calculateShareFromTime(uint256 _currentTime, uint256 _previousTime, uint256 _rawShare)
        internal
        view
        returns (uint256)
    {
        uint256 requiredRebases = ((_currentTime - startTimestamp) - (_previousTime - startTimestamp)) / 1 days;
        uint256 result = (_rawShare * calculateRebasePercentage(requiredRebases)) / 1e18;
        return result;
    }

    /**
     * @notice We calculate the 1.005^_requiredRebases via this function.
     * @dev See technical documents for how maths is calculated.
     *  We apply log laws to a compound interest formula which allows us to calculate
     *  values in big number form without overflow errors
     */
    function calculateRebasePercentage(uint256 _requiredRebases) internal view returns (uint256) {
        // Conversion of the uint256 rebases to int128 form
        // Divide by 2^64 as the converted result is in 64.64-bit fixed point form
        int128 requiredRebasesConverted = ABDKMath64x64.fromUInt(_requiredRebases) / (2 ** 64);
        // Using compound formula specified in technical documents
        int128 calculation = (ABDKMath64x64.log_2(nominator) * requiredRebasesConverted);
        int128 result = (ABDKMath64x64.exp_2(calculation) * 1e16);
        uint256 uintResult = ABDKMath64x64.toUInt(result) * 1e2;
        return uintResult;
    }

    /**
     * @dev Maths function to apply a reset to a user's shares
     * @param _currentShareRaw The raw share where inflation is being slashed
     */
    function resetShareRaw(uint256 _currentShareRaw) internal view returns (uint256) {
        return (((_currentShareRaw - DEFAULTLIZARDSHARE) * resetShareValue) / 100) + (DEFAULTLIZARDSHARE);
    }

    /**
     * @notice Calls ERC721's mint function
     * @param _tokenId TokenId being minted
     */
    function mintLLZ(uint256 _tokenId) internal {
        _mint(msg.sender, _tokenId);
        emit LockedLizardMinted(msg.sender, _tokenId);
    }

    ////////////
    // Errors //
    ////////////

    // User is trying to approve contract interactions with a contract that hasn't been whitelisted
    error NotWhitelistedContract();
    // Deposits are not enabled yet
    error DepositsInactive();
    // The address isn't the same address as the depositor
    error CallerNotdepositor(address depositor, address caller);
    // The lizard has not passed the minimum lockup term and is not withdrawable
    error LizardNotWithdrawable();
    // Rewards have already been claimed for the lizard
    error RewardsAlreadyClaimed(uint256 tokenId, uint256 poolNumber);
    // Address isn't the council
    error AddressNotCouncil(address council, address caller);
    // Address isn't the Ethlizards DAO address
    error AddressNotDAO();
    // _newShareResetValue value cannot be more than 100%
    error ShareResetTooHigh();
    // Deposits are already active
    error DepositsAlreadyActive();
    // Tokens must have been staked prior to a pools creation
    error TokenStakedAfterPoolCreation(uint256 tokenStakedTime, uint256 poolTime);
    // No contract interactions
    error CallerNotAnAddress();
}

File 2 of 16 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.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.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @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) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing 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 {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

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

File 3 of 16 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: address zero is not a valid owner");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _ownerOf(tokenId);
        require(owner != address(0), "ERC721: invalid token ID");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        _requireMinted(tokenId);

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overridden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not token owner or approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        _requireMinted(tokenId);

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved");
        _safeTransfer(from, to, tokenId, data);
    }

    /**
     * @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.
     *
     * `data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist
     */
    function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
        return _owners[tokenId];
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _ownerOf(tokenId) != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId, 1);

        // Check that tokenId was not minted by `_beforeTokenTransfer` hook
        require(!_exists(tokenId), "ERC721: token already minted");

        unchecked {
            // Will not overflow unless all 2**256 token ids are minted to the same owner.
            // Given that tokens are minted one by one, it is impossible in practice that
            // this ever happens. Might change if we allow batch minting.
            // The ERC fails to describe this case.
            _balances[to] += 1;
        }

        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);

        _afterTokenTransfer(address(0), to, tokenId, 1);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     * This is an internal function that does not check if the sender is authorized to operate on the token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId, 1);

        // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook
        owner = ERC721.ownerOf(tokenId);

        // Clear approvals
        delete _tokenApprovals[tokenId];

        unchecked {
            // Cannot overflow, as that would require more tokens to be burned/transferred
            // out than the owner initially received through minting and transferring in.
            _balances[owner] -= 1;
        }
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);

        _afterTokenTransfer(owner, address(0), tokenId, 1);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId, 1);

        // Check that tokenId was not transferred by `_beforeTokenTransfer` hook
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");

        // Clear approvals from the previous owner
        delete _tokenApprovals[tokenId];

        unchecked {
            // `_balances[from]` cannot overflow for the same reason as described in `_burn`:
            // `from`'s balance is the number of token held, which is at least one before the current
            // transfer.
            // `_balances[to]` could overflow in the conditions described in `_mint`. That would require
            // all 2**256 token ids to be minted, which in practice is impossible.
            _balances[from] -= 1;
            _balances[to] += 1;
        }
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId, 1);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits an {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits an {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Reverts if the `tokenId` has not been minted yet.
     */
    function _requireMinted(uint256 tokenId) internal view virtual {
        require(_exists(tokenId), "ERC721: invalid token ID");
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    /// @solidity memory-safe-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.
     * - When `from` is zero, the tokens will be minted for `to`.
     * - When `to` is zero, ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256, /* firstTokenId */
        uint256 batchSize
    ) internal virtual {
        if (batchSize > 1) {
            if (from != address(0)) {
                _balances[from] -= batchSize;
            }
            if (to != address(0)) {
                _balances[to] += batchSize;
            }
        }
    }

    /**
     * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.
     * - When `from` is zero, the tokens were minted for `to`.
     * - When `to` is zero, ``from``'s tokens were burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize
    ) internal virtual {}
}

File 4 of 16 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../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 caller.
     *
     * 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 5 of 16 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @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 6 of 16 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../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 7 of 16 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) 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(errorMessage);
        }
    }
}

File 8 of 16 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

File 9 of 16 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";

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

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

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

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

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

File 10 of 16 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 11 of 16 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @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 12 of 16 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // 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].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 13 of 16 : ABDKMath64x64.sol
// SPDX-License-Identifier: BSD-4-Clause
/*
 * ABDK Math 64.64 Smart Contract Library.  Copyright © 2019 by ABDK Consulting.
 * Author: Mikhail Vladimirov <[email protected]>
 */
pragma solidity 0.8.17;

/**
 * Smart contract library of mathematical functions operating with signed
 * 64.64-bit fixed point numbers.  Signed 64.64-bit fixed point number is
 * basically a simple fraction whose numerator is signed 128-bit integer and
 * denominator is 2^64.  As long as denominator is always the same, there is no
 * need to store it, thus in Solidity signed 64.64-bit fixed point numbers are
 * represented by int128 type holding only the numerator.
 */
library ABDKMath64x64 {
    /*
    * Minimum value signed 64.64-bit fixed point number may have. 
    */
    int128 private constant MIN_64x64 = -0x80000000000000000000000000000000;

    /*
    * Maximum value signed 64.64-bit fixed point number may have. 
    */
    int128 private constant MAX_64x64 = 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;

    /**
     * Convert signed 256-bit integer number into signed 64.64-bit fixed point
     * number.  Revert on overflow.
     *
     * @param x signed 256-bit integer number
     * @return signed 64.64-bit fixed point number
     */
    function fromInt(int256 x) internal pure returns (int128) {
        unchecked {
            require(x >= -0x8000000000000000 && x <= 0x7FFFFFFFFFFFFFFF);
            return int128(x << 64);
        }
    }

    /**
     * Convert signed 64.64 fixed point number into signed 64-bit integer number
     * rounding down.
     *
     * @param x signed 64.64-bit fixed point number
     * @return signed 64-bit integer number
     */
    function toInt(int128 x) internal pure returns (int64) {
        unchecked {
            return int64(x >> 64);
        }
    }

    /**
     * Convert unsigned 256-bit integer number into signed 64.64-bit fixed point
     * number.  Revert on overflow.
     *
     * @param x unsigned 256-bit integer number
     * @return signed 64.64-bit fixed point number
     */
    function fromUInt(uint256 x) internal pure returns (int128) {
        unchecked {
            require(x <= 0x7FFFFFFFFFFFFFFF);
            return int128(int256(x << 64));
        }
    }

    /**
     * Convert signed 64.64 fixed point number into unsigned 64-bit integer
     * number rounding down.  Revert on underflow.
     *
     * @param x signed 64.64-bit fixed point number
     * @return unsigned 64-bit integer number
     */
    function toUInt(int128 x) internal pure returns (uint64) {
        unchecked {
            require(x >= 0);
            return uint64(uint128(x >> 64));
        }
    }

    /**
     * Convert signed 128.128 fixed point number into signed 64.64-bit fixed point
     * number rounding down.  Revert on overflow.
     *
     * @param x signed 128.128-bin fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function from128x128(int256 x) internal pure returns (int128) {
        unchecked {
            int256 result = x >> 64;
            require(result >= MIN_64x64 && result <= MAX_64x64);
            return int128(result);
        }
    }

    /**
     * Convert signed 64.64 fixed point number into signed 128.128 fixed point
     * number.
     *
     * @param x signed 64.64-bit fixed point number
     * @return signed 128.128 fixed point number
     */
    function to128x128(int128 x) internal pure returns (int256) {
        unchecked {
            return int256(x) << 64;
        }
    }

    /**
     * Calculate x + y.  Revert on overflow.
     *
     * @param x signed 64.64-bit fixed point number
     * @param y signed 64.64-bit fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function add(int128 x, int128 y) internal pure returns (int128) {
        unchecked {
            int256 result = int256(x) + y;
            require(result >= MIN_64x64 && result <= MAX_64x64);
            return int128(result);
        }
    }

    /**
     * Calculate x - y.  Revert on overflow.
     *
     * @param x signed 64.64-bit fixed point number
     * @param y signed 64.64-bit fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function sub(int128 x, int128 y) internal pure returns (int128) {
        unchecked {
            int256 result = int256(x) - y;
            require(result >= MIN_64x64 && result <= MAX_64x64);
            return int128(result);
        }
    }

    /**
     * Calculate x * y rounding down.  Revert on overflow.
     *
     * @param x signed 64.64-bit fixed point number
     * @param y signed 64.64-bit fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function mul(int128 x, int128 y) internal pure returns (int128) {
        unchecked {
            int256 result = int256(x) * y >> 64;
            require(result >= MIN_64x64 && result <= MAX_64x64);
            return int128(result);
        }
    }

    /**
     * Calculate x * y rounding towards zero, where x is signed 64.64 fixed point
     * number and y is signed 256-bit integer number.  Revert on overflow.
     *
     * @param x signed 64.64 fixed point number
     * @param y signed 256-bit integer number
     * @return signed 256-bit integer number
     */
    function muli(int128 x, int256 y) internal pure returns (int256) {
        unchecked {
            if (x == MIN_64x64) {
                require(
                    y >= -0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
                        && y <= 0x1000000000000000000000000000000000000000000000000
                );
                return -y << 63;
            } else {
                bool negativeResult = false;
                if (x < 0) {
                    x = -x;
                    negativeResult = true;
                }
                if (y < 0) {
                    y = -y; // We rely on overflow behavior here
                    negativeResult = !negativeResult;
                }
                uint256 absoluteResult = mulu(x, uint256(y));
                if (negativeResult) {
                    require(absoluteResult <= 0x8000000000000000000000000000000000000000000000000000000000000000);
                    return -int256(absoluteResult); // We rely on overflow behavior here
                } else {
                    require(absoluteResult <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);
                    return int256(absoluteResult);
                }
            }
        }
    }

    /**
     * Calculate x * y rounding down, where x is signed 64.64 fixed point number
     * and y is unsigned 256-bit integer number.  Revert on overflow.
     *
     * @param x signed 64.64 fixed point number
     * @param y unsigned 256-bit integer number
     * @return unsigned 256-bit integer number
     */
    function mulu(int128 x, uint256 y) internal pure returns (uint256) {
        unchecked {
            if (y == 0) return 0;

            require(x >= 0);

            uint256 lo = (uint256(int256(x)) * (y & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)) >> 64;
            uint256 hi = uint256(int256(x)) * (y >> 128);

            require(hi <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);
            hi <<= 64;

            require(hi <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - lo);
            return hi + lo;
        }
    }

    /**
     * Calculate x / y rounding towards zero.  Revert on overflow or when y is
     * zero.
     *
     * @param x signed 64.64-bit fixed point number
     * @param y signed 64.64-bit fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function div(int128 x, int128 y) internal pure returns (int128) {
        unchecked {
            require(y != 0);
            int256 result = (int256(x) << 64) / y;
            require(result >= MIN_64x64 && result <= MAX_64x64);
            return int128(result);
        }
    }

    /**
     * Calculate x / y rounding towards zero, where x and y are signed 256-bit
     * integer numbers.  Revert on overflow or when y is zero.
     *
     * @param x signed 256-bit integer number
     * @param y signed 256-bit integer number
     * @return signed 64.64-bit fixed point number
     */
    function divi(int256 x, int256 y) internal pure returns (int128) {
        unchecked {
            require(y != 0);

            bool negativeResult = false;
            if (x < 0) {
                x = -x; // We rely on overflow behavior here
                negativeResult = true;
            }
            if (y < 0) {
                y = -y; // We rely on overflow behavior here
                negativeResult = !negativeResult;
            }
            uint128 absoluteResult = divuu(uint256(x), uint256(y));
            if (negativeResult) {
                require(absoluteResult <= 0x80000000000000000000000000000000);
                return -int128(absoluteResult); // We rely on overflow behavior here
            } else {
                require(absoluteResult <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);
                return int128(absoluteResult); // We rely on overflow behavior here
            }
        }
    }

    /**
     * Calculate x / y rounding towards zero, where x and y are unsigned 256-bit
     * integer numbers.  Revert on overflow or when y is zero.
     *
     * @param x unsigned 256-bit integer number
     * @param y unsigned 256-bit integer number
     * @return signed 64.64-bit fixed point number
     */
    function divu(uint256 x, uint256 y) internal pure returns (int128) {
        unchecked {
            require(y != 0);
            uint128 result = divuu(x, y);
            require(result <= uint128(MAX_64x64));
            return int128(result);
        }
    }

    /**
     * Calculate -x.  Revert on overflow.
     *
     * @param x signed 64.64-bit fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function neg(int128 x) internal pure returns (int128) {
        unchecked {
            require(x != MIN_64x64);
            return -x;
        }
    }

    /**
     * Calculate |x|.  Revert on overflow.
     *
     * @param x signed 64.64-bit fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function abs(int128 x) internal pure returns (int128) {
        unchecked {
            require(x != MIN_64x64);
            return x < 0 ? -x : x;
        }
    }

    /**
     * Calculate 1 / x rounding towards zero.  Revert on overflow or when x is
     * zero.
     *
     * @param x signed 64.64-bit fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function inv(int128 x) internal pure returns (int128) {
        unchecked {
            require(x != 0);
            int256 result = int256(0x100000000000000000000000000000000) / x;
            require(result >= MIN_64x64 && result <= MAX_64x64);
            return int128(result);
        }
    }

    /**
     * Calculate arithmetics average of x and y, i.e. (x + y) / 2 rounding down.
     *
     * @param x signed 64.64-bit fixed point number
     * @param y signed 64.64-bit fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function avg(int128 x, int128 y) internal pure returns (int128) {
        unchecked {
            return int128((int256(x) + int256(y)) >> 1);
        }
    }

    /**
     * Calculate geometric average of x and y, i.e. sqrt (x * y) rounding down.
     * Revert on overflow or in case x * y is negative.
     *
     * @param x signed 64.64-bit fixed point number
     * @param y signed 64.64-bit fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function gavg(int128 x, int128 y) internal pure returns (int128) {
        unchecked {
            int256 m = int256(x) * int256(y);
            require(m >= 0);
            require(m < 0x4000000000000000000000000000000000000000000000000000000000000000);
            return int128(sqrtu(uint256(m)));
        }
    }

    /**
     * Calculate x^y assuming 0^0 is 1, where x is signed 64.64 fixed point number
     * and y is unsigned 256-bit integer number.  Revert on overflow.
     *
     * @param x signed 64.64-bit fixed point number
     * @param y uint256 value
     * @return signed 64.64-bit fixed point number
     */
    function pow(int128 x, uint256 y) internal pure returns (int128) {
        unchecked {
            bool negative = x < 0 && y & 1 == 1;

            uint256 absX = uint128(x < 0 ? -x : x);
            uint256 absResult;
            absResult = 0x100000000000000000000000000000000;

            if (absX <= 0x10000000000000000) {
                absX <<= 63;
                while (y != 0) {
                    if (y & 0x1 != 0) {
                        absResult = absResult * absX >> 127;
                    }
                    absX = absX * absX >> 127;

                    if (y & 0x2 != 0) {
                        absResult = absResult * absX >> 127;
                    }
                    absX = absX * absX >> 127;

                    if (y & 0x4 != 0) {
                        absResult = absResult * absX >> 127;
                    }
                    absX = absX * absX >> 127;

                    if (y & 0x8 != 0) {
                        absResult = absResult * absX >> 127;
                    }
                    absX = absX * absX >> 127;

                    y >>= 4;
                }

                absResult >>= 64;
            } else {
                uint256 absXShift = 63;
                if (absX < 0x1000000000000000000000000) {
                    absX <<= 32;
                    absXShift -= 32;
                }
                if (absX < 0x10000000000000000000000000000) {
                    absX <<= 16;
                    absXShift -= 16;
                }
                if (absX < 0x1000000000000000000000000000000) {
                    absX <<= 8;
                    absXShift -= 8;
                }
                if (absX < 0x10000000000000000000000000000000) {
                    absX <<= 4;
                    absXShift -= 4;
                }
                if (absX < 0x40000000000000000000000000000000) {
                    absX <<= 2;
                    absXShift -= 2;
                }
                if (absX < 0x80000000000000000000000000000000) {
                    absX <<= 1;
                    absXShift -= 1;
                }

                uint256 resultShift = 0;
                while (y != 0) {
                    require(absXShift < 64);

                    if (y & 0x1 != 0) {
                        absResult = absResult * absX >> 127;
                        resultShift += absXShift;
                        if (absResult > 0x100000000000000000000000000000000) {
                            absResult >>= 1;
                            resultShift += 1;
                        }
                    }
                    absX = absX * absX >> 127;
                    absXShift <<= 1;
                    if (absX >= 0x100000000000000000000000000000000) {
                        absX >>= 1;
                        absXShift += 1;
                    }

                    y >>= 1;
                }

                require(resultShift < 64);
                absResult >>= 64 - resultShift;
            }
            int256 result = negative ? -int256(absResult) : int256(absResult);
            require(result >= MIN_64x64 && result <= MAX_64x64);
            return int128(result);
        }
    }

    /**
     * Calculate sqrt (x) rounding down.  Revert if x < 0.
     *
     * @param x signed 64.64-bit fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function sqrt(int128 x) internal pure returns (int128) {
        unchecked {
            require(x >= 0);
            return int128(sqrtu(uint256(int256(x)) << 64));
        }
    }

    /**
     * Calculate binary logarithm of x.  Revert if x <= 0.
     *
     * @param x signed 64.64-bit fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function log_2(int128 x) internal pure returns (int128) {
        unchecked {
            require(x > 0);

            int256 msb = 0;
            int256 xc = x;
            if (xc >= 0x10000000000000000) {
                xc >>= 64;
                msb += 64;
            }
            if (xc >= 0x100000000) {
                xc >>= 32;
                msb += 32;
            }
            if (xc >= 0x10000) {
                xc >>= 16;
                msb += 16;
            }
            if (xc >= 0x100) {
                xc >>= 8;
                msb += 8;
            }
            if (xc >= 0x10) {
                xc >>= 4;
                msb += 4;
            }
            if (xc >= 0x4) {
                xc >>= 2;
                msb += 2;
            }
            if (xc >= 0x2) msb += 1; // No need to shift xc anymore

            int256 result = msb - 64 << 64;
            uint256 ux = uint256(int256(x)) << uint256(127 - msb);
            for (int256 bit = 0x8000000000000000; bit > 0; bit >>= 1) {
                ux *= ux;
                uint256 b = ux >> 255;
                ux >>= 127 + b;
                result += bit * int256(b);
            }

            return int128(result);
        }
    }

    /**
     * Calculate natural logarithm of x.  Revert if x <= 0.
     *
     * @param x signed 64.64-bit fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function ln(int128 x) internal pure returns (int128) {
        unchecked {
            require(x > 0);

            return int128(int256(uint256(int256(log_2(x))) * 0xB17217F7D1CF79ABC9E3B39803F2F6AF >> 128));
        }
    }

    /**
     * Calculate binary exponent of x.  Revert on overflow.
     *
     * @param x signed 64.64-bit fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function exp_2(int128 x) internal pure returns (int128) {
        unchecked {
            require(x < 0x400000000000000000); // Overflow

            if (x < -0x400000000000000000) return 0; // Underflow

            uint256 result = 0x80000000000000000000000000000000;

            if (x & 0x8000000000000000 > 0) {
                result = result * 0x16A09E667F3BCC908B2FB1366EA957D3E >> 128;
            }
            if (x & 0x4000000000000000 > 0) {
                result = result * 0x1306FE0A31B7152DE8D5A46305C85EDEC >> 128;
            }
            if (x & 0x2000000000000000 > 0) {
                result = result * 0x1172B83C7D517ADCDF7C8C50EB14A791F >> 128;
            }
            if (x & 0x1000000000000000 > 0) {
                result = result * 0x10B5586CF9890F6298B92B71842A98363 >> 128;
            }
            if (x & 0x800000000000000 > 0) {
                result = result * 0x1059B0D31585743AE7C548EB68CA417FD >> 128;
            }
            if (x & 0x400000000000000 > 0) {
                result = result * 0x102C9A3E778060EE6F7CACA4F7A29BDE8 >> 128;
            }
            if (x & 0x200000000000000 > 0) {
                result = result * 0x10163DA9FB33356D84A66AE336DCDFA3F >> 128;
            }
            if (x & 0x100000000000000 > 0) {
                result = result * 0x100B1AFA5ABCBED6129AB13EC11DC9543 >> 128;
            }
            if (x & 0x80000000000000 > 0) {
                result = result * 0x10058C86DA1C09EA1FF19D294CF2F679B >> 128;
            }
            if (x & 0x40000000000000 > 0) {
                result = result * 0x1002C605E2E8CEC506D21BFC89A23A00F >> 128;
            }
            if (x & 0x20000000000000 > 0) {
                result = result * 0x100162F3904051FA128BCA9C55C31E5DF >> 128;
            }
            if (x & 0x10000000000000 > 0) {
                result = result * 0x1000B175EFFDC76BA38E31671CA939725 >> 128;
            }
            if (x & 0x8000000000000 > 0) {
                result = result * 0x100058BA01FB9F96D6CACD4B180917C3D >> 128;
            }
            if (x & 0x4000000000000 > 0) {
                result = result * 0x10002C5CC37DA9491D0985C348C68E7B3 >> 128;
            }
            if (x & 0x2000000000000 > 0) {
                result = result * 0x1000162E525EE054754457D5995292026 >> 128;
            }
            if (x & 0x1000000000000 > 0) {
                result = result * 0x10000B17255775C040618BF4A4ADE83FC >> 128;
            }
            if (x & 0x800000000000 > 0) {
                result = result * 0x1000058B91B5BC9AE2EED81E9B7D4CFAB >> 128;
            }
            if (x & 0x400000000000 > 0) {
                result = result * 0x100002C5C89D5EC6CA4D7C8ACC017B7C9 >> 128;
            }
            if (x & 0x200000000000 > 0) {
                result = result * 0x10000162E43F4F831060E02D839A9D16D >> 128;
            }
            if (x & 0x100000000000 > 0) {
                result = result * 0x100000B1721BCFC99D9F890EA06911763 >> 128;
            }
            if (x & 0x80000000000 > 0) {
                result = result * 0x10000058B90CF1E6D97F9CA14DBCC1628 >> 128;
            }
            if (x & 0x40000000000 > 0) {
                result = result * 0x1000002C5C863B73F016468F6BAC5CA2B >> 128;
            }
            if (x & 0x20000000000 > 0) {
                result = result * 0x100000162E430E5A18F6119E3C02282A5 >> 128;
            }
            if (x & 0x10000000000 > 0) {
                result = result * 0x1000000B1721835514B86E6D96EFD1BFE >> 128;
            }
            if (x & 0x8000000000 > 0) {
                result = result * 0x100000058B90C0B48C6BE5DF846C5B2EF >> 128;
            }
            if (x & 0x4000000000 > 0) {
                result = result * 0x10000002C5C8601CC6B9E94213C72737A >> 128;
            }
            if (x & 0x2000000000 > 0) {
                result = result * 0x1000000162E42FFF037DF38AA2B219F06 >> 128;
            }
            if (x & 0x1000000000 > 0) {
                result = result * 0x10000000B17217FBA9C739AA5819F44F9 >> 128;
            }
            if (x & 0x800000000 > 0) {
                result = result * 0x1000000058B90BFCDEE5ACD3C1CEDC823 >> 128;
            }
            if (x & 0x400000000 > 0) {
                result = result * 0x100000002C5C85FE31F35A6A30DA1BE50 >> 128;
            }
            if (x & 0x200000000 > 0) {
                result = result * 0x10000000162E42FF0999CE3541B9FFFCF >> 128;
            }
            if (x & 0x100000000 > 0) {
                result = result * 0x100000000B17217F80F4EF5AADDA45554 >> 128;
            }
            if (x & 0x80000000 > 0) {
                result = result * 0x10000000058B90BFBF8479BD5A81B51AD >> 128;
            }
            if (x & 0x40000000 > 0) {
                result = result * 0x1000000002C5C85FDF84BD62AE30A74CC >> 128;
            }
            if (x & 0x20000000 > 0) {
                result = result * 0x100000000162E42FEFB2FED257559BDAA >> 128;
            }
            if (x & 0x10000000 > 0) {
                result = result * 0x1000000000B17217F7D5A7716BBA4A9AE >> 128;
            }
            if (x & 0x8000000 > 0) {
                result = result * 0x100000000058B90BFBE9DDBAC5E109CCE >> 128;
            }
            if (x & 0x4000000 > 0) {
                result = result * 0x10000000002C5C85FDF4B15DE6F17EB0D >> 128;
            }
            if (x & 0x2000000 > 0) {
                result = result * 0x1000000000162E42FEFA494F1478FDE05 >> 128;
            }
            if (x & 0x1000000 > 0) {
                result = result * 0x10000000000B17217F7D20CF927C8E94C >> 128;
            }
            if (x & 0x800000 > 0) {
                result = result * 0x1000000000058B90BFBE8F71CB4E4B33D >> 128;
            }
            if (x & 0x400000 > 0) {
                result = result * 0x100000000002C5C85FDF477B662B26945 >> 128;
            }
            if (x & 0x200000 > 0) {
                result = result * 0x10000000000162E42FEFA3AE53369388C >> 128;
            }
            if (x & 0x100000 > 0) {
                result = result * 0x100000000000B17217F7D1D351A389D40 >> 128;
            }
            if (x & 0x80000 > 0) {
                result = result * 0x10000000000058B90BFBE8E8B2D3D4EDE >> 128;
            }
            if (x & 0x40000 > 0) {
                result = result * 0x1000000000002C5C85FDF4741BEA6E77E >> 128;
            }
            if (x & 0x20000 > 0) {
                result = result * 0x100000000000162E42FEFA39FE95583C2 >> 128;
            }
            if (x & 0x10000 > 0) {
                result = result * 0x1000000000000B17217F7D1CFB72B45E1 >> 128;
            }
            if (x & 0x8000 > 0) {
                result = result * 0x100000000000058B90BFBE8E7CC35C3F0 >> 128;
            }
            if (x & 0x4000 > 0) {
                result = result * 0x10000000000002C5C85FDF473E242EA38 >> 128;
            }
            if (x & 0x2000 > 0) {
                result = result * 0x1000000000000162E42FEFA39F02B772C >> 128;
            }
            if (x & 0x1000 > 0) {
                result = result * 0x10000000000000B17217F7D1CF7D83C1A >> 128;
            }
            if (x & 0x800 > 0) {
                result = result * 0x1000000000000058B90BFBE8E7BDCBE2E >> 128;
            }
            if (x & 0x400 > 0) {
                result = result * 0x100000000000002C5C85FDF473DEA871F >> 128;
            }
            if (x & 0x200 > 0) {
                result = result * 0x10000000000000162E42FEFA39EF44D91 >> 128;
            }
            if (x & 0x100 > 0) {
                result = result * 0x100000000000000B17217F7D1CF79E949 >> 128;
            }
            if (x & 0x80 > 0) {
                result = result * 0x10000000000000058B90BFBE8E7BCE544 >> 128;
            }
            if (x & 0x40 > 0) {
                result = result * 0x1000000000000002C5C85FDF473DE6ECA >> 128;
            }
            if (x & 0x20 > 0) {
                result = result * 0x100000000000000162E42FEFA39EF366F >> 128;
            }
            if (x & 0x10 > 0) {
                result = result * 0x1000000000000000B17217F7D1CF79AFA >> 128;
            }
            if (x & 0x8 > 0) {
                result = result * 0x100000000000000058B90BFBE8E7BCD6D >> 128;
            }
            if (x & 0x4 > 0) {
                result = result * 0x10000000000000002C5C85FDF473DE6B2 >> 128;
            }
            if (x & 0x2 > 0) {
                result = result * 0x1000000000000000162E42FEFA39EF358 >> 128;
            }
            if (x & 0x1 > 0) {
                result = result * 0x10000000000000000B17217F7D1CF79AB >> 128;
            }

            result >>= uint256(int256(63 - (x >> 64)));
            require(result <= uint256(int256(MAX_64x64)));

            return int128(int256(result));
        }
    }

    /**
     * Calculate natural exponent of x.  Revert on overflow.
     *
     * @param x signed 64.64-bit fixed point number
     * @return signed 64.64-bit fixed point number
     */
    function exp(int128 x) internal pure returns (int128) {
        unchecked {
            require(x < 0x400000000000000000); // Overflow

            if (x < -0x400000000000000000) return 0; // Underflow

            return exp_2(int128(int256(x) * 0x171547652B82FE1777D0FFDA0D23A7D12 >> 128));
        }
    }

    /**
     * Calculate x / y rounding towards zero, where x and y are unsigned 256-bit
     * integer numbers.  Revert on overflow or when y is zero.
     *
     * @param x unsigned 256-bit integer number
     * @param y unsigned 256-bit integer number
     * @return unsigned 64.64-bit fixed point number
     */
    function divuu(uint256 x, uint256 y) private pure returns (uint128) {
        unchecked {
            require(y != 0);

            uint256 result;

            if (x <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) {
                result = (x << 64) / y;
            } else {
                uint256 msb = 192;
                uint256 xc = x >> 192;
                if (xc >= 0x100000000) {
                    xc >>= 32;
                    msb += 32;
                }
                if (xc >= 0x10000) {
                    xc >>= 16;
                    msb += 16;
                }
                if (xc >= 0x100) {
                    xc >>= 8;
                    msb += 8;
                }
                if (xc >= 0x10) {
                    xc >>= 4;
                    msb += 4;
                }
                if (xc >= 0x4) {
                    xc >>= 2;
                    msb += 2;
                }
                if (xc >= 0x2) msb += 1; // No need to shift xc anymore

                result = (x << 255 - msb) / ((y - 1 >> msb - 191) + 1);
                require(result <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);

                uint256 hi = result * (y >> 128);
                uint256 lo = result * (y & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);

                uint256 xh = x >> 192;
                uint256 xl = x << 64;

                if (xl < lo) xh -= 1;
                xl -= lo; // We rely on overflow behavior here
                lo = hi << 128;
                if (xl < lo) xh -= 1;
                xl -= lo; // We rely on overflow behavior here

                assert(xh == hi >> 128);

                result += xl / y;
            }

            require(result <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);
            return uint128(result);
        }
    }

    /**
     * Calculate sqrt (x) rounding down, where x is unsigned 256-bit integer
     * number.
     *
     * @param x unsigned 256-bit integer number
     * @return unsigned 128-bit integer number
     */
    function sqrtu(uint256 x) private pure returns (uint128) {
        unchecked {
            if (x == 0) {
                return 0;
            } else {
                uint256 xx = x;
                uint256 r = 1;
                if (xx >= 0x100000000000000000000000000000000) {
                    xx >>= 128;
                    r <<= 64;
                }
                if (xx >= 0x10000000000000000) {
                    xx >>= 64;
                    r <<= 32;
                }
                if (xx >= 0x100000000) {
                    xx >>= 32;
                    r <<= 16;
                }
                if (xx >= 0x10000) {
                    xx >>= 16;
                    r <<= 8;
                }
                if (xx >= 0x100) {
                    xx >>= 8;
                    r <<= 4;
                }
                if (xx >= 0x10) {
                    xx >>= 4;
                    r <<= 2;
                }
                if (xx >= 0x4) r <<= 1;
                r = (r + x / r) >> 1;
                r = (r + x / r) >> 1;
                r = (r + x / r) >> 1;
                r = (r + x / r) >> 1;
                r = (r + x / r) >> 1;
                r = (r + x / r) >> 1;
                r = (r + x / r) >> 1; // Seven iterations should be enough
                uint256 r1 = x / r;
                return uint128(r < r1 ? r : r1);
            }
        }
    }
}

File 14 of 16 : IEthLizards.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity 0.8.17;

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

interface IEthlizards is IERC721 {
    function batchTransferFrom(address _from, address _to, uint256[] calldata _tokenId) external;
}

File 15 of 16 : IGenesisEthLizards.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity 0.8.17;

interface IGenesisEthlizards {
    function batchTransferFrom(address _from, address _to, uint256[] calldata _tokenId) external;
}

File 16 of 16 : IUSDC.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity 0.8.17;

interface IUSDC {
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    function balanceOf(address _owner) external returns (uint256);

    function approve(address _spender, uint256 _value) external returns (bool success);

    function transfer(address to, uint256 value) external returns (bool);
}

Settings
{
  "remappings": [
    "@openzeppelin/=lib/openzeppelin-contracts/",
    "abdk-libraries-solidity/=lib/abdk-libraries-solidity/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 20000
  },
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IEthlizards","name":"ethLizardsAddress","type":"address"},{"internalType":"contract IGenesisEthlizards","name":"genesisLizaddress","type":"address"},{"internalType":"contract IUSDC","name":"USDCAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"council","type":"address"},{"internalType":"address","name":"caller","type":"address"}],"name":"AddressNotCouncil","type":"error"},{"inputs":[],"name":"AddressNotDAO","type":"error"},{"inputs":[],"name":"CallerNotAnAddress","type":"error"},{"inputs":[{"internalType":"address","name":"depositor","type":"address"},{"internalType":"address","name":"caller","type":"address"}],"name":"CallerNotdepositor","type":"error"},{"inputs":[],"name":"DepositsAlreadyActive","type":"error"},{"inputs":[],"name":"DepositsInactive","type":"error"},{"inputs":[],"name":"LizardNotWithdrawable","type":"error"},{"inputs":[],"name":"NotWhitelistedContract","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"poolNumber","type":"uint256"}],"name":"RewardsAlreadyClaimed","type":"error"},{"inputs":[],"name":"ShareResetTooHigh","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenStakedTime","type":"uint256"},{"internalType":"uint256","name":"poolTime","type":"uint256"}],"name":"TokenStakedAfterPoolCreation","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"allowedContract","type":"address"},{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"AllowedContractsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"newBaseuri","type":"string"}],"name":"BaseURIUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"councilAddress","type":"address"}],"name":"CouncilAddressUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"mintedAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"mintedId","type":"uint256"}],"name":"LockedLizardMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"ownerAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"lizardId","type":"uint256"}],"name":"LockedLizardReMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"minLockedTime","type":"uint256"}],"name":"MinLockedTimeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newMinResetValue","type":"uint256"}],"name":"MinResetValueUpdated","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":"uint256","name":"newResetShareValue","type":"uint256"}],"name":"ResetShareValueUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardsClaimed","type":"uint256"}],"name":"RewardsClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"depositAmount","type":"uint256"}],"name":"RewardsDeposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"Ethlizards","outputs":[{"internalType":"contract IEthlizards","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GenesisLiz","outputs":[{"internalType":"contract IGenesisEthlizards","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDc","outputs":[{"internalType":"contract IUSDC","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"allowedContracts","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_poolNumber","type":"uint256"}],"name":"claimCalculation","outputs":[{"internalType":"uint256","name":"owedAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"uint256","name":"_poolNumber","type":"uint256"}],"name":"claimReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"councilAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentEthlizardStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentGenesisEthlizardStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_depositAmount","type":"uint256"}],"name":"depositRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_regularTokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_genesisTokenIds","type":"uint256[]"}],"name":"depositStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ethlizardsDAO","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getCurrentShareRaw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"isLizardWithdrawable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_poolNumber","type":"uint256"}],"name":"isRewardsClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastGlobalUpdate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minLockedTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minResetValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nominator","outputs":[{"internalType":"int128","name":"","type":"int128"}],"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":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"originalLockedLizardOwners","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"overallShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rebaseCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resetCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"resetShareValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"retractLockedLizard","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"bool","name":"access","type":"bool"}],"name":"setAllowedContracts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_councilAddress","type":"address"}],"name":"setCouncilAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setDepositsActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minLockedTime","type":"uint256"}],"name":"setMinLockedTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newMinResetValue","type":"uint256"}],"name":"setMinResetValue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newShareResetValue","type":"uint256"}],"name":"setResetShareValue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"timeLizardLocked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalRewardsInvested","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_regularTokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_genesisTokenIds","type":"uint256[]"}],"name":"withdrawStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_withdrawalAmount","type":"uint256"}],"name":"withdrawalToDAO","outputs":[],"stateMutability":"nonpayable","type":"function"}]

600c805474a5d55281917936818665c6cb87959b6a147d930600610100600160a81b0319909116179055600060158181556014601655640ba43b74006017556276a700601855601991909155601a80546001600160801b03191668010147ae147ae147c817905561012060405260e09081527f68747470733a2f2f697066732e696f2f6970667378000000000000000000000061010052601b90620000a590826200026e565b50348015620000b357600080fd5b5060405162005aaa38038062005aaa833981016040819052620000d69162000353565b6040518060400160405280600d81526020016c131bd8dad95908131a5e985c99609a1b8152506040518060400160405280600381526020016226262d60e91b81525081600090816200012991906200026e565b5060016200013882826200026e565b505050620001556200014f6200017360201b60201c565b62000177565b6001600160a01b0392831660805290821660a0521660c052620003a7565b3390565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620001f457607f821691505b6020821081036200021557634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200026957600081815260208120601f850160051c81016020861015620002445750805b601f850160051c820191505b81811015620002655782815560010162000250565b5050505b505050565b81516001600160401b038111156200028a576200028a620001c9565b620002a2816200029b8454620001df565b846200021b565b602080601f831160018114620002da5760008415620002c15750858301515b600019600386901b1c1916600185901b17855562000265565b600085815260208120601f198616915b828110156200030b57888601518255948401946001909101908401620002ea565b50858210156200032a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b03811681146200035057600080fd5b50565b6000806000606084860312156200036957600080fd5b835162000376816200033a565b602085015190935062000389816200033a565b60408501519092506200039c816200033a565b809150509250925092565b60805160a05160c0516156a2620004086000396000818161078301528181611d1801528181611fbf0152612b6601526000818161068c01528181610e3e015261178f01526000818161072401528181610d8d01526116de01526156a26000f3fe608060405234801561001057600080fd5b50600436106103835760003560e01c80637a804631116101de578063b88d4fde1161010f578063dbe01714116100ad578063f275c0ce1161007c578063f275c0ce14610883578063f2fde38b14610890578063f39be9bc146108a3578063ff2b8a67146108b657600080fd5b8063dbe0171414610815578063e6fd48bc14610828578063e97ce6e014610831578063e985e9c51461083a57600080fd5b8063c87b56dd116100e9578063c87b56dd146107d3578063d0597660146107e6578063d0e297a0146107f9578063dbdf7fce1461080c57600080fd5b8063b88d4fde146107a5578063bb8e6408146107b8578063c386d69d146107c057600080fd5b806395d89b411161017c578063a24260d711610156578063a24260d71461071f578063aa2d40ea14610746578063aa8722e914610759578063afcc4ad51461077e57600080fd5b806395d89b41146106f15780639db1207a146106f9578063a22cb4651461070c57600080fd5b806389b66663116101b857806389b66663146106ae5780638bdf67f2146106b75780638da5cb5b146106ca578063901a7d53146106e857600080fd5b80637a8046311461067557806381df8ef71461067e578063865598571461068757600080fd5b8063528a6afa116102b8578063662822ac1161025657806367f7cc8c1161023057806367f7cc8c146106245780636c0360eb1461065257806370a082311461065a578063715018a61461066d57600080fd5b8063662822ac146105e8578063663af7de14610608578063679fe0f91461061157600080fd5b80635b6ed050116102925780635b6ed0501461058c5780636098ae5e146105ac57806362bc0cd6146105b55780636352211e146105d557600080fd5b8063528a6afa1461055d57806355f804b3146105705780635a6fcd401461058357600080fd5b8063150b7a02116103255780632dec13bf116102ff5780632dec13bf146104de57806330a13b84146104f157806342842e0e1461052757806351e0e26b1461053a57600080fd5b8063150b7a021461044f57806323b872dd146104b85780632c538df6146104cb57600080fd5b8063081812fc11610361578063081812fc146103dc578063095ea7b3146104145780630fbc9a2a146104295780631423234a1461043c57600080fd5b80630123dedf1461038857806301ffc9a7146103a457806306fdde03146103c7575b600080fd5b61039160165481565b6040519081526020015b60405180910390f35b6103b76103b2366004614b3f565b6108bf565b604051901515815260200161039b565b6103cf6109a4565b60405161039b9190614bd1565b6103ef6103ea366004614be4565b610a36565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161039b565b610427610422366004614c21565b610a6a565b005b610427610437366004614c4b565b610ada565b61042761044a366004614be4565b610b5c565b61048761045d366004614caf565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161039b565b6104276104c6366004614d1e565b610b98565b6104276104d9366004614d68565b610c3e565b6104276104ec366004614de4565b610cd5565b6103ef6104ff366004614be4565b60076020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b610427610535366004614d1e565b611256565b6103b7610548366004614c4b565b600a6020526000908152604090205460ff1681565b61042761056b366004614de4565b611271565b61042761057e366004614e50565b611803565b61039160145481565b601a5461059990600f0b81565b604051600f9190910b815260200161039b565b61039160115481565b600d546103ef9073ffffffffffffffffffffffffffffffffffffffff1681565b6103ef6105e3366004614be4565b61184a565b6103916105f6366004614be4565b60086020526000908152604090205481565b61039160195481565b61042761061f366004614e92565b6118d6565b6103b7610632366004614ede565b600091825260096020908152604080842092845291905290205460ff1690565b6103cf611da1565b610391610668366004614c4b565b611e2f565b610427611efd565b61039160105481565b61039160135481565b6103ef7f000000000000000000000000000000000000000000000000000000000000000081565b61039160175481565b6104276106c5366004614be4565b611f11565b60065473ffffffffffffffffffffffffffffffffffffffff166103ef565b610391600e5481565b6103cf6120cd565b610427610707366004614be4565b6120dc565b61042761071a366004614d68565b612153565b6103ef7f000000000000000000000000000000000000000000000000000000000000000081565b610427610754366004614f00565b6121be565b600c546103ef90610100900473ffffffffffffffffffffffffffffffffffffffff1681565b6103ef7f000000000000000000000000000000000000000000000000000000000000000081565b6104276107b3366004614f65565b6122b9565b61042761235b565b6103916107ce366004614be4565b6123d6565b6103cf6107e1366004614be4565b612687565b6103b76107f4366004614be4565b6126e5565b610391610807366004614ede565b61271e565b61039160155481565b610427610823366004614be4565b6129e7565b61039160125481565b61039160185481565b6103b761084836600461505f565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260056020908152604080832093909416825291909152205460ff1690565b600c546103b79060ff1681565b61042761089e366004614c4b565b612a24565b6104276108b1366004614be4565b612adb565b610391600f5481565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd00000000000000000000000000000000000000000000000000000000148061095257507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061099e57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600080546109b390615092565b80601f01602080910402602001604051908101604052809291908181526020018280546109df90615092565b8015610a2c5780601f10610a0157610100808354040283529160200191610a2c565b820191906000526020600020905b815481529060010190602001808311610a0f57829003601f168201915b5050505050905090565b6000610a4182612bec565b5060009081526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600a6020526040902054829060ff16610acb576040517f178eb9d900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ad58383612c77565b505050565b610ae2612dfe565b600d80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f883ce8f7de207aa5b43835463623bd4f4afc365c0979376a50a8c7220aecbc49906020015b60405180910390a150565b610b64612dfe565b60188190556040518181527e950c65b38fe22fc49a6b6dcd6f33a38c8902e6ed2e8654d89f11706efbffe390602001610b51565b610ba23382612e7f565b610c33576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f7665640000000000000000000000000000000000000060648201526084015b60405180910390fd5b610ad5838383612f3f565b610c46612dfe565b73ffffffffffffffffffffffffffffffffffffffff82166000818152600a602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168515159081179091558251938452908301527f0897aaff03ed73e62c231be04c4f27af7f717f5192a1f5db2a8ca22fbf79a00391015b60405180910390a15050565b600c5460ff16610d11576040517fe7a7cd2700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b333214610d4a576040517fcc66953500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8215610dfb576040517ff3993d1100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063f3993d1190610dc89033903090899089906004016150e5565b600060405180830381600087803b158015610de257600080fd5b505af1158015610df6573d6000803e3d6000fd5b505050505b8015610eac576040517ff3993d1100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063f3993d1190610e799033903090879087906004016150e5565b600060405180830381600087803b158015610e9357600080fd5b505af1158015610ea7573d6000803e3d6000fd5b505050505b60005b8381101561108a57610efd858583818110610ecc57610ecc61515f565b9050602002013560009081526002602052604090205473ffffffffffffffffffffffffffffffffffffffff16151590565b610f2757610f22858583818110610f1657610f1661515f565b90506020020135613247565b610fc5565b610f5a3033878785818110610f3e57610f3e61515f565b9050602002013560405180602001604052806000815250613287565b7fbfc7df244a09bcc41cf78c54b9e697953a6cbbdbf71ea3fbd76b9abbaac1791f33868684818110610f8e57610f8e61515f565b6040805173ffffffffffffffffffffffffffffffffffffffff90951685526020918202939093013590840152500160405180910390a15b3360076000878785818110610fdc57610fdc61515f565b90506020020135815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555042600860008787858181106110465761104661515f565b9050602002013581526020019081526020016000208190555060106000815480929190611072906151bd565b91905055508080611082906151bd565b915050610eaf565b5060005b818110156111f05760006113b98484848181106110ad576110ad61515f565b905060200201356110be91906151f5565b60008181526002602052604090205490915073ffffffffffffffffffffffffffffffffffffffff16611131576110f381613247565b60408051338152602081018390527f887f87088f071a5b8977019016a5cd20d7f38e710669ade85259978a93061219910160405180910390a1611186565b61114c30338360405180602001604052806000815250613287565b60408051338152602081018390527fbfc7df244a09bcc41cf78c54b9e697953a6cbbdbf71ea3fbd76b9abbaac1791f910160405180910390a15b600081815260076020908152604080832080547fffffffffffffffffffffffff000000000000000000000000000000000000000016331790556008909152812042905560118054916111d7836151bd565b91905055505080806111e8906151bd565b91505061108e565b506111f961332a565b600061120e68056bc75e2d6310000083615208565b611219906002615208565b61122c68056bc75e2d6310000086615208565b61123691906151f5565b9050806013600082825461124a91906151f5565b90915550505050505050565b610ad5838383604051806020016040528060008152506122b9565b3332146112aa576040517fcc66953500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6112b261332a565b60005b838110156115015733600760008787858181106112d4576112d461515f565b602090810292909201358352508101919091526040016000205473ffffffffffffffffffffffffffffffffffffffff161461138b576007600086868481811061131f5761131f61515f565b6020908102929092013583525081019190915260409081016000205490517ffc51c8d900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152336024820152604401610c2a565b6113ac8585838181106113a0576113a061515f565b905060200201356126e5565b6113e2576040517fa228745e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006114058686848181106113f9576113f961515f565b905060200201356123d6565b905080601354611415919061521f565b601355600060088188888681811061142f5761142f61515f565b905060200201358152602001908152602001600020819055506000600760008888868181106114605761146061515f565b90506020020135815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601060008154809291906114c690615232565b91905055506114ee33308888868181106114e2576114e261515f565b90506020020135610b98565b50806114f9816151bd565b9150506112b5565b5060005b8181101561169a5733600760008585858181106115245761152461515f565b602090810292909201358352508101919091526040016000205473ffffffffffffffffffffffffffffffffffffffff161461156f576007600084848481811061131f5761131f61515f565b6115848383838181106113a0576113a061515f565b6115ba576040517fa228745e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006115d18484848181106113f9576113f961515f565b6115dc906002615208565b9050806013546115ec919061521f565b60135560006113b98585858181106116065761160661515f565b9050602002013561161791906151f5565b60008181526008602090815260408083208390556007909152812080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055601180549293509061166983615232565b919050555061168533308787878181106114e2576114e261515f565b50508080611692906151bd565b915050611505565b50821561174c576040517ff3993d1100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063f3993d11906117199030903390899089906004016150e5565b600060405180830381600087803b15801561173357600080fd5b505af1158015611747573d6000803e3d6000fd5b505050505b80156117fd576040517ff3993d1100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063f3993d11906117ca9030903390879087906004016150e5565b600060405180830381600087803b1580156117e457600080fd5b505af11580156117f8573d6000803e3d6000fd5b505050505b50505050565b61180b612dfe565b601b6118188284836152b5565b507f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad8282604051610cc99291906153cf565b60008181526002602052604081205473ffffffffffffffffffffffffffffffffffffffff168061099e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610c2a565b6000805b83811015611ce25733600760008787858181106118f9576118f961515f565b602090810292909201358352508101919091526040016000205473ffffffffffffffffffffffffffffffffffffffff1614611944576007600086868481811061131f5761131f61515f565b6119818585838181106119595761195961515f565b9050602002013584600091825260096020908152604080842092845291905290205460ff1690565b156119dd578484828181106119985761199861515f565b90506020020135836040517f18700d5e000000000000000000000000000000000000000000000000000000008152600401610c2a929190918252602082015260400190565b600b83815481106119f0576119f061515f565b90600052602060002090600302016000015460086000878785818110611a1857611a1861515f565b9050602002013581526020019081526020016000205410611abe5760086000868684818110611a4957611a4961515f565b90506020020135815260200190815260200160002054600b8481548110611a7257611a7261515f565b60009182526020909120600390910201546040517f44db293f00000000000000000000000000000000000000000000000000000000815260048101929092526024820152604401610c2a565b6113b9858583818110611ad357611ad361515f565b905060200201351115611bf257611b02858583818110611af557611af561515f565b905060200201358461271e565b611b0d906002615208565b611b1790836151f5565b9150600160096000878785818110611b3157611b3161515f565b905060200201358152602001908152602001600020600085815260200190815260200160002060006101000a81548160ff0219169083151502179055507f38be9b012e428704c0fb2b81dfd53444b76ac4cd45c46cfd2d661f73d97cf47b858583818110611ba157611ba161515f565b90506020020135611bca878785818110611bbd57611bbd61515f565b905060200201358661271e565b611bd5906002615208565b6040805192835260208301919091520160405180910390a1611cd0565b611c07858583818110611af557611af561515f565b611c1190836151f5565b9150600160096000878785818110611c2b57611c2b61515f565b905060200201358152602001908152602001600020600085815260200190815260200160002060006101000a81548160ff0219169083151502179055507f38be9b012e428704c0fb2b81dfd53444b76ac4cd45c46cfd2d661f73d97cf47b858583818110611c9b57611c9b61515f565b90506020020135611cb7878785818110611bbd57611bbd61515f565b6040805192835260208301919091520160405180910390a15b80611cda816151bd565b9150506118da565b506040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063a9059cbb906044016020604051808303816000875af1158015611d76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d9a919061541c565b5050505050565b601b8054611dae90615092565b80601f0160208091040260200160405190810160405280929190818152602001828054611dda90615092565b8015611e275780601f10611dfc57610100808354040283529160200191611e27565b820191906000526020600020905b815481529060010190602001808311611e0a57829003601f168201915b505050505081565b600073ffffffffffffffffffffffffffffffffffffffff8216611ed4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610c2a565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205490565b611f05612dfe565b611f0f60006133bf565b565b600d5473ffffffffffffffffffffffffffffffffffffffff163314611f8457600d546040517f0ac3423500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152336024820152604401610c2a565b6040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906323b872dd906064016020604051808303816000875af115801561201d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612041919061541c565b5080600e600082825461205491906151f5565b9250508190555080600f600082825461206d91906151f5565b9091555050601754600e541061209d576015805490600061208d836151bd565b919050555061209d600e54613436565b6040518181527f4e9221f2cca6ca0397acc6004ea0b716798254f5abcf53924fab34f0373e5d4e90602001610b51565b6060600180546109b390615092565b6120e4612dfe565b6064811061211e576040517f9d72119d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60168190556040518181527f62fd2ad658cf14faec2bf4bc1085e6feec9ee05dfd45979e70c106031c1b6d3790602001610b51565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600a6020526040902054829060ff166121b4576040517f178eb9d900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ad583836134ee565b60005b81811015610ad55733600760008585858181106121e0576121e061515f565b602090810292909201358352508101919091526040016000205473ffffffffffffffffffffffffffffffffffffffff161461222b576007600084848481811061131f5761131f61515f565b6122a761224f8484848181106122435761224361515f565b9050602002013561184a565b600760008686868181106122655761226561515f565b602090810292909201358352508101919091526040016000205473ffffffffffffffffffffffffffffffffffffffff16858585818110610f3e57610f3e61515f565b806122b1816151bd565b9150506121c1565b6122c33383612e7f565b61234f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152608401610c2a565b6117fd84848484613287565b612363612dfe565b600c5460ff16156123a0576040517f38ba0e6100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055426012819055601455565b600080600080600b805490506000148061242e5750600085815260086020526040902054600b805461240a9060019061521f565b8154811061241a5761241a61515f565b906000526020600020906003020160000154105b156124605760008581526008602052604090205461245790429068056bc75e2d631000006134f9565b95945050505050565b600b6000815481106124745761247461515f565b90600052602060002090600302016000015460086000878152602001908152602001600020541161250d576124eb600b6000815481106124b6576124b661515f565b906000526020600020906003020160000154600860008881526020019081526020016000205468056bc75e2d631000006134f9565b92506124f68361354f565b925060019150612506828061521f565b90506125ca565b600b5461251c9060019061521f565b915061252960018361521f565b90505b600b818154811061253f5761253f61515f565b9060005260206000209060030201600001546008600087815260200190815260200160002054101561258b578161257581615232565b925050808061258390615232565b91505061252c565b6125a1600b83815481106124b6576124b661515f565b92506125ac8361354f565b9250816125b8816151bd565b92505080806125c6906151bd565b9150505b600b546000906125dc9060019061521f565b90505b80831161266657612639600b84815481106125fc576125fc61515f565b906000526020600020906003020160000154600b84815481106126215761262161515f565b906000526020600020906003020160000154866134f9565b93506126448461354f565b935082612650816151bd565b935050818061265e906151bd565b9250506125df565b61267d42600b83815481106126215761262161515f565b9695505050505050565b60606000601b805461269890615092565b9050116126b4576040518060200160405280600081525061099e565b601b6126bf83613593565b6040516020016126d0929190615439565b60405160208183030381529060405292915050565b601854600082815260086020526040812054909190612704904261521f565b1061271157506001919050565b506000919050565b919050565b600080600080846000036127e257612777600b86815481106127425761274261515f565b906000526020600020906003020160000154600860008981526020019081526020016000205468056bc75e2d631000006134f9565b9250600b858154811061278c5761278c61515f565b906000526020600020906003020160020154600b86815481106127b1576127b161515f565b906000526020600020906003020160010154846127ce9190615208565b6127d89190615535565b935050505061099e565b600b6000815481106127f6576127f661515f565b90600052602060002090600302016000015460086000888152602001908152602001600020541161284f57612838600b6000815481106127425761274261515f565b925060019150612848828061521f565b9050612901565b600b5461285e9060019061521f565b915061286b60018361521f565b90505b600b81815481106128815761288161515f565b906000526020600020906003020160000154600860008881526020019081526020016000205410156128cd57816128b781615232565b92505080806128c590615232565b91505061286e565b6128e3600b83815481106127425761274261515f565b9250816128ef816151bd565b92505080806128fd906151bd565b9150505b848211612988576129118361354f565b9250612966600b83815481106129295761292961515f565b906000526020600020906003020160000154600b838154811061294e5761294e61515f565b906000526020600020906003020160000154856134f9565b925080612972816151bd565b9150508180612980906151bd565b925050612901565b600b858154811061299b5761299b61515f565b906000526020600020906003020160020154600b86815481106129c0576129c061515f565b906000526020600020906003020160010154846129dd9190615208565b61267d9190615535565b6129ef612dfe565b60178190556040518181527fbe19cd0f40a31a5c4b57bbc3c5dbb33def8153282589d3e04004cd8142e8720190602001610b51565b612a2c612dfe565b73ffffffffffffffffffffffffffffffffffffffff8116612acf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610c2a565b612ad8816133bf565b50565b600c54610100900473ffffffffffffffffffffffffffffffffffffffff163314612b31576040517f84b7cc4100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063a9059cbb906044016020604051808303816000875af1158015612bc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612be8919061541c565b5050565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff16612ad8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610c2a565b6000612c828261184a565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603612d3f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610c2a565b3373ffffffffffffffffffffffffffffffffffffffff82161480612d685750612d688133610848565b612df4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610c2a565b610ad58383613651565b60065473ffffffffffffffffffffffffffffffffffffffff163314611f0f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c2a565b600080612e8b8361184a565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480612ef9575073ffffffffffffffffffffffffffffffffffffffff80821660009081526005602090815260408083209388168352929052205460ff165b80612f3757508373ffffffffffffffffffffffffffffffffffffffff16612f1f84610a36565b73ffffffffffffffffffffffffffffffffffffffff16145b949350505050565b8273ffffffffffffffffffffffffffffffffffffffff16612f5f8261184a565b73ffffffffffffffffffffffffffffffffffffffff1614613002576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610c2a565b73ffffffffffffffffffffffffffffffffffffffff82166130a4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610c2a565b6130b183838360016136f1565b8273ffffffffffffffffffffffffffffffffffffffff166130d18261184a565b73ffffffffffffffffffffffffffffffffffffffff1614613174576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610c2a565b600081815260046020908152604080832080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811690915573ffffffffffffffffffffffffffffffffffffffff8781168086526003855283862080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b61325133826137ad565b60408051338152602081018390527f887f87088f071a5b8977019016a5cd20d7f38e710669ade85259978a930612199101610b51565b613292848484612f3f565b61329e848484846139e0565b6117fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c2a565b6000620151806014544261333e919061521f565b6133489190615535565b905060018110612ad857670de0b6b3a764000061336482613bd3565b6013546133719190615208565b61337b9190615535565b601381905550806019600082825461339391906151f5565b909155506133a690508162015180615208565b601460008282546133b791906151f5565b909155505050565b6006805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61343e61332a565b6040805160608101825242815260208101838152601354928201928352600b8054600181018255600091825292517f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db960039094029384015590517f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01dba83015591517f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01dbb90910155600e55612ad8613c5e565b612be8338383613cdd565b600080620151806012548561350e919061521f565b60125461351b908861521f565b613525919061521f565b61352f9190615535565b90506000670de0b6b3a764000061354583613bd3565b6129dd9086615208565b600068056bc75e2d63100000606460165468056bc75e2d6310000085613575919061521f565b61357f9190615208565b6135899190615535565b61099e91906151f5565b606060006135a083613e0a565b600101905060008167ffffffffffffffff8111156135c0576135c0614f36565b6040519080825280601f01601f1916602001820160405280156135ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846135f457509392505050565b600081815260046020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff841690811790915581906136ab8261184a565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60018111156117fd5773ffffffffffffffffffffffffffffffffffffffff8416156137515773ffffffffffffffffffffffffffffffffffffffff84166000908152600360205260408120805483929061374b90849061521f565b90915550505b73ffffffffffffffffffffffffffffffffffffffff8316156117fd5773ffffffffffffffffffffffffffffffffffffffff8316600090815260036020526040812080548392906137a29084906151f5565b909155505050505050565b73ffffffffffffffffffffffffffffffffffffffff821661382a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610c2a565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff16156138b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c2a565b6138c46000838360016136f1565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff1615613950576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c2a565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260036020908152604080832080546001019055848352600290915280822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600073ffffffffffffffffffffffffffffffffffffffff84163b15613bc8576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290613a57903390899088908890600401615549565b6020604051808303816000875af1925050508015613ab0575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252613aad91810190615588565b60015b613b7d573d808015613ade576040519150601f19603f3d011682016040523d82523d6000602084013e613ae3565b606091505b508051600003613b75576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c2a565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050612f37565b506001949350505050565b60008068010000000000000000613be984613eec565b613bf391906155a5565b601a549091506000908290613c0a90600f0b613f0a565b613c149190615619565b90506000613c218261400c565b613c3290662386f26fc10000615619565b90506000613c3f82614af5565b613c4a906064615640565b67ffffffffffffffff169695505050505050565b600068056bc75e2d63100000601154613c779190615208565b613c82906002615208565b68056bc75e2d63100000601054613c999190615208565b613ca391906151f5565b905080606460165483601354613cb9919061521f565b613cc39190615208565b613ccd9190615535565b613cd791906151f5565b60135550565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603613d72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610c2a565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526005602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310613e53577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310613e7f576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310613e9d57662386f26fc10000830492506010015b6305f5e1008310613eb5576305f5e100830492506008015b6127108310613ec957612710830492506004015b60648310613edb576064830492506002015b600a831061099e5760010192915050565b6000677fffffffffffffff821115613f0357600080fd5b5060401b90565b60008082600f0b13613f1b57600080fd5b6000600f83900b680100000000000000008112613f3a576040918201911d5b6401000000008112613f4e576020918201911d5b620100008112613f60576010918201911d5b6101008112613f71576008918201911d5b60108112613f81576004918201911d5b60048112613f91576002918201911d5b60028112613fa0576001820191505b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0820160401b600f85900b607f8490031b6780000000000000005b60008113156140015790800260ff81901c8281029390930192607f011c9060011d613fdb565b509095945050505050565b60006840000000000000000082600f0b1261402657600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffc0000000000000000082600f0b121561405957506000919050565b6f8000000000000000000000000000000060006780000000000000008416600f0b13156140975770016a09e667f3bcc908b2fb1366ea957d3e0260801c5b60008367400000000000000016600f0b13156140c4577001306fe0a31b7152de8d5a46305c85edec0260801c5b60008367200000000000000016600f0b13156140f1577001172b83c7d517adcdf7c8c50eb14a791f0260801c5b60008367100000000000000016600f0b131561411e5770010b5586cf9890f6298b92b71842a983630260801c5b60008367080000000000000016600f0b131561414b577001059b0d31585743ae7c548eb68ca417fd0260801c5b60008367040000000000000016600f0b131561417857700102c9a3e778060ee6f7caca4f7a29bde80260801c5b60008367020000000000000016600f0b13156141a55770010163da9fb33356d84a66ae336dcdfa3f0260801c5b60008367010000000000000016600f0b13156141d257700100b1afa5abcbed6129ab13ec11dc95430260801c5b600083668000000000000016600f0b13156141fe5770010058c86da1c09ea1ff19d294cf2f679b0260801c5b600083664000000000000016600f0b131561422a577001002c605e2e8cec506d21bfc89a23a00f0260801c5b600083662000000000000016600f0b131561425657700100162f3904051fa128bca9c55c31e5df0260801c5b600083661000000000000016600f0b1315614282577001000b175effdc76ba38e31671ca9397250260801c5b600083660800000000000016600f0b13156142ae57700100058ba01fb9f96d6cacd4b180917c3d0260801c5b600083660400000000000016600f0b13156142da5770010002c5cc37da9491d0985c348c68e7b30260801c5b600083660200000000000016600f0b1315614306577001000162e525ee054754457d59952920260260801c5b600083660100000000000016600f0b13156143325770010000b17255775c040618bf4a4ade83fc0260801c5b6000836580000000000016600f0b131561435d577001000058b91b5bc9ae2eed81e9b7d4cfab0260801c5b6000836540000000000016600f0b131561438857700100002c5c89d5ec6ca4d7c8acc017b7c90260801c5b6000836520000000000016600f0b13156143b35770010000162e43f4f831060e02d839a9d16d0260801c5b6000836510000000000016600f0b13156143de57700100000b1721bcfc99d9f890ea069117630260801c5b6000836508000000000016600f0b13156144095770010000058b90cf1e6d97f9ca14dbcc16280260801c5b6000836504000000000016600f0b1315614434577001000002c5c863b73f016468f6bac5ca2b0260801c5b6000836502000000000016600f0b131561445f57700100000162e430e5a18f6119e3c02282a50260801c5b6000836501000000000016600f0b131561448a577001000000b1721835514b86e6d96efd1bfe0260801c5b60008364800000000016600f0b13156144b457700100000058b90c0b48c6be5df846c5b2ef0260801c5b60008364400000000016600f0b13156144de5770010000002c5c8601cc6b9e94213c72737a0260801c5b60008364200000000016600f0b1315614508577001000000162e42fff037df38aa2b219f060260801c5b60008364100000000016600f0b13156145325770010000000b17217fba9c739aa5819f44f90260801c5b60008364080000000016600f0b131561455c577001000000058b90bfcdee5acd3c1cedc8230260801c5b60008364040000000016600f0b131561458657700100000002c5c85fe31f35a6a30da1be500260801c5b60008364020000000016600f0b13156145b05770010000000162e42ff0999ce3541b9fffcf0260801c5b60008364010000000016600f0b13156145da57700100000000b17217f80f4ef5aadda455540260801c5b600083638000000016600f0b13156146035770010000000058b90bfbf8479bd5a81b51ad0260801c5b600083634000000016600f0b131561462c577001000000002c5c85fdf84bd62ae30a74cc0260801c5b600083632000000016600f0b131561465557700100000000162e42fefb2fed257559bdaa0260801c5b600083631000000016600f0b131561467e577001000000000b17217f7d5a7716bba4a9ae0260801c5b600083630800000016600f0b13156146a757700100000000058b90bfbe9ddbac5e109cce0260801c5b600083630400000016600f0b13156146d05770010000000002c5c85fdf4b15de6f17eb0d0260801c5b600083630200000016600f0b13156146f9577001000000000162e42fefa494f1478fde050260801c5b600083630100000016600f0b13156147225770010000000000b17217f7d20cf927c8e94c0260801c5b6000836280000016600f0b131561474a577001000000000058b90bfbe8f71cb4e4b33d0260801c5b6000836240000016600f0b131561477257700100000000002c5c85fdf477b662b269450260801c5b6000836220000016600f0b131561479a5770010000000000162e42fefa3ae53369388c0260801c5b6000836210000016600f0b13156147c257700100000000000b17217f7d1d351a389d400260801c5b6000836208000016600f0b13156147ea5770010000000000058b90bfbe8e8b2d3d4ede0260801c5b6000836204000016600f0b1315614812577001000000000002c5c85fdf4741bea6e77e0260801c5b6000836202000016600f0b131561483a57700100000000000162e42fefa39fe95583c20260801c5b6000836201000016600f0b1315614862577001000000000000b17217f7d1cfb72b45e10260801c5b60008361800016600f0b131561488957700100000000000058b90bfbe8e7cc35c3f00260801c5b60008361400016600f0b13156148b05770010000000000002c5c85fdf473e242ea380260801c5b60008361200016600f0b13156148d7577001000000000000162e42fefa39f02b772c0260801c5b60008361100016600f0b13156148fe5770010000000000000b17217f7d1cf7d83c1a0260801c5b60008361080016600f0b1315614925577001000000000000058b90bfbe8e7bdcbe2e0260801c5b60008361040016600f0b131561494c57700100000000000002c5c85fdf473dea871f0260801c5b60008361020016600f0b13156149735770010000000000000162e42fefa39ef44d910260801c5b60008361010016600f0b131561499a57700100000000000000b17217f7d1cf79e9490260801c5b600083608016600f0b13156149c05770010000000000000058b90bfbe8e7bce5440260801c5b600083604016600f0b13156149e6577001000000000000002c5c85fdf473de6eca0260801c5b600083602016600f0b1315614a0c57700100000000000000162e42fefa39ef366f0260801c5b600083601016600f0b1315614a32577001000000000000000b17217f7d1cf79afa0260801c5b600083600816600f0b1315614a5857700100000000000000058b90bfbe8e7bcd6d0260801c5b600083600416600f0b1315614a7e5770010000000000000002c5c85fdf473de6b20260801c5b600083600216600f0b1315614aa4577001000000000000000162e42fefa39ef3580260801c5b600083600116600f0b1315614aca5770010000000000000000b17217f7d1cf79ab0260801c5b600f83810b60401d603f03900b1c6f7fffffffffffffffffffffffffffffff81111561099e57600080fd5b60008082600f0b1215614b0757600080fd5b50600f0b60401d90565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114612ad857600080fd5b600060208284031215614b5157600080fd5b8135614b5c81614b11565b9392505050565b60005b83811015614b7e578181015183820152602001614b66565b50506000910152565b60008151808452614b9f816020860160208601614b63565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000614b5c6020830184614b87565b600060208284031215614bf657600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461271957600080fd5b60008060408385031215614c3457600080fd5b614c3d83614bfd565b946020939093013593505050565b600060208284031215614c5d57600080fd5b614b5c82614bfd565b60008083601f840112614c7857600080fd5b50813567ffffffffffffffff811115614c9057600080fd5b602083019150836020828501011115614ca857600080fd5b9250929050565b600080600080600060808688031215614cc757600080fd5b614cd086614bfd565b9450614cde60208701614bfd565b935060408601359250606086013567ffffffffffffffff811115614d0157600080fd5b614d0d88828901614c66565b969995985093965092949392505050565b600080600060608486031215614d3357600080fd5b614d3c84614bfd565b9250614d4a60208501614bfd565b9150604084013590509250925092565b8015158114612ad857600080fd5b60008060408385031215614d7b57600080fd5b614d8483614bfd565b91506020830135614d9481614d5a565b809150509250929050565b60008083601f840112614db157600080fd5b50813567ffffffffffffffff811115614dc957600080fd5b6020830191508360208260051b8501011115614ca857600080fd5b60008060008060408587031215614dfa57600080fd5b843567ffffffffffffffff80821115614e1257600080fd5b614e1e88838901614d9f565b90965094506020870135915080821115614e3757600080fd5b50614e4487828801614d9f565b95989497509550505050565b60008060208385031215614e6357600080fd5b823567ffffffffffffffff811115614e7a57600080fd5b614e8685828601614c66565b90969095509350505050565b600080600060408486031215614ea757600080fd5b833567ffffffffffffffff811115614ebe57600080fd5b614eca86828701614d9f565b909790965060209590950135949350505050565b60008060408385031215614ef157600080fd5b50508035926020909101359150565b60008060208385031215614f1357600080fd5b823567ffffffffffffffff811115614f2a57600080fd5b614e8685828601614d9f565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060008060808587031215614f7b57600080fd5b614f8485614bfd565b9350614f9260208601614bfd565b925060408501359150606085013567ffffffffffffffff80821115614fb657600080fd5b818701915087601f830112614fca57600080fd5b813581811115614fdc57614fdc614f36565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561502257615022614f36565b816040528281528a602084870101111561503b57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561507257600080fd5b61507b83614bfd565b915061508960208401614bfd565b90509250929050565b600181811c908216806150a657607f821691505b6020821081036150df577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600073ffffffffffffffffffffffffffffffffffffffff8087168352808616602084015250606060408301528260608301527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561514457600080fd5b8260051b808560808501379190910160800195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036151ee576151ee61518e565b5060010190565b8082018082111561099e5761099e61518e565b808202811582820484141761099e5761099e61518e565b8181038181111561099e5761099e61518e565b6000816152415761524161518e565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b601f821115610ad557600081815260208120601f850160051c8101602086101561528e5750805b601f850160051c820191505b818110156152ad5782815560010161529a565b505050505050565b67ffffffffffffffff8311156152cd576152cd614f36565b6152e1836152db8354615092565b83615267565b6000601f84116001811461533357600085156152fd5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355611d9a565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b828110156153825786850135825560209485019460019092019101615362565b50868210156153bd577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b60208152816020820152818360408301376000818301604090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160101919050565b60006020828403121561542e57600080fd5b8151614b5c81614d5a565b600080845461544781615092565b6001828116801561545f5760018114615492576154c1565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00841687528215158302870194506154c1565b8860005260208060002060005b858110156154b85781548a82015290840190820161549f565b50505082870194505b5050505083516154d5818360208801614b63565b7f2e6a736f6e0000000000000000000000000000000000000000000000000000009101908152600501949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261554457615544615506565b500490565b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152508360408301526080606083015261267d6080830184614b87565b60006020828403121561559a57600080fd5b8151614b5c81614b11565b600081600f0b83600f0b806155bc576155bc615506565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81147fffffffffffffffffffffffffffffffff80000000000000000000000000000000831416156156105761561061518e565b90059392505050565b600082600f0b82600f0b0280600f0b91508082146156395761563961518e565b5092915050565b67ffffffffffffffff8181168382160280821691908281146156645761566461518e565b50509291505056fea26469706673582212206051baa916f3a51fa6d7139c7ffc5788139a214600ea94533767c1012e30885564736f6c634300081100330000000000000000000000007f312a75b62846033bc5471c5bcb94b1abfaf06d000000000000000000000000f96ef26f3ab9dbd167578cc2bee5395cf669261e000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106103835760003560e01c80637a804631116101de578063b88d4fde1161010f578063dbe01714116100ad578063f275c0ce1161007c578063f275c0ce14610883578063f2fde38b14610890578063f39be9bc146108a3578063ff2b8a67146108b657600080fd5b8063dbe0171414610815578063e6fd48bc14610828578063e97ce6e014610831578063e985e9c51461083a57600080fd5b8063c87b56dd116100e9578063c87b56dd146107d3578063d0597660146107e6578063d0e297a0146107f9578063dbdf7fce1461080c57600080fd5b8063b88d4fde146107a5578063bb8e6408146107b8578063c386d69d146107c057600080fd5b806395d89b411161017c578063a24260d711610156578063a24260d71461071f578063aa2d40ea14610746578063aa8722e914610759578063afcc4ad51461077e57600080fd5b806395d89b41146106f15780639db1207a146106f9578063a22cb4651461070c57600080fd5b806389b66663116101b857806389b66663146106ae5780638bdf67f2146106b75780638da5cb5b146106ca578063901a7d53146106e857600080fd5b80637a8046311461067557806381df8ef71461067e578063865598571461068757600080fd5b8063528a6afa116102b8578063662822ac1161025657806367f7cc8c1161023057806367f7cc8c146106245780636c0360eb1461065257806370a082311461065a578063715018a61461066d57600080fd5b8063662822ac146105e8578063663af7de14610608578063679fe0f91461061157600080fd5b80635b6ed050116102925780635b6ed0501461058c5780636098ae5e146105ac57806362bc0cd6146105b55780636352211e146105d557600080fd5b8063528a6afa1461055d57806355f804b3146105705780635a6fcd401461058357600080fd5b8063150b7a02116103255780632dec13bf116102ff5780632dec13bf146104de57806330a13b84146104f157806342842e0e1461052757806351e0e26b1461053a57600080fd5b8063150b7a021461044f57806323b872dd146104b85780632c538df6146104cb57600080fd5b8063081812fc11610361578063081812fc146103dc578063095ea7b3146104145780630fbc9a2a146104295780631423234a1461043c57600080fd5b80630123dedf1461038857806301ffc9a7146103a457806306fdde03146103c7575b600080fd5b61039160165481565b6040519081526020015b60405180910390f35b6103b76103b2366004614b3f565b6108bf565b604051901515815260200161039b565b6103cf6109a4565b60405161039b9190614bd1565b6103ef6103ea366004614be4565b610a36565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161039b565b610427610422366004614c21565b610a6a565b005b610427610437366004614c4b565b610ada565b61042761044a366004614be4565b610b5c565b61048761045d366004614caf565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161039b565b6104276104c6366004614d1e565b610b98565b6104276104d9366004614d68565b610c3e565b6104276104ec366004614de4565b610cd5565b6103ef6104ff366004614be4565b60076020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b610427610535366004614d1e565b611256565b6103b7610548366004614c4b565b600a6020526000908152604090205460ff1681565b61042761056b366004614de4565b611271565b61042761057e366004614e50565b611803565b61039160145481565b601a5461059990600f0b81565b604051600f9190910b815260200161039b565b61039160115481565b600d546103ef9073ffffffffffffffffffffffffffffffffffffffff1681565b6103ef6105e3366004614be4565b61184a565b6103916105f6366004614be4565b60086020526000908152604090205481565b61039160195481565b61042761061f366004614e92565b6118d6565b6103b7610632366004614ede565b600091825260096020908152604080842092845291905290205460ff1690565b6103cf611da1565b610391610668366004614c4b565b611e2f565b610427611efd565b61039160105481565b61039160135481565b6103ef7f000000000000000000000000f96ef26f3ab9dbd167578cc2bee5395cf669261e81565b61039160175481565b6104276106c5366004614be4565b611f11565b60065473ffffffffffffffffffffffffffffffffffffffff166103ef565b610391600e5481565b6103cf6120cd565b610427610707366004614be4565b6120dc565b61042761071a366004614d68565b612153565b6103ef7f0000000000000000000000007f312a75b62846033bc5471c5bcb94b1abfaf06d81565b610427610754366004614f00565b6121be565b600c546103ef90610100900473ffffffffffffffffffffffffffffffffffffffff1681565b6103ef7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b6104276107b3366004614f65565b6122b9565b61042761235b565b6103916107ce366004614be4565b6123d6565b6103cf6107e1366004614be4565b612687565b6103b76107f4366004614be4565b6126e5565b610391610807366004614ede565b61271e565b61039160155481565b610427610823366004614be4565b6129e7565b61039160125481565b61039160185481565b6103b761084836600461505f565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260056020908152604080832093909416825291909152205460ff1690565b600c546103b79060ff1681565b61042761089e366004614c4b565b612a24565b6104276108b1366004614be4565b612adb565b610391600f5481565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd00000000000000000000000000000000000000000000000000000000148061095257507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061099e57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600080546109b390615092565b80601f01602080910402602001604051908101604052809291908181526020018280546109df90615092565b8015610a2c5780601f10610a0157610100808354040283529160200191610a2c565b820191906000526020600020905b815481529060010190602001808311610a0f57829003601f168201915b5050505050905090565b6000610a4182612bec565b5060009081526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600a6020526040902054829060ff16610acb576040517f178eb9d900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ad58383612c77565b505050565b610ae2612dfe565b600d80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f883ce8f7de207aa5b43835463623bd4f4afc365c0979376a50a8c7220aecbc49906020015b60405180910390a150565b610b64612dfe565b60188190556040518181527e950c65b38fe22fc49a6b6dcd6f33a38c8902e6ed2e8654d89f11706efbffe390602001610b51565b610ba23382612e7f565b610c33576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f7665640000000000000000000000000000000000000060648201526084015b60405180910390fd5b610ad5838383612f3f565b610c46612dfe565b73ffffffffffffffffffffffffffffffffffffffff82166000818152600a602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168515159081179091558251938452908301527f0897aaff03ed73e62c231be04c4f27af7f717f5192a1f5db2a8ca22fbf79a00391015b60405180910390a15050565b600c5460ff16610d11576040517fe7a7cd2700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b333214610d4a576040517fcc66953500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8215610dfb576040517ff3993d1100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000007f312a75b62846033bc5471c5bcb94b1abfaf06d169063f3993d1190610dc89033903090899089906004016150e5565b600060405180830381600087803b158015610de257600080fd5b505af1158015610df6573d6000803e3d6000fd5b505050505b8015610eac576040517ff3993d1100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000f96ef26f3ab9dbd167578cc2bee5395cf669261e169063f3993d1190610e799033903090879087906004016150e5565b600060405180830381600087803b158015610e9357600080fd5b505af1158015610ea7573d6000803e3d6000fd5b505050505b60005b8381101561108a57610efd858583818110610ecc57610ecc61515f565b9050602002013560009081526002602052604090205473ffffffffffffffffffffffffffffffffffffffff16151590565b610f2757610f22858583818110610f1657610f1661515f565b90506020020135613247565b610fc5565b610f5a3033878785818110610f3e57610f3e61515f565b9050602002013560405180602001604052806000815250613287565b7fbfc7df244a09bcc41cf78c54b9e697953a6cbbdbf71ea3fbd76b9abbaac1791f33868684818110610f8e57610f8e61515f565b6040805173ffffffffffffffffffffffffffffffffffffffff90951685526020918202939093013590840152500160405180910390a15b3360076000878785818110610fdc57610fdc61515f565b90506020020135815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555042600860008787858181106110465761104661515f565b9050602002013581526020019081526020016000208190555060106000815480929190611072906151bd565b91905055508080611082906151bd565b915050610eaf565b5060005b818110156111f05760006113b98484848181106110ad576110ad61515f565b905060200201356110be91906151f5565b60008181526002602052604090205490915073ffffffffffffffffffffffffffffffffffffffff16611131576110f381613247565b60408051338152602081018390527f887f87088f071a5b8977019016a5cd20d7f38e710669ade85259978a93061219910160405180910390a1611186565b61114c30338360405180602001604052806000815250613287565b60408051338152602081018390527fbfc7df244a09bcc41cf78c54b9e697953a6cbbdbf71ea3fbd76b9abbaac1791f910160405180910390a15b600081815260076020908152604080832080547fffffffffffffffffffffffff000000000000000000000000000000000000000016331790556008909152812042905560118054916111d7836151bd565b91905055505080806111e8906151bd565b91505061108e565b506111f961332a565b600061120e68056bc75e2d6310000083615208565b611219906002615208565b61122c68056bc75e2d6310000086615208565b61123691906151f5565b9050806013600082825461124a91906151f5565b90915550505050505050565b610ad5838383604051806020016040528060008152506122b9565b3332146112aa576040517fcc66953500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6112b261332a565b60005b838110156115015733600760008787858181106112d4576112d461515f565b602090810292909201358352508101919091526040016000205473ffffffffffffffffffffffffffffffffffffffff161461138b576007600086868481811061131f5761131f61515f565b6020908102929092013583525081019190915260409081016000205490517ffc51c8d900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152336024820152604401610c2a565b6113ac8585838181106113a0576113a061515f565b905060200201356126e5565b6113e2576040517fa228745e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006114058686848181106113f9576113f961515f565b905060200201356123d6565b905080601354611415919061521f565b601355600060088188888681811061142f5761142f61515f565b905060200201358152602001908152602001600020819055506000600760008888868181106114605761146061515f565b90506020020135815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601060008154809291906114c690615232565b91905055506114ee33308888868181106114e2576114e261515f565b90506020020135610b98565b50806114f9816151bd565b9150506112b5565b5060005b8181101561169a5733600760008585858181106115245761152461515f565b602090810292909201358352508101919091526040016000205473ffffffffffffffffffffffffffffffffffffffff161461156f576007600084848481811061131f5761131f61515f565b6115848383838181106113a0576113a061515f565b6115ba576040517fa228745e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006115d18484848181106113f9576113f961515f565b6115dc906002615208565b9050806013546115ec919061521f565b60135560006113b98585858181106116065761160661515f565b9050602002013561161791906151f5565b60008181526008602090815260408083208390556007909152812080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055601180549293509061166983615232565b919050555061168533308787878181106114e2576114e261515f565b50508080611692906151bd565b915050611505565b50821561174c576040517ff3993d1100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000007f312a75b62846033bc5471c5bcb94b1abfaf06d169063f3993d11906117199030903390899089906004016150e5565b600060405180830381600087803b15801561173357600080fd5b505af1158015611747573d6000803e3d6000fd5b505050505b80156117fd576040517ff3993d1100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000f96ef26f3ab9dbd167578cc2bee5395cf669261e169063f3993d11906117ca9030903390879087906004016150e5565b600060405180830381600087803b1580156117e457600080fd5b505af11580156117f8573d6000803e3d6000fd5b505050505b50505050565b61180b612dfe565b601b6118188284836152b5565b507f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad8282604051610cc99291906153cf565b60008181526002602052604081205473ffffffffffffffffffffffffffffffffffffffff168061099e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610c2a565b6000805b83811015611ce25733600760008787858181106118f9576118f961515f565b602090810292909201358352508101919091526040016000205473ffffffffffffffffffffffffffffffffffffffff1614611944576007600086868481811061131f5761131f61515f565b6119818585838181106119595761195961515f565b9050602002013584600091825260096020908152604080842092845291905290205460ff1690565b156119dd578484828181106119985761199861515f565b90506020020135836040517f18700d5e000000000000000000000000000000000000000000000000000000008152600401610c2a929190918252602082015260400190565b600b83815481106119f0576119f061515f565b90600052602060002090600302016000015460086000878785818110611a1857611a1861515f565b9050602002013581526020019081526020016000205410611abe5760086000868684818110611a4957611a4961515f565b90506020020135815260200190815260200160002054600b8481548110611a7257611a7261515f565b60009182526020909120600390910201546040517f44db293f00000000000000000000000000000000000000000000000000000000815260048101929092526024820152604401610c2a565b6113b9858583818110611ad357611ad361515f565b905060200201351115611bf257611b02858583818110611af557611af561515f565b905060200201358461271e565b611b0d906002615208565b611b1790836151f5565b9150600160096000878785818110611b3157611b3161515f565b905060200201358152602001908152602001600020600085815260200190815260200160002060006101000a81548160ff0219169083151502179055507f38be9b012e428704c0fb2b81dfd53444b76ac4cd45c46cfd2d661f73d97cf47b858583818110611ba157611ba161515f565b90506020020135611bca878785818110611bbd57611bbd61515f565b905060200201358661271e565b611bd5906002615208565b6040805192835260208301919091520160405180910390a1611cd0565b611c07858583818110611af557611af561515f565b611c1190836151f5565b9150600160096000878785818110611c2b57611c2b61515f565b905060200201358152602001908152602001600020600085815260200190815260200160002060006101000a81548160ff0219169083151502179055507f38be9b012e428704c0fb2b81dfd53444b76ac4cd45c46cfd2d661f73d97cf47b858583818110611c9b57611c9b61515f565b90506020020135611cb7878785818110611bbd57611bbd61515f565b6040805192835260208301919091520160405180910390a15b80611cda816151bd565b9150506118da565b506040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018290527f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4873ffffffffffffffffffffffffffffffffffffffff169063a9059cbb906044016020604051808303816000875af1158015611d76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d9a919061541c565b5050505050565b601b8054611dae90615092565b80601f0160208091040260200160405190810160405280929190818152602001828054611dda90615092565b8015611e275780601f10611dfc57610100808354040283529160200191611e27565b820191906000526020600020905b815481529060010190602001808311611e0a57829003601f168201915b505050505081565b600073ffffffffffffffffffffffffffffffffffffffff8216611ed4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610c2a565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205490565b611f05612dfe565b611f0f60006133bf565b565b600d5473ffffffffffffffffffffffffffffffffffffffff163314611f8457600d546040517f0ac3423500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152336024820152604401610c2a565b6040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018290527f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4873ffffffffffffffffffffffffffffffffffffffff16906323b872dd906064016020604051808303816000875af115801561201d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612041919061541c565b5080600e600082825461205491906151f5565b9250508190555080600f600082825461206d91906151f5565b9091555050601754600e541061209d576015805490600061208d836151bd565b919050555061209d600e54613436565b6040518181527f4e9221f2cca6ca0397acc6004ea0b716798254f5abcf53924fab34f0373e5d4e90602001610b51565b6060600180546109b390615092565b6120e4612dfe565b6064811061211e576040517f9d72119d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60168190556040518181527f62fd2ad658cf14faec2bf4bc1085e6feec9ee05dfd45979e70c106031c1b6d3790602001610b51565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600a6020526040902054829060ff166121b4576040517f178eb9d900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ad583836134ee565b60005b81811015610ad55733600760008585858181106121e0576121e061515f565b602090810292909201358352508101919091526040016000205473ffffffffffffffffffffffffffffffffffffffff161461222b576007600084848481811061131f5761131f61515f565b6122a761224f8484848181106122435761224361515f565b9050602002013561184a565b600760008686868181106122655761226561515f565b602090810292909201358352508101919091526040016000205473ffffffffffffffffffffffffffffffffffffffff16858585818110610f3e57610f3e61515f565b806122b1816151bd565b9150506121c1565b6122c33383612e7f565b61234f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152608401610c2a565b6117fd84848484613287565b612363612dfe565b600c5460ff16156123a0576040517f38ba0e6100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055426012819055601455565b600080600080600b805490506000148061242e5750600085815260086020526040902054600b805461240a9060019061521f565b8154811061241a5761241a61515f565b906000526020600020906003020160000154105b156124605760008581526008602052604090205461245790429068056bc75e2d631000006134f9565b95945050505050565b600b6000815481106124745761247461515f565b90600052602060002090600302016000015460086000878152602001908152602001600020541161250d576124eb600b6000815481106124b6576124b661515f565b906000526020600020906003020160000154600860008881526020019081526020016000205468056bc75e2d631000006134f9565b92506124f68361354f565b925060019150612506828061521f565b90506125ca565b600b5461251c9060019061521f565b915061252960018361521f565b90505b600b818154811061253f5761253f61515f565b9060005260206000209060030201600001546008600087815260200190815260200160002054101561258b578161257581615232565b925050808061258390615232565b91505061252c565b6125a1600b83815481106124b6576124b661515f565b92506125ac8361354f565b9250816125b8816151bd565b92505080806125c6906151bd565b9150505b600b546000906125dc9060019061521f565b90505b80831161266657612639600b84815481106125fc576125fc61515f565b906000526020600020906003020160000154600b84815481106126215761262161515f565b906000526020600020906003020160000154866134f9565b93506126448461354f565b935082612650816151bd565b935050818061265e906151bd565b9250506125df565b61267d42600b83815481106126215761262161515f565b9695505050505050565b60606000601b805461269890615092565b9050116126b4576040518060200160405280600081525061099e565b601b6126bf83613593565b6040516020016126d0929190615439565b60405160208183030381529060405292915050565b601854600082815260086020526040812054909190612704904261521f565b1061271157506001919050565b506000919050565b919050565b600080600080846000036127e257612777600b86815481106127425761274261515f565b906000526020600020906003020160000154600860008981526020019081526020016000205468056bc75e2d631000006134f9565b9250600b858154811061278c5761278c61515f565b906000526020600020906003020160020154600b86815481106127b1576127b161515f565b906000526020600020906003020160010154846127ce9190615208565b6127d89190615535565b935050505061099e565b600b6000815481106127f6576127f661515f565b90600052602060002090600302016000015460086000888152602001908152602001600020541161284f57612838600b6000815481106127425761274261515f565b925060019150612848828061521f565b9050612901565b600b5461285e9060019061521f565b915061286b60018361521f565b90505b600b81815481106128815761288161515f565b906000526020600020906003020160000154600860008881526020019081526020016000205410156128cd57816128b781615232565b92505080806128c590615232565b91505061286e565b6128e3600b83815481106127425761274261515f565b9250816128ef816151bd565b92505080806128fd906151bd565b9150505b848211612988576129118361354f565b9250612966600b83815481106129295761292961515f565b906000526020600020906003020160000154600b838154811061294e5761294e61515f565b906000526020600020906003020160000154856134f9565b925080612972816151bd565b9150508180612980906151bd565b925050612901565b600b858154811061299b5761299b61515f565b906000526020600020906003020160020154600b86815481106129c0576129c061515f565b906000526020600020906003020160010154846129dd9190615208565b61267d9190615535565b6129ef612dfe565b60178190556040518181527fbe19cd0f40a31a5c4b57bbc3c5dbb33def8153282589d3e04004cd8142e8720190602001610b51565b612a2c612dfe565b73ffffffffffffffffffffffffffffffffffffffff8116612acf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610c2a565b612ad8816133bf565b50565b600c54610100900473ffffffffffffffffffffffffffffffffffffffff163314612b31576040517f84b7cc4100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018290527f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4873ffffffffffffffffffffffffffffffffffffffff169063a9059cbb906044016020604051808303816000875af1158015612bc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612be8919061541c565b5050565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff16612ad8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610c2a565b6000612c828261184a565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603612d3f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610c2a565b3373ffffffffffffffffffffffffffffffffffffffff82161480612d685750612d688133610848565b612df4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610c2a565b610ad58383613651565b60065473ffffffffffffffffffffffffffffffffffffffff163314611f0f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c2a565b600080612e8b8361184a565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480612ef9575073ffffffffffffffffffffffffffffffffffffffff80821660009081526005602090815260408083209388168352929052205460ff165b80612f3757508373ffffffffffffffffffffffffffffffffffffffff16612f1f84610a36565b73ffffffffffffffffffffffffffffffffffffffff16145b949350505050565b8273ffffffffffffffffffffffffffffffffffffffff16612f5f8261184a565b73ffffffffffffffffffffffffffffffffffffffff1614613002576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610c2a565b73ffffffffffffffffffffffffffffffffffffffff82166130a4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610c2a565b6130b183838360016136f1565b8273ffffffffffffffffffffffffffffffffffffffff166130d18261184a565b73ffffffffffffffffffffffffffffffffffffffff1614613174576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610c2a565b600081815260046020908152604080832080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811690915573ffffffffffffffffffffffffffffffffffffffff8781168086526003855283862080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b61325133826137ad565b60408051338152602081018390527f887f87088f071a5b8977019016a5cd20d7f38e710669ade85259978a930612199101610b51565b613292848484612f3f565b61329e848484846139e0565b6117fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c2a565b6000620151806014544261333e919061521f565b6133489190615535565b905060018110612ad857670de0b6b3a764000061336482613bd3565b6013546133719190615208565b61337b9190615535565b601381905550806019600082825461339391906151f5565b909155506133a690508162015180615208565b601460008282546133b791906151f5565b909155505050565b6006805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61343e61332a565b6040805160608101825242815260208101838152601354928201928352600b8054600181018255600091825292517f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db960039094029384015590517f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01dba83015591517f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01dbb90910155600e55612ad8613c5e565b612be8338383613cdd565b600080620151806012548561350e919061521f565b60125461351b908861521f565b613525919061521f565b61352f9190615535565b90506000670de0b6b3a764000061354583613bd3565b6129dd9086615208565b600068056bc75e2d63100000606460165468056bc75e2d6310000085613575919061521f565b61357f9190615208565b6135899190615535565b61099e91906151f5565b606060006135a083613e0a565b600101905060008167ffffffffffffffff8111156135c0576135c0614f36565b6040519080825280601f01601f1916602001820160405280156135ea576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846135f457509392505050565b600081815260046020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff841690811790915581906136ab8261184a565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60018111156117fd5773ffffffffffffffffffffffffffffffffffffffff8416156137515773ffffffffffffffffffffffffffffffffffffffff84166000908152600360205260408120805483929061374b90849061521f565b90915550505b73ffffffffffffffffffffffffffffffffffffffff8316156117fd5773ffffffffffffffffffffffffffffffffffffffff8316600090815260036020526040812080548392906137a29084906151f5565b909155505050505050565b73ffffffffffffffffffffffffffffffffffffffff821661382a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610c2a565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff16156138b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c2a565b6138c46000838360016136f1565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff1615613950576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c2a565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260036020908152604080832080546001019055848352600290915280822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600073ffffffffffffffffffffffffffffffffffffffff84163b15613bc8576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290613a57903390899088908890600401615549565b6020604051808303816000875af1925050508015613ab0575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252613aad91810190615588565b60015b613b7d573d808015613ade576040519150601f19603f3d011682016040523d82523d6000602084013e613ae3565b606091505b508051600003613b75576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c2a565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050612f37565b506001949350505050565b60008068010000000000000000613be984613eec565b613bf391906155a5565b601a549091506000908290613c0a90600f0b613f0a565b613c149190615619565b90506000613c218261400c565b613c3290662386f26fc10000615619565b90506000613c3f82614af5565b613c4a906064615640565b67ffffffffffffffff169695505050505050565b600068056bc75e2d63100000601154613c779190615208565b613c82906002615208565b68056bc75e2d63100000601054613c999190615208565b613ca391906151f5565b905080606460165483601354613cb9919061521f565b613cc39190615208565b613ccd9190615535565b613cd791906151f5565b60135550565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603613d72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610c2a565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526005602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310613e53577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310613e7f576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310613e9d57662386f26fc10000830492506010015b6305f5e1008310613eb5576305f5e100830492506008015b6127108310613ec957612710830492506004015b60648310613edb576064830492506002015b600a831061099e5760010192915050565b6000677fffffffffffffff821115613f0357600080fd5b5060401b90565b60008082600f0b13613f1b57600080fd5b6000600f83900b680100000000000000008112613f3a576040918201911d5b6401000000008112613f4e576020918201911d5b620100008112613f60576010918201911d5b6101008112613f71576008918201911d5b60108112613f81576004918201911d5b60048112613f91576002918201911d5b60028112613fa0576001820191505b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0820160401b600f85900b607f8490031b6780000000000000005b60008113156140015790800260ff81901c8281029390930192607f011c9060011d613fdb565b509095945050505050565b60006840000000000000000082600f0b1261402657600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffc0000000000000000082600f0b121561405957506000919050565b6f8000000000000000000000000000000060006780000000000000008416600f0b13156140975770016a09e667f3bcc908b2fb1366ea957d3e0260801c5b60008367400000000000000016600f0b13156140c4577001306fe0a31b7152de8d5a46305c85edec0260801c5b60008367200000000000000016600f0b13156140f1577001172b83c7d517adcdf7c8c50eb14a791f0260801c5b60008367100000000000000016600f0b131561411e5770010b5586cf9890f6298b92b71842a983630260801c5b60008367080000000000000016600f0b131561414b577001059b0d31585743ae7c548eb68ca417fd0260801c5b60008367040000000000000016600f0b131561417857700102c9a3e778060ee6f7caca4f7a29bde80260801c5b60008367020000000000000016600f0b13156141a55770010163da9fb33356d84a66ae336dcdfa3f0260801c5b60008367010000000000000016600f0b13156141d257700100b1afa5abcbed6129ab13ec11dc95430260801c5b600083668000000000000016600f0b13156141fe5770010058c86da1c09ea1ff19d294cf2f679b0260801c5b600083664000000000000016600f0b131561422a577001002c605e2e8cec506d21bfc89a23a00f0260801c5b600083662000000000000016600f0b131561425657700100162f3904051fa128bca9c55c31e5df0260801c5b600083661000000000000016600f0b1315614282577001000b175effdc76ba38e31671ca9397250260801c5b600083660800000000000016600f0b13156142ae57700100058ba01fb9f96d6cacd4b180917c3d0260801c5b600083660400000000000016600f0b13156142da5770010002c5cc37da9491d0985c348c68e7b30260801c5b600083660200000000000016600f0b1315614306577001000162e525ee054754457d59952920260260801c5b600083660100000000000016600f0b13156143325770010000b17255775c040618bf4a4ade83fc0260801c5b6000836580000000000016600f0b131561435d577001000058b91b5bc9ae2eed81e9b7d4cfab0260801c5b6000836540000000000016600f0b131561438857700100002c5c89d5ec6ca4d7c8acc017b7c90260801c5b6000836520000000000016600f0b13156143b35770010000162e43f4f831060e02d839a9d16d0260801c5b6000836510000000000016600f0b13156143de57700100000b1721bcfc99d9f890ea069117630260801c5b6000836508000000000016600f0b13156144095770010000058b90cf1e6d97f9ca14dbcc16280260801c5b6000836504000000000016600f0b1315614434577001000002c5c863b73f016468f6bac5ca2b0260801c5b6000836502000000000016600f0b131561445f57700100000162e430e5a18f6119e3c02282a50260801c5b6000836501000000000016600f0b131561448a577001000000b1721835514b86e6d96efd1bfe0260801c5b60008364800000000016600f0b13156144b457700100000058b90c0b48c6be5df846c5b2ef0260801c5b60008364400000000016600f0b13156144de5770010000002c5c8601cc6b9e94213c72737a0260801c5b60008364200000000016600f0b1315614508577001000000162e42fff037df38aa2b219f060260801c5b60008364100000000016600f0b13156145325770010000000b17217fba9c739aa5819f44f90260801c5b60008364080000000016600f0b131561455c577001000000058b90bfcdee5acd3c1cedc8230260801c5b60008364040000000016600f0b131561458657700100000002c5c85fe31f35a6a30da1be500260801c5b60008364020000000016600f0b13156145b05770010000000162e42ff0999ce3541b9fffcf0260801c5b60008364010000000016600f0b13156145da57700100000000b17217f80f4ef5aadda455540260801c5b600083638000000016600f0b13156146035770010000000058b90bfbf8479bd5a81b51ad0260801c5b600083634000000016600f0b131561462c577001000000002c5c85fdf84bd62ae30a74cc0260801c5b600083632000000016600f0b131561465557700100000000162e42fefb2fed257559bdaa0260801c5b600083631000000016600f0b131561467e577001000000000b17217f7d5a7716bba4a9ae0260801c5b600083630800000016600f0b13156146a757700100000000058b90bfbe9ddbac5e109cce0260801c5b600083630400000016600f0b13156146d05770010000000002c5c85fdf4b15de6f17eb0d0260801c5b600083630200000016600f0b13156146f9577001000000000162e42fefa494f1478fde050260801c5b600083630100000016600f0b13156147225770010000000000b17217f7d20cf927c8e94c0260801c5b6000836280000016600f0b131561474a577001000000000058b90bfbe8f71cb4e4b33d0260801c5b6000836240000016600f0b131561477257700100000000002c5c85fdf477b662b269450260801c5b6000836220000016600f0b131561479a5770010000000000162e42fefa3ae53369388c0260801c5b6000836210000016600f0b13156147c257700100000000000b17217f7d1d351a389d400260801c5b6000836208000016600f0b13156147ea5770010000000000058b90bfbe8e8b2d3d4ede0260801c5b6000836204000016600f0b1315614812577001000000000002c5c85fdf4741bea6e77e0260801c5b6000836202000016600f0b131561483a57700100000000000162e42fefa39fe95583c20260801c5b6000836201000016600f0b1315614862577001000000000000b17217f7d1cfb72b45e10260801c5b60008361800016600f0b131561488957700100000000000058b90bfbe8e7cc35c3f00260801c5b60008361400016600f0b13156148b05770010000000000002c5c85fdf473e242ea380260801c5b60008361200016600f0b13156148d7577001000000000000162e42fefa39f02b772c0260801c5b60008361100016600f0b13156148fe5770010000000000000b17217f7d1cf7d83c1a0260801c5b60008361080016600f0b1315614925577001000000000000058b90bfbe8e7bdcbe2e0260801c5b60008361040016600f0b131561494c57700100000000000002c5c85fdf473dea871f0260801c5b60008361020016600f0b13156149735770010000000000000162e42fefa39ef44d910260801c5b60008361010016600f0b131561499a57700100000000000000b17217f7d1cf79e9490260801c5b600083608016600f0b13156149c05770010000000000000058b90bfbe8e7bce5440260801c5b600083604016600f0b13156149e6577001000000000000002c5c85fdf473de6eca0260801c5b600083602016600f0b1315614a0c57700100000000000000162e42fefa39ef366f0260801c5b600083601016600f0b1315614a32577001000000000000000b17217f7d1cf79afa0260801c5b600083600816600f0b1315614a5857700100000000000000058b90bfbe8e7bcd6d0260801c5b600083600416600f0b1315614a7e5770010000000000000002c5c85fdf473de6b20260801c5b600083600216600f0b1315614aa4577001000000000000000162e42fefa39ef3580260801c5b600083600116600f0b1315614aca5770010000000000000000b17217f7d1cf79ab0260801c5b600f83810b60401d603f03900b1c6f7fffffffffffffffffffffffffffffff81111561099e57600080fd5b60008082600f0b1215614b0757600080fd5b50600f0b60401d90565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114612ad857600080fd5b600060208284031215614b5157600080fd5b8135614b5c81614b11565b9392505050565b60005b83811015614b7e578181015183820152602001614b66565b50506000910152565b60008151808452614b9f816020860160208601614b63565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000614b5c6020830184614b87565b600060208284031215614bf657600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461271957600080fd5b60008060408385031215614c3457600080fd5b614c3d83614bfd565b946020939093013593505050565b600060208284031215614c5d57600080fd5b614b5c82614bfd565b60008083601f840112614c7857600080fd5b50813567ffffffffffffffff811115614c9057600080fd5b602083019150836020828501011115614ca857600080fd5b9250929050565b600080600080600060808688031215614cc757600080fd5b614cd086614bfd565b9450614cde60208701614bfd565b935060408601359250606086013567ffffffffffffffff811115614d0157600080fd5b614d0d88828901614c66565b969995985093965092949392505050565b600080600060608486031215614d3357600080fd5b614d3c84614bfd565b9250614d4a60208501614bfd565b9150604084013590509250925092565b8015158114612ad857600080fd5b60008060408385031215614d7b57600080fd5b614d8483614bfd565b91506020830135614d9481614d5a565b809150509250929050565b60008083601f840112614db157600080fd5b50813567ffffffffffffffff811115614dc957600080fd5b6020830191508360208260051b8501011115614ca857600080fd5b60008060008060408587031215614dfa57600080fd5b843567ffffffffffffffff80821115614e1257600080fd5b614e1e88838901614d9f565b90965094506020870135915080821115614e3757600080fd5b50614e4487828801614d9f565b95989497509550505050565b60008060208385031215614e6357600080fd5b823567ffffffffffffffff811115614e7a57600080fd5b614e8685828601614c66565b90969095509350505050565b600080600060408486031215614ea757600080fd5b833567ffffffffffffffff811115614ebe57600080fd5b614eca86828701614d9f565b909790965060209590950135949350505050565b60008060408385031215614ef157600080fd5b50508035926020909101359150565b60008060208385031215614f1357600080fd5b823567ffffffffffffffff811115614f2a57600080fd5b614e8685828601614d9f565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060008060808587031215614f7b57600080fd5b614f8485614bfd565b9350614f9260208601614bfd565b925060408501359150606085013567ffffffffffffffff80821115614fb657600080fd5b818701915087601f830112614fca57600080fd5b813581811115614fdc57614fdc614f36565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561502257615022614f36565b816040528281528a602084870101111561503b57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561507257600080fd5b61507b83614bfd565b915061508960208401614bfd565b90509250929050565b600181811c908216806150a657607f821691505b6020821081036150df577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600073ffffffffffffffffffffffffffffffffffffffff8087168352808616602084015250606060408301528260608301527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561514457600080fd5b8260051b808560808501379190910160800195945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036151ee576151ee61518e565b5060010190565b8082018082111561099e5761099e61518e565b808202811582820484141761099e5761099e61518e565b8181038181111561099e5761099e61518e565b6000816152415761524161518e565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b601f821115610ad557600081815260208120601f850160051c8101602086101561528e5750805b601f850160051c820191505b818110156152ad5782815560010161529a565b505050505050565b67ffffffffffffffff8311156152cd576152cd614f36565b6152e1836152db8354615092565b83615267565b6000601f84116001811461533357600085156152fd5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355611d9a565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b828110156153825786850135825560209485019460019092019101615362565b50868210156153bd577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b60208152816020820152818360408301376000818301604090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160101919050565b60006020828403121561542e57600080fd5b8151614b5c81614d5a565b600080845461544781615092565b6001828116801561545f5760018114615492576154c1565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00841687528215158302870194506154c1565b8860005260208060002060005b858110156154b85781548a82015290840190820161549f565b50505082870194505b5050505083516154d5818360208801614b63565b7f2e6a736f6e0000000000000000000000000000000000000000000000000000009101908152600501949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261554457615544615506565b500490565b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152508360408301526080606083015261267d6080830184614b87565b60006020828403121561559a57600080fd5b8151614b5c81614b11565b600081600f0b83600f0b806155bc576155bc615506565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81147fffffffffffffffffffffffffffffffff80000000000000000000000000000000831416156156105761561061518e565b90059392505050565b600082600f0b82600f0b0280600f0b91508082146156395761563961518e565b5092915050565b67ffffffffffffffff8181168382160280821691908281146156645761566461518e565b50509291505056fea26469706673582212206051baa916f3a51fa6d7139c7ffc5788139a214600ea94533767c1012e30885564736f6c63430008110033

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

0000000000000000000000007f312a75b62846033bc5471c5bcb94b1abfaf06d000000000000000000000000f96ef26f3ab9dbd167578cc2bee5395cf669261e000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48

-----Decoded View---------------
Arg [0] : ethLizardsAddress (address): 0x7f312a75B62846033Bc5471c5BcB94b1abfAf06d
Arg [1] : genesisLizaddress (address): 0xF96ef26f3ab9DBd167578cC2Bee5395CF669261e
Arg [2] : USDCAddress (address): 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000007f312a75b62846033bc5471c5bcb94b1abfaf06d
Arg [1] : 000000000000000000000000f96ef26f3ab9dbd167578cc2bee5395cf669261e
Arg [2] : 000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48


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

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