ETH Price: $2,442.17 (+0.14%)

Contract

0xAc26674773271aaAfeC3d31d2Ae2C9C4DE0DE51F

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60a060401835982023-04-28 16:07:19528 days ago1682698039IN
 Create: FairxyzPolygonzkEVM
0 ETH0.036600556.85

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FairxyzPolygonzkEVM

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 140 runs

Other Settings:
default evmVersion, MIT license
File 1 of 29 : FairxyzPolygonzkEVM.sol
// SPDX-License-Identifier: MIT

// @author: Fair.xyz dev
// A love letter to Ethereum 

pragma solidity 0.8.17;

import "ERC721xyzUpgradeable.sol";
import "FairXYZDeployerErrorsAndEvents.sol";
import "IFairXYZWallets.sol";

import "AccessControlUpgradeable.sol";
import "OwnableUpgradeable.sol";
import "ReentrancyGuardUpgradeable.sol";
import "ECDSAUpgradeable.sol";
import "MerkleProofUpgradeable.sol";
import "UUPSUpgradeable.sol";

contract FairxyzPolygonzkEVM is
    ERC721xyzUpgradeable,
    AccessControlUpgradeable,
    ReentrancyGuardUpgradeable,
    OwnableUpgradeable,
    FairXYZDeployerErrorsAndEvents,
    UUPSUpgradeable
{
    using ECDSAUpgradeable for bytes32;
    using StringsUpgradeable for uint256;

    struct TokensAvailableToMint {
        /// @dev Max number of tokens on sale across the whole collection
        uint128 maxTokens;
        /// @dev The creator can enforce a max mints per wallet at a global level, i.e. across all stages
        uint128 globalMintsPerWallet;
    }

    TokensAvailableToMint public tokensAvailable;

    /// @dev URI information
    string internal zkEVMURI;

    /// @dev Bool to allow signature-less minting, in case the seller/creator wants to liberate themselves
    // from being bound to a signature generated on the Fair.xyz back-end
    bool public signatureReleased;

    /// @dev Burnable token bool
    bool public burnable;

    /// @dev Sale information - this tells the contract where the proceeds from the primary sale should go to
    address internal _primarySaleReceiver;

    /// @dev Tightly pack the parameters that define a sale stage
    struct StageData {
        uint40 startTime;
        uint40 endTime;
        uint32 mintsPerWallet;
        uint32 phaseLimit;
        uint112 price;
        bytes32 merkleRoot;
    }

    /// @dev Mapping a stage ID to its corresponding StageData struct
    mapping(uint256 => StageData) internal stageMap;

    /// @dev Mapping to keep track of the number of mints a given wallet has done on a specific stage
    mapping(uint256 => mapping(address => uint256)) public stageMints;

    /// @dev Total number of sale stages
    uint256 public totalStages;

    struct AllURIs {
        string URI1;
        string URI2;
        string URI3;
    }

    /// @dev Tightly pack the parameters that define a sale stage
    AllURIs public URIs; 

    /// @dev Pre-defined roles for AccessControl
    bytes32 public constant SECOND_ADMIN_ROLE = keccak256("T2A");
    bytes32 public constant MINTER_ROLE = keccak256("MINTER");

    uint256 internal constant stageLengthLimit = 20;

    uint256 constant FairxyzMintFee = 0.00087 ether;

    /// @dev Fair.xyz fee recipient address
    address internal constant FairxyzReceiverAddress =
        0xC5A2f45fF2d4CA27e167600b5225C7E6E187d8C0;

    /// @dev Fair.xyz address required for verifying signatures in the contract
    address internal constant FairxyzSignerAddress =
        0x7A6F5866f97034Bb7153829bdAaC1FFCb8Facb71;

    address constant DEFAULT_OPERATOR_FILTER_REGISTRY =
        0x000000000000AAeB6D7670E522A718067333cd4E;
    address constant DEFAULT_OPERATOR_FILTER_SUBSCRIPTION =
        0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;

    /// @dev EIP-712 signatures
    bytes32 constant EIP712_NAME_HASH = keccak256("Fair.xyz");
    bytes32 constant EIP712_VERSION_HASH = keccak256("1.0.0");
    bytes32 constant EIP712_DOMAIN_TYPE_HASH =
        keccak256(
            "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
        );
    bytes32 constant EIP712_MINT_TYPE_HASH =
        keccak256(
            "Mint(address recipient,uint256 quantity,uint256 nonce,uint256 maxMintsPerWallet)"
        );

    event NewStagesSet(StageData[] stages, uint256 startIndex);

    /*///////////////////////////////////////////////////////////////
                            Initialisation
    //////////////////////////////////////////////////////////////*/

    constructor() {
        _disableInitializers();
    }

    /**
     * @dev Initialise a new Creator contract by setting variables and initialising
     * inherited contracts
     */
    function _initialize(
        uint128 maxTokens_,
        string memory name_,
        string memory symbol_,
        string memory URI,
        uint96 royaltyPercentage_,
        uint128 globalMintsPerWallet_,
        address[] memory royaltyReceivers,
        address ownerOfContract,
        StageData[] calldata stages,
        bool isSBT
    ) external initializer {
        require(royaltyReceivers.length == 2);
        __ERC721_init(name_, symbol_);
        __AccessControl_init();
        __OperatorFilterer_init(
            DEFAULT_OPERATOR_FILTER_REGISTRY,
            DEFAULT_OPERATOR_FILTER_SUBSCRIPTION,
            true
        );
        _transferOwnership(ownerOfContract);
        tokensAvailable = TokensAvailableToMint(
            maxTokens_,
            globalMintsPerWallet_
        );
        zkEVMURI = URI;
        isSoulBound = isSBT;
        _primarySaleReceiver = royaltyReceivers[0];
        _setDefaultRoyalty(royaltyReceivers[1], royaltyPercentage_);
        _grantRole(DEFAULT_ADMIN_ROLE, ownerOfContract);
        _grantRole(SECOND_ADMIN_ROLE, ownerOfContract);
        if (stages.length > 0) {
            _setStages(stages, 0);
        }
    }

    /*///////////////////////////////////////////////////////////////
                            Sale stages logic
    //////////////////////////////////////////////////////////////*/

    /**
     * @dev View sale parameters corresponding to a given stage
     */
    function viewStageMap(
        uint256 stageId
    ) external view returns (StageData memory) {
        if (stageId >= totalStages) revert StageDoesNotExist();

        return stageMap[stageId];
    }

    /**
     * @dev View the current active sale stage for a sale based on being within the
     * time bounds for the start time and end time for the considered stage
     */
    function viewCurrentStage() public view returns (uint256) {
        for (uint256 i = totalStages; i > 0; ) {
            unchecked {
                --i;
            }

            if (
                block.timestamp >= stageMap[i].startTime &&
                block.timestamp <= stageMap[i].endTime
            ) {
                return i;
            }
        }

        revert SaleNotActive();
    }

    /**
     * @dev Get the price for the current active sale stage
     * reverts if there is no current active stage
     */
    function viewCurrentPrice() public view returns (uint256) {
        return stageMap[viewCurrentStage()].price + FairxyzMintFee;
    }

    /**
     * @dev Returns the earliest stage which has not closed yet
     */
    function viewLatestStage() public view returns (uint256) {
        for (uint256 i = totalStages; i > 0; ) {
            unchecked {
                --i;
            }

            if (block.timestamp > stageMap[i].endTime) {
                return i + 1;
            }
        }

        return 0;
    }

    /**
     * @dev See _setStages
     */
    function setStages(StageData[] calldata stages, uint256 startId) external {
        if (!hasRole(SECOND_ADMIN_ROLE, msg.sender)) revert UnauthorisedUser();
        _setStages(stages, startId);
    }

    /**
     * @dev Set the parameters for a list of sale stages, starting from startId onwards
     */
    function _setStages(
        StageData[] calldata stages,
        uint256 startId
    ) internal returns (uint256) {
        uint256 stagesLength = stages.length;

        uint256 latestStage = viewLatestStage();

        // Cannot set more than the stage length limit stages per transaction
        if (stagesLength > stageLengthLimit) revert StageLimitPerTx();

        uint256 currentTotalStages = totalStages;

        // Check that the stage the user is overriding from onwards is not a closed stage
        if (currentTotalStages > 0 && startId < latestStage)
            revert CannotEditPastStages();

        // The startId cannot be an arbitrary number, it must follow a sequential order based on the current number of stages
        if (startId > currentTotalStages) revert IncorrectIndex();

        // There can be no more than 20 sale stages (stageLengthLimit) between the most recent active stage and the last possible stage
        if (startId + stagesLength > latestStage + stageLengthLimit)
            revert TooManyStagesInTheFuture();

        uint256 initialStageStartTime = stageMap[startId].startTime;

        // In order to delete a stage, calldata of length 0 must be provided. The stage referenced by the startIndex
        // and all stages after that will no longer be considered for the drop
        if (stagesLength == 0) {
            // The stage cannot have started at any point for it to be deleted
            if (initialStageStartTime <= block.timestamp)
                revert CannotDeleteOngoingStage();

            // The new length of total stages is startId, as everything from there onwards is now disregarded
            totalStages = startId;
            emit NewStagesSet(stages, startId);
            return startId;
        }

        StageData memory newStage = stages[0];

        if (newStage.phaseLimit < _mintedTokens)
            revert TokenCountExceedsPhaseLimit();

        if (
            initialStageStartTime <= block.timestamp &&
            initialStageStartTime != 0 &&
            startId < totalStages
        ) {
            // If the start time of the stage being replaced is in the past and exists
            // the new stage start time must match it
            if (initialStageStartTime != newStage.startTime)
                revert InvalidStartTime();

            // The end time for a stage cannot be in the past
            if (newStage.endTime <= block.timestamp) revert EndTimeInThePast();
        } else {
            // the start time of the stage being replaced is in the future or doesn't exist
            // the new stage start time can't be in the past
            if (newStage.startTime <= block.timestamp)
                revert StartTimeInThePast();
        }

        unchecked {
            uint256 i = startId;
            uint256 stageCount = startId + stagesLength;

            do {
                if (i != startId) {
                    newStage = stages[i - startId];
                }

                // The number of tokens the user can mint up to in a stage cannot exceed the total supply available
                if (newStage.phaseLimit > tokensAvailable.maxTokens)
                    revert PhaseLimitExceedsTokenCount();

                // The end time cannot be less than the start time for a sale
                if (newStage.endTime <= newStage.startTime)
                    revert EndTimeLessThanStartTime();

                if (i > 0) {
                    uint256 previousStageEndTime = stageMap[i - 1].endTime;
                    // The number of total NFTs on sale cannot decrease below the total for a stage which has not ended
                    if (newStage.phaseLimit < stageMap[i - 1].phaseLimit) {
                        if (previousStageEndTime >= block.timestamp)
                            revert LessNFTsOnSaleThanBefore();
                    }

                    // A sale can only start after the previous one has closed
                    if (newStage.startTime <= previousStageEndTime)
                        revert PhaseStartsBeforePriorPhaseEnd();
                }

                // Update the variables in a given stage's stageMap with the correct indexing within the stages function input
                stageMap[i] = newStage;

                ++i;
            } while (i < stageCount);

            // The total number of stages is updated to be the startId + the length of stages added from there onwards
            totalStages = stageCount;

            emit NewStagesSet(stages, startId);
            return stageCount;
        }
    }

    /*///////////////////////////////////////////////////////////////
                    Sale proceeds & royalties
    //////////////////////////////////////////////////////////////*/

    /**
     * @dev Override primary sale receiver
     */
    function changePrimarySaleReceiver(
        address newPrimarySaleReceiver
    ) external {
        if (!hasRole(DEFAULT_ADMIN_ROLE, msg.sender)) revert UnauthorisedUser();
        if (newPrimarySaleReceiver == address(0)) revert ZeroAddress();
        _primarySaleReceiver = newPrimarySaleReceiver;
        emit NewPrimarySaleReceiver(_primarySaleReceiver);
    }

    /**
     * @dev Override secondary royalty receiver and royalty percentage fee
     */
    function changeSecondaryRoyaltyReceiver(
        address newSecondaryRoyaltyReceiver,
        uint96 newRoyaltyValue
    ) external {
        if (!hasRole(DEFAULT_ADMIN_ROLE, msg.sender)) revert UnauthorisedUser();
        _setDefaultRoyalty(newSecondaryRoyaltyReceiver, newRoyaltyValue);
        emit NewSecondaryRoyalties(
            newSecondaryRoyaltyReceiver,
            newRoyaltyValue
        );
    }

    /**
     * @dev Transfers the contract balance to the primary sale receiver
     */
    function withdraw() external payable onlyRole(DEFAULT_ADMIN_ROLE) {
        (bool sent_, ) = _primarySaleReceiver.call{
            value: address(this).balance
        }("");
        if (!sent_) revert ETHSendFail();
    }

    /*///////////////////////////////////////////////////////////////
                            Token metadata
    //////////////////////////////////////////////////////////////*/

    /**
     * @dev Returns the token URI
     */
    function tokenURI(
        uint256 tokenId
    ) public view virtual override returns (string memory) {
        require(_exists(tokenId), "Token has not been minted!");
        if(tokenId >= 80000) return URIs.URI1;
        if(tokenId >= 20000) return URIs.URI2;
        return URIs.URI3;
    }

    /**
     * @dev Change values for the URI. 
     */
    function changeURI(
        AllURIs calldata uris
    ) external onlyOwner {
        URIs = uris;
    }

    /*///////////////////////////////////////////////////////////////
                            Burning
    //////////////////////////////////////////////////////////////*/

    /**
     * @dev Toggle the burn state for NFTs in the contract
     */
    function toggleBurnable() external {
        if (!hasRole(SECOND_ADMIN_ROLE, msg.sender)) revert UnauthorisedUser();
        burnable = !burnable;
        emit BurnableSet(burnable);
    }

    /**
     * @dev Burn a token. Requires being an approved operator or the owner of an NFT
     */
    function burn(uint256 tokenId) external returns (uint256) {
        if (!burnable) revert BurningOff();
        if (
            !(isApprovedForAll(ownerOf(tokenId), msg.sender) ||
                msg.sender == ownerOf(tokenId) ||
                getApproved(tokenId) == msg.sender)
        ) revert BurnerIsNotApproved();
        _burn(tokenId);
        return tokenId;
    }

    /*///////////////////////////////////////////////////////////////
                        Minting + airdrop logic
    //////////////////////////////////////////////////////////////*/

    /**
     * @dev Set global max mints per wallet
     */
    function setGlobalMaxMints(uint128 newGlobalMaxMintsPerWallet) external {
        if (!hasRole(SECOND_ADMIN_ROLE, msg.sender)) revert UnauthorisedUser();
        tokensAvailable.globalMintsPerWallet = newGlobalMaxMintsPerWallet;
        emit NewMaxMintsPerWalletSet(newGlobalMaxMintsPerWallet);
    }

    /**
     * @dev Allow for signature-less minting on public sales
     */
    function releaseSignature() external {
        if (!hasRole(DEFAULT_ADMIN_ROLE, msg.sender)) revert UnauthorisedUser();
        require(!signatureReleased);
        signatureReleased = true;
        emit SignatureReleased();
    }

    /**
     * @dev Hash transaction data for minting
     */
    function hashMintParams(
        address recipient,
        uint256 quantity,
        uint256 nonce,
        uint256 maxMintsPerWallet
    ) private view returns (bytes32) {
        bytes32 digest = _hashTypedDataV4(
            keccak256(
                abi.encode(
                    EIP712_MINT_TYPE_HASH,
                    recipient,
                    quantity,
                    nonce,
                    maxMintsPerWallet
                )
            )
        );
        return digest;
    }

    /**
     * @dev Handle excess NFTs being minted in a transaction based on the different stage and sale limits
     */
    function handleReimbursement(
        address recipient,
        uint256 presentStage,
        uint256 numberOfTokens,
        uint256 currentMintedTokens,
        StageData memory dropData,
        uint256 maxMintsPerWallet
    ) internal returns (uint256) {
        // Load the total number of NFTs the user has minted across all stages
        uint256 mintsPerWallet = uint256(mintData[recipient].mintsPerWallet);

        // Load the number of NFTs the user has minted solely on the active stage
        uint256 stageMintsPerWallet = stageMints[presentStage][recipient];

        unchecked {
            // A value of 0 means there is no limit as to how many mints a wallet can do in this stage
            if (dropData.mintsPerWallet > 0) {
                // Check that the user has not reached the minting limit per wallet for this stage
                if (stageMintsPerWallet >= dropData.mintsPerWallet)
                    revert ExceedsMintsPerWallet();

                // Cap the number of tokens the user can mint so that it does not exceed the limit
                // per wallet for this stage
                if (
                    stageMintsPerWallet + numberOfTokens >
                    dropData.mintsPerWallet
                ) {
                    numberOfTokens =
                        dropData.mintsPerWallet -
                        stageMintsPerWallet;
                }
            }

            uint256 _globalMintsPerWallet = tokensAvailable
                .globalMintsPerWallet;

            // A value of 0 means there is no limit as to how many mints a wallet can do across all stages
            if (_globalMintsPerWallet > 0) {
                // Check that the user has not reached the minting limit per wallet across the whole contract
                if (mintsPerWallet >= _globalMintsPerWallet)
                    revert ExceedsMintsPerWallet();

                // Cap the number of tokens the user can mint so that it does not exceed the minting limit
                // per wallet across the whole contract
                if (mintsPerWallet + numberOfTokens > _globalMintsPerWallet) {
                    numberOfTokens = _globalMintsPerWallet - mintsPerWallet;
                }
            }

            // Cap the number of tokens the user can mint so that it does not exceed the minting limit
            // of tokens on sale for this stage
            if (currentMintedTokens + numberOfTokens > dropData.phaseLimit) {
                numberOfTokens = dropData.phaseLimit - currentMintedTokens;
            }

            // A value of 0 means there is no limit as to how many mints a wallet has been authorised to mint.
            // This form of mint authorisation is managed through pre-generated signatures - if the contract has
            // been released from signature minting then this check is omitted
            if (maxMintsPerWallet > 0 && !signatureReleased) {
                // Check that the user has not reached the minting limit per wallet they have been allowlisted for
                if (stageMintsPerWallet >= maxMintsPerWallet)
                    revert ExceedsMintsPerWallet();

                // Cap the number of tokens the user can mint so that it does not exceed the limit
                // of mints the wallet has been allowlisted for
                if (stageMintsPerWallet + numberOfTokens > maxMintsPerWallet) {
                    numberOfTokens = maxMintsPerWallet - stageMintsPerWallet;
                }
            }

            // Update the total number mints the recipient has done for this stage
            stageMintsPerWallet += numberOfTokens;
            stageMints[presentStage][recipient] = stageMintsPerWallet;

            return (numberOfTokens);
        }
    }

    /**
     * @dev Mint token(s) for public sales
     */
    function mint(
        bytes memory signature,
        uint256 nonce,
        uint256 numberOfTokens,
        uint256 maxMintsPerWallet,
        address recipient
    ) external payable {
        // At least 1 and no more than 20 tokens can be minted per transaction
        if (!((0 < numberOfTokens) && (numberOfTokens <= 20)))
            revert TokenLimitPerTx();

        // Check the active stage - reverts if no stage is active
        uint256 presentStage = viewCurrentStage();

        // Load the minting parameters for this stage
        StageData memory dropData = stageMap[presentStage];

        // Check that enough ETH is sent for the minting quantity
        uint256 costPerToken = dropData.price + FairxyzMintFee;
        if (msg.value != costPerToken * numberOfTokens) revert NotEnoughETH();

        // Nonce = 0 is reserved for airdrop mints, to distinguish them from other mints in the
        // _mint function on ERC721xyzUpgradeable
        if (nonce == 0) revert InvalidNonce();

        uint256 currentMintedTokens = _mintedTokens;

        // The number of minted tokens cannot exceed the number of NFTs on sale for this stage
        if (currentMintedTokens >= dropData.phaseLimit) revert PhaseLimitEnd();

        // If a Merkle Root is defined for the stage, then this is an allowlist stage. Thus the function merkleMint
        // must be used instead
        if (dropData.merkleRoot != bytes32(0)) revert MerkleStage();

        // If the contract is released from signature minting, skips this signature verification
        if (!signatureReleased) {
            // Hash the variables
            bytes32 messageHash = hashMintParams(
                recipient,
                numberOfTokens,
                nonce,
                maxMintsPerWallet
            );

            // Ensure the recovered address from the signature is the Fair.xyz signer address
            if (messageHash.recover(signature) != FairxyzSignerAddress)
                revert UnrecognizableHash();

            // mintData[recipient].blockNumber is the last block (nonce) that was used to mint from the given address.
            // Nonces can only increase in number in each transaction, and are part of the signature. This ensures
            // that past signatures are not reused
            if (mintData[recipient].blockNumber >= nonce) revert ReusedHash();

            // Set a time limit of 40 blocks for the signature
            if (block.number > nonce + 40) revert TimeLimit();
        }

        uint256 adjustedNumberOfTokens = handleReimbursement(
            recipient,
            presentStage,
            numberOfTokens,
            currentMintedTokens,
            dropData,
            maxMintsPerWallet
        );

        // Mint the NFTs
        _safeMint(recipient, adjustedNumberOfTokens, nonce);

        (bool feeSent, ) = FairxyzReceiverAddress.call{
            value: (FairxyzMintFee * adjustedNumberOfTokens)
        }("");
        if (!feeSent) revert ETHSendFail();

        // If the value for numberOfTokens is less than the origMintCount, then there is reimbursement
        // to be done
        if (adjustedNumberOfTokens < numberOfTokens) {
            uint256 reimbursementPrice = (numberOfTokens -
                adjustedNumberOfTokens) * costPerToken;
            (bool sent, ) = msg.sender.call{value: reimbursementPrice}("");
            if (!sent) revert ETHSendFail();
        }

        emit Mint(recipient, presentStage, adjustedNumberOfTokens);
    }

    /**
     * @notice Verify merkle proof for address and address minting limit
     */
    function verifyMerkleAddress(
        bytes32[] calldata merkleProof,
        bytes32 _merkleRoot,
        address minterAddress,
        uint256 walletLimit
    ) private pure returns (bool) {
        return
            MerkleProofUpgradeable.verify(
                merkleProof,
                _merkleRoot,
                keccak256(abi.encodePacked(minterAddress, walletLimit))
            );
    }

    /**
     * @dev Mint token(s) for allowlist sales
     */
    function merkleMint(
        bytes32[] calldata _merkleProof,
        uint256 numberOfTokens,
        uint256 maxMintsPerWallet,
        address recipient
    ) external payable {
        // At least 1 and no more than 20 tokens can be minted per transaction
        if (!((0 < numberOfTokens) && (numberOfTokens <= 20)))
            revert TokenLimitPerTx();

        // Check the active stage - reverts if no stage is active
        uint256 presentStage = viewCurrentStage();

        // Load the minting parameters for this stage
        StageData memory dropData = stageMap[presentStage];

        // Check that enough ETH is sent for the minting quantity
        uint256 costPerToken = dropData.price + FairxyzMintFee;
        if (msg.value != costPerToken * numberOfTokens) revert NotEnoughETH();

        // If a Merkle Root is not defined for the stage, then this is an public sale stage. Thus the function mint()
        // must be used instead
        if (dropData.merkleRoot == bytes32(0)) revert PublicStage();

        uint256 currentMintedTokens = _mintedTokens;

        // The number of minted tokens cannot exceed the number of NFTs on sale for this stage
        if (currentMintedTokens >= dropData.phaseLimit) revert PhaseLimitEnd();

        // Verify the Merkle Proof for the recipient address and the maximum number of mints the wallet has been assigned
        // on the allowlist
        if (
            !(
                verifyMerkleAddress(
                    _merkleProof,
                    dropData.merkleRoot,
                    recipient,
                    maxMintsPerWallet
                )
            )
        ) revert MerkleProofFail();

        uint256 adjustedNumberOfTokens = handleReimbursement(
            recipient,
            presentStage,
            numberOfTokens,
            currentMintedTokens,
            dropData,
            maxMintsPerWallet
        );

        // Mint NFTs
        _safeMint(recipient, adjustedNumberOfTokens, block.number);
        (bool feeSent, ) = FairxyzReceiverAddress.call{
            value: (FairxyzMintFee * adjustedNumberOfTokens)
        }("");
        if (!feeSent) revert ETHSendFail();

        // If the value for numberOfTokens is less than the origMintCount, then there is reimbursement
        // to be done
        if (adjustedNumberOfTokens < numberOfTokens) {
            uint256 reimbursementPrice = (numberOfTokens -
                adjustedNumberOfTokens) * costPerToken;
            (bool sent, ) = msg.sender.call{value: reimbursementPrice}("");
            if (!sent) revert ETHSendFail();
        }

        emit Mint(recipient, presentStage, adjustedNumberOfTokens);
    }

    /**
     * @dev See the total mints across all stages for a wallet
     */
    function totalWalletMints(
        address minterAddress
    ) external view returns (uint256) {
        return mintData[minterAddress].mintsPerWallet;
    }

    /**
     * @dev Airdrop tokens to a list of addresses
     */
    function airdrop(
        address[] memory address_,
        uint256[] memory tokenCounts,
        uint256 expectedFirst,
        uint256 expectedLast
    ) external {

        if (address_.length > 100) revert AddressLimitPerTx();

        require(address_.length == tokenCounts.length, "Wrong array length");

        require(_mintedTokens == expectedFirst, "Wrong start ID");

        if (
            !hasRole(SECOND_ADMIN_ROLE, msg.sender) &&
            !hasRole(MINTER_ROLE, msg.sender)
        ) revert UnauthorisedUser();
    
        unchecked {

            for (uint256 i; i < address_.length; ) {
                _mint(address_[i], tokenCounts[i], 0);
                ++i;
            }
            
        }

        require(_mintedTokens == expectedLast, "Wrong end ID");
    }

    /*///////////////////////////////////////////////////////////////
                            Miscellanous
    //////////////////////////////////////////////////////////////*/

    function supportsInterface(
        bytes4 interfaceId
    )
        public
        view
        virtual
        override(AccessControlUpgradeable, ERC721xyzUpgradeable)
        returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }

    /**
     * @dev overrides {UpdatableOperatorFilterUpgradeable} function to determine the role of operator filter admin
     */
    function _isOperatorFilterAdmin(
        address operator
    ) internal view override returns (bool) {
        return hasRole(DEFAULT_ADMIN_ROLE, operator);
    }

    /**
     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
     * function returns the hash of the fully encoded EIP712 message for this domain.
     */
    function _hashTypedDataV4(
        bytes32 structHash
    ) internal view virtual returns (bytes32) {
        bytes32 domainSeparator = keccak256(
            abi.encode(
                EIP712_DOMAIN_TYPE_HASH,
                EIP712_NAME_HASH,
                EIP712_VERSION_HASH,
                block.chainid,
                address(this)
            )
        );

        return ECDSAUpgradeable.toTypedDataHash(domainSeparator, structHash);
    }

    function _authorizeUpgrade(address) internal override onlyOwner {}

    function emitEvent() public onlyOwner{
        emit NewCloneTicker(address(this), owner(), _symbol);
    }

    function toggleSoulBound() public onlyOwner{
        isSoulBound = !isSoulBound;
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 2 of 29 : ERC721xyzUpgradeable.sol
// SPDX-License-Identifier: MIT

// @ Fair.xyz dev

pragma solidity 0.8.17;

import "IERC721Upgradeable.sol";
import "IERC721ReceiverUpgradeable.sol";
import "IERC721MetadataUpgradeable.sol";
import "AddressUpgradeable.sol";
import "ContextUpgradeable.sol";
import "StringsUpgradeable.sol";
import "ERC165Upgradeable.sol";
import "ERC2981Upgradeable.sol";
import "Initializable.sol";

import "OperatorFiltererUpgradeable.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, with modifications by the Fair.xyz team, thus setting the ERC721xyz standard
 */
abstract contract ERC721xyzUpgradeable is
    ContextUpgradeable,
    ERC165Upgradeable,
    IERC721Upgradeable,
    ERC2981Upgradeable,
    IERC721MetadataUpgradeable,
    OperatorFiltererUpgradeable
{
    using AddressUpgradeable for address;
    using StringsUpgradeable for uint256;

    // Token name
    string internal _name;

    // Token symbol
    string internal _symbol;

    // Token mint count
    uint256 public _mintedTokens;

    // Token burnt count
    uint256 internal _burntTokensCount;

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

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

    // Burnt tokens
    mapping(uint256 => bool) private _tokenIsBurnt;

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

    // Mint information per wallet
    struct minterData {
        uint96 balance;
        uint96 mintsPerWallet;
        uint64 blockNumber;
    }

    mapping(address => minterData) internal mintData;

    bool public isSoulBound;

    error TokenIsSoulBound(); 

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    function __ERC721_init(string memory name_, string memory symbol_)
        internal
        onlyInitializing
    {
        __ERC721_init_unchained(name_, symbol_);
    }

    function __ERC721_init_unchained(string memory name_, string memory symbol_)
        internal
        onlyInitializing
    {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(ERC2981Upgradeable, ERC165Upgradeable, IERC165Upgradeable)
        returns (bool)
    {
        return
            interfaceId == type(IERC2981Upgradeable).interfaceId ||
            interfaceId == type(IERC721Upgradeable).interfaceId ||
            interfaceId == type(IERC721MetadataUpgradeable).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner)
        public
        view
        virtual
        override
        returns (uint256)
    {
        require(
            owner != address(0),
            "ERC721: balance query for the zero address"
        );
        return mintData[owner].balance;
    }

    /**
     * @dev Returns number of minted Tokens
     */
    function viewMinted() public view virtual returns (uint256) {
        return _mintedTokens;
    }

    // return all tokens
    function totalSupply() public view virtual returns (uint256) {
        return _mintedTokens - _burntTokensCount;
    }

    /**
     * @dev Mints a batch of `tokenIds` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * In order to employ tight-packing, we use uint96 for the user balance and mints per wallet,
     * and uint64 for the nonce. This is suitable because uint96 supports up to 2**96 - 2 = 7.92*10**28
     * individual tokens being minted. Anything higher than this will cause an overflow. Similarly, the 
     * nonce stores block timestamps, in UNIX time, for which uint64 is more than sufficient.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     *
     * Emits {Transfer} events.
     */
    function _mint(
        address to,
        uint256 numberOfTokens,
        uint256 nonce
    ) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");

        _beforeTokenTransfer(address(0), to, _mintedTokens);

        uint256 orig_count = _mintedTokens;

        unchecked {
            uint256 new_count = orig_count + numberOfTokens;
            _mintedTokens = new_count;

            mintData[to].balance += uint96(numberOfTokens);

            // Nonce = 0 is for airdrop mints, which do not count towards wallet minting
            // limits or signature nonce updates
            if (nonce != 0) {
                mintData[to].mintsPerWallet += uint96(numberOfTokens);
                mintData[to].blockNumber = uint64(nonce);
            }

            _origOwners[new_count] = to;

            uint256 i = orig_count + 1;
            uint256 loop_ = new_count + 1;

            do {
                emit Transfer(address(0), to, i);
                ++i;
            } while (i < loop_);
        }

        _afterTokenTransfer(address(0), to, _mintedTokens);
    }

    /**
     * @dev Returns owner of token ID.
     */
    function ownerOf(uint256 tokenId)
        public
        view
        virtual
        override
        returns (address)
    {
        require(_exists(tokenId), "ERC721xyz: Query for non existent token!");

        uint256 counter = tokenId;

        address _owner = _owners[tokenId];

        if (_owner == address(0)) {
            while (true) {
                _owner = _origOwners[counter];
                if (_owner != address(0)) {
                    return _owner;
                }
                unchecked {
                    ++counter;
                }
            }
        }

        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 {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId)
        public
        virtual
        override
        onlyAllowedOperatorApproval(to)
    {
        address owner = ERC721xyzUpgradeable.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

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

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId)
        public
        view
        virtual
        override
        returns (address)
    {
        require(
            _exists(tokenId),
            "ERC721: approved query for nonexistent token"
        );

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved)
        public
        virtual
        override
        onlyAllowedOperatorApproval(operator)
    {
        _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 onlyAllowedOperator(from) {
        //solhint-disable-next-line max-line-length
        require(
            _isApprovedOrOwner(_msgSender(), tokenId),
            "ERC721: transfer caller is not owner nor approved"
        );

        _transfer(from, to, tokenId);
    }

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

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override onlyAllowedOperator(from) {
        require(
            _isApprovedOrOwner(_msgSender(), tokenId),
            "ERC721: transfer caller is not owner nor 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 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) {
        if (_tokenIsBurnt[tokenId]) return false;

        return (0 < tokenId && tokenId <= _mintedTokens);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId)
        internal
        view
        virtual
        returns (bool)
    {
        require(
            _exists(tokenId),
            "ERC721: operator query for nonexistent token"
        );
        address owner = ERC721xyzUpgradeable.ownerOf(tokenId);
        return (spender == owner ||
            getApproved(tokenId) == spender ||
            isApprovedForAll(owner, 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 tokenCount,
        uint256 nonce
    ) internal virtual {
        _safeMint(to, tokenCount, "", nonce);
    }

    /**
     * @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 tokenCount,
        bytes memory _data,
        uint256 nonce
    ) internal virtual {
        _mint(to, tokenCount, nonce);
        require(
            _checkOnERC721Received(address(0), to, _mintedTokens, _data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        require(_exists(tokenId), "ERC721xyz: Query for nonexistent token!");
        address owner = ERC721xyzUpgradeable.ownerOf(tokenId);

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

        // Clear approvals
        _approve(address(0), tokenId);

        unchecked {
            mintData[owner].balance -= 1;
            _tokenIsBurnt[tokenId] = true;
            _burntTokensCount += 1;
        }

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

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

    /**
     * @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(
            ERC721xyzUpgradeable.ownerOf(tokenId) == from,
            "ERC721: transfer from incorrect owner"
        );
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        unchecked {
            mintData[from].balance -= 1;
            mintData[to].balance += 1;
            _owners[tokenId] = to;
        }

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

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

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {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 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
                IERC721ReceiverUpgradeable(to).onERC721Received(
                    _msgSender(),
                    from,
                    tokenId,
                    _data
                )
            returns (bytes4 retval) {
                return
                    retval ==
                    IERC721ReceiverUpgradeable.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert(
                        "ERC721: transfer to non ERC721Receiver implementer"
                    );
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal {
        if (from != address(0) && to != address(0)) {
            if (isSoulBound) revert TokenIsSoulBound();
        }
    }

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[43] private __gap;
}

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

pragma solidity ^0.8.0;

import "IERC165Upgradeable.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721Upgradeable is IERC165Upgradeable {
    /**
     * @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 4 of 29 : IERC165Upgradeable.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 IERC165Upgradeable {
    /**
     * @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 5 of 29 : IERC721ReceiverUpgradeable.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 IERC721ReceiverUpgradeable {
    /**
     * @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 29 : IERC721MetadataUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "IERC721Upgradeable.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721MetadataUpgradeable is IERC721Upgradeable {
    /**
     * @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 29 : AddressUpgradeable.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 AddressUpgradeable {
    /**
     * @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 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 29 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;
import "Initializable.sol";

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

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

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

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

pragma solidity ^0.8.2;

import "AddressUpgradeable.sol";

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

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

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

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts.
     *
     * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
     * constructor.
     *
     * Emits an {Initialized} event.
     */
    modifier initializer() {
        bool isTopLevelCall = !_initializing;
        require(
            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
            "Initializable: contract is already initialized"
        );
        _initialized = 1;
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * A reinitializer may be used after the original initialization step. This is essential to configure modules that
     * are added through upgrades and that require initialization.
     *
     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
     * cannot be nested. If one is invoked in the context of another, execution will revert.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     *
     * WARNING: setting the version to 255 will prevent any future reinitialization.
     *
     * Emits an {Initialized} event.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     *
     * Emits an {Initialized} event the first time it is successfully executed.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized < type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }

    /**
     * @dev Internal function that returns the initialized version. Returns `_initialized`
     */
    function _getInitializedVersion() internal view returns (uint8) {
        return _initialized;
    }

    /**
     * @dev Internal function that returns the initialized version. Returns `_initializing`
     */
    function _isInitializing() internal view returns (bool) {
        return _initializing;
    }
}

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

pragma solidity ^0.8.0;

import "MathUpgradeable.sol";

/**
 * @dev String operations.
 */
library StringsUpgradeable {
    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 = MathUpgradeable.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, MathUpgradeable.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 11 of 29 : MathUpgradeable.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 MathUpgradeable {
    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 12 of 29 : ERC165Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "IERC165Upgradeable.sol";
import "Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {
    function __ERC165_init() internal onlyInitializing {
    }

    function __ERC165_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165Upgradeable).interfaceId;
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 13 of 29 : ERC2981Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol)

pragma solidity ^0.8.0;

import "IERC2981Upgradeable.sol";
import "ERC165Upgradeable.sol";
import "Initializable.sol";

/**
 * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.
 *
 * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for
 * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.
 *
 * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the
 * fee is specified in basis points by default.
 *
 * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See
 * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to
 * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.
 *
 * _Available since v4.5._
 */
abstract contract ERC2981Upgradeable is Initializable, IERC2981Upgradeable, ERC165Upgradeable {
    function __ERC2981_init() internal onlyInitializing {
    }

    function __ERC2981_init_unchained() internal onlyInitializing {
    }
    struct RoyaltyInfo {
        address receiver;
        uint96 royaltyFraction;
    }

    RoyaltyInfo private _defaultRoyaltyInfo;
    mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo;

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

    /**
     * @inheritdoc IERC2981Upgradeable
     */
    function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) {
        RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId];

        if (royalty.receiver == address(0)) {
            royalty = _defaultRoyaltyInfo;
        }

        uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator();

        return (royalty.receiver, royaltyAmount);
    }

    /**
     * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
     * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
     * override.
     */
    function _feeDenominator() internal pure virtual returns (uint96) {
        return 10000;
    }

    /**
     * @dev Sets the royalty information that all ids in this contract will default to.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: invalid receiver");

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Removes default royalty information.
     */
    function _deleteDefaultRoyalty() internal virtual {
        delete _defaultRoyaltyInfo;
    }

    /**
     * @dev Sets the royalty information for a specific token id, overriding the global default.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setTokenRoyalty(
        uint256 tokenId,
        address receiver,
        uint96 feeNumerator
    ) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: Invalid parameters");

        _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Resets royalty information for the token id back to the global default.
     */
    function _resetTokenRoyalty(uint256 tokenId) internal virtual {
        delete _tokenRoyaltyInfo[tokenId];
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[48] private __gap;
}

File 14 of 29 : IERC2981Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

import "IERC165Upgradeable.sol";

/**
 * @dev Interface for the NFT Royalty Standard.
 *
 * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
 * support for royalty payments across all NFT marketplaces and ecosystem participants.
 *
 * _Available since v4.5._
 */
interface IERC2981Upgradeable is IERC165Upgradeable {
    /**
     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
     * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 15 of 29 : OperatorFiltererUpgradeable.sol
// SPDX-License-Identifier: MIT

// @author: Fair.xyz dev

pragma solidity 0.8.17;

import {IOperatorFilterRegistry} from "IOperatorFilterRegistry.sol";
import {Initializable} from "Initializable.sol";

abstract contract OperatorFiltererUpgradeable is Initializable {
    error OnlyAdmin();
    error OperatorNotAllowed(address operator);
    error RegistryInvalid();

    event OperatorFilterDisabled(bool disabled);

    bool public operatorFilterDisabled;

    IOperatorFilterRegistry public operatorFilterRegistry;

    function __OperatorFilterer_init(
        address registry_,
        address subscriptionOrRegistrantToCopy,
        bool subscribe
    ) internal onlyInitializing {
        if (address(registry_).code.length > 0) {
            IOperatorFilterRegistry registry = IOperatorFilterRegistry(
                registry_
            );
            _registerAndSubscribe(
                registry,
                subscriptionOrRegistrantToCopy,
                subscribe
            );
            operatorFilterRegistry = registry;
        }
    }

    // * MODIFIERS * //

    modifier onlyAllowedOperator(address from) virtual {
        // Check registry code length to facilitate testing in environments without a deployed registry.
        if (
            !operatorFilterDisabled &&
            address(operatorFilterRegistry).code.length > 0
        ) {
            // Allow spending tokens from addresses with balance
            // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred
            // from an EOA.
            if (from == msg.sender) {
                _;
                return;
            }
            if (
                !operatorFilterRegistry.isOperatorAllowed(
                    address(this),
                    msg.sender
                )
            ) {
                revert OperatorNotAllowed(msg.sender);
            }
        }
        _;
    }

    modifier onlyAllowedOperatorApproval(address operator) virtual {
        // Check registry code length to facilitate testing in environments without a deployed registry.
        if (
            !operatorFilterDisabled &&
            address(operatorFilterRegistry).code.length > 0
        ) {
            if (
                !operatorFilterRegistry.isOperatorAllowed(
                    address(this),
                    operator
                )
            ) {
                revert OperatorNotAllowed(operator);
            }
        }
        _;
    }

    modifier onlyOperatorFilterAdmin() {
        if (!_isOperatorFilterAdmin(msg.sender)) {
            revert OnlyAdmin();
        }
        _;
    }

    // * ADMIN * //

    /**
     * @notice Enable/Disable Operator Filter
     */
    function toggleOperatorFilterDisabled()
        public
        virtual
        onlyOperatorFilterAdmin
        returns (bool)
    {
        bool disabled = !operatorFilterDisabled;
        operatorFilterDisabled = disabled;
        emit OperatorFilterDisabled(disabled);
        return disabled;
    }

    /**
     * @notice Update Operator Filter Registry and optionally subscribe to registrant (if supplied)
     */
    function updateOperatorFilterRegistry(
        address newRegistry,
        address subscriptionOrRegistrantToCopy,
        bool subscribe
    ) public virtual onlyOperatorFilterAdmin {
        IOperatorFilterRegistry registry = IOperatorFilterRegistry(newRegistry);
        if (address(registry).code.length == 0) revert RegistryInvalid();

        // it is technically possible that the owner has already registered the contract with the registry directly
        // so we check before attempting to subscribe, otherwise it might revert without saving the address here
        if (!registry.isRegistered(address(this))) {
            _registerAndSubscribe(
                registry,
                subscriptionOrRegistrantToCopy,
                subscribe
            );
        }
        operatorFilterRegistry = registry;
    }

    /**
     * @notice Update Subcription at the current Operator Filter Registry
     */
    function updateRegistrySubscription(
        address subscriptionOrRegistrantToCopy,
        bool subscribe,
        bool copyEntries
    ) public virtual onlyOperatorFilterAdmin {
        IOperatorFilterRegistry registry = operatorFilterRegistry;
        if (address(registry).code.length == 0) revert RegistryInvalid();
        if (subscriptionOrRegistrantToCopy == address(0)) {
            registry.unsubscribe(address(this), copyEntries);
        } else {
            _registerAndSubscribe(
                registry,
                subscriptionOrRegistrantToCopy,
                subscribe
            );
        }
    }

    // * INTERNAL * //

    /**
     * @dev Inheriting contract is responsible for implementation
     */
    function _isOperatorFilterAdmin(address operator)
        internal
        view
        virtual
        returns (bool);

    /**
     * @dev Register and/or subscribe to/copy entries of registrant at the given registry
     */
    function _registerAndSubscribe(
        IOperatorFilterRegistry registry,
        address subscriptionOrRegistrantToCopy,
        bool subscribe
    ) internal virtual {
        if (registry.isRegistered(address(this))) {
            if (subscribe) {
                registry.subscribe(
                    address(this),
                    subscriptionOrRegistrantToCopy
                );
            } else {
                registry.copyEntriesOf(
                    address(this),
                    subscriptionOrRegistrantToCopy
                );
            }
        } else {
            if (subscribe) {
                registry.registerAndSubscribe(
                    address(this),
                    subscriptionOrRegistrantToCopy
                );
            } else {
                if (subscriptionOrRegistrantToCopy != address(0)) {
                    registry.registerAndCopyEntries(
                        address(this),
                        subscriptionOrRegistrantToCopy
                    );
                } else {
                    registry.register(address(this));
                }
            }
        }
    }

    uint256[50] private __gap;
}

File 16 of 29 : IOperatorFilterRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

interface IOperatorFilterRegistry {
    function isOperatorAllowed(address registrant, address operator)
        external
        view
        returns (bool);

    function register(address registrant) external;

    function registerAndSubscribe(address registrant, address subscription)
        external;

    function registerAndCopyEntries(
        address registrant,
        address registrantToCopy
    ) external;

    function unregister(address addr) external;

    function updateOperator(
        address registrant,
        address operator,
        bool filtered
    ) external;

    function updateOperators(
        address registrant,
        address[] calldata operators,
        bool filtered
    ) external;

    function updateCodeHash(
        address registrant,
        bytes32 codehash,
        bool filtered
    ) external;

    function updateCodeHashes(
        address registrant,
        bytes32[] calldata codeHashes,
        bool filtered
    ) external;

    function subscribe(address registrant, address registrantToSubscribe)
        external;

    function unsubscribe(address registrant, bool copyExistingEntries) external;

    function subscriptionOf(address addr) external returns (address registrant);

    function subscribers(address registrant)
        external
        returns (address[] memory);

    function subscriberAt(address registrant, uint256 index)
        external
        returns (address);

    function copyEntriesOf(address registrant, address registrantToCopy)
        external;

    function isOperatorFiltered(address registrant, address operator)
        external
        returns (bool);

    function isCodeHashOfFiltered(address registrant, address operatorWithCode)
        external
        returns (bool);

    function isCodeHashFiltered(address registrant, bytes32 codeHash)
        external
        returns (bool);

    function filteredOperators(address addr)
        external
        returns (address[] memory);

    function filteredCodeHashes(address addr)
        external
        returns (bytes32[] memory);

    function filteredOperatorAt(address registrant, uint256 index)
        external
        returns (address);

    function filteredCodeHashAt(address registrant, uint256 index)
        external
        returns (bytes32);

    function isRegistered(address addr) external returns (bool);

    function codeHashOf(address addr) external returns (bytes32);
}

File 17 of 29 : FairXYZDeployerErrorsAndEvents.sol
// SPDX-License-Identifier: MIT

// @author: Fair.xyz dev

pragma solidity 0.8.17;

contract FairXYZDeployerErrorsAndEvents{

    /// @dev Events
    event Airdrop(uint256 tokenCount, uint256 newTotal, address[] recipients);
    event BurnableSet(bool burnState);
    event SignatureReleased();
    event NewCloneTicker(address _newClone, address _owner, string symbol);
    event NewMaxMintsPerWalletSet(uint128 newGlobalMintsPerWallet);
    event NewPrimarySaleReceiver(address newPrimaryReceiver);
    event NewSecondaryRoyalties(
        address newSecondaryReceiver,
        uint96 newRoyalty
    );
    event Mint(address minterAddress, uint256 stage, uint256 mintCount);

    /// @dev Errors
    error AddressLimitPerTx();
    error BurnerIsNotApproved();
    error BurningOff();
    error CannotDeleteOngoingStage();
    error CannotEditPastStages();
    error ETHSendFail();
    error EndTimeInThePast();
    error EndTimeLessThanStartTime();
    error ExceedsMintsPerWallet();
    error ExceedsNFTsOnSale();
    error IncorrectIndex();
    error InvalidNonce();
    error InvalidStartTime();
    error LessNFTsOnSaleThanBefore();
    error MerkleProofFail();
    error MerkleStage();
    error NotEnoughETH();
    error PhaseLimitEnd();
    error PhaseLimitExceedsTokenCount();
    error PhaseStartsBeforePriorPhaseEnd();
    error PublicStage();
    error ReusedHash();
    error SaleEnd();
    error SaleNotActive();
    error StageDoesNotExist();
    error StageLimitPerTx();
    error StartTimeInThePast();
    error TimeLimit();
    error TokenCountExceedsPhaseLimit();
    error TokenDoesNotExist();
    error TokenLimitPerTx();
    error TooManyStagesInTheFuture();
    error UnauthorisedUser();
    error UnrecognizableHash();
    error ZeroAddress();

}

File 18 of 29 : IFairXYZWallets.sol
// SPDX-License-Identifier: MIT

// @ Fair.xyz dev

pragma solidity 0.8.17;

interface IFairXYZWallets {
    function viewWithdraw() external view returns (address);

    function viewPathURI(string memory pathURI_)
        external
        view
        returns (string memory);
}

File 19 of 29 : AccessControlUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "IAccessControlUpgradeable.sol";
import "ContextUpgradeable.sol";
import "StringsUpgradeable.sol";
import "ERC165Upgradeable.sol";
import "Initializable.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {
    function __AccessControl_init() internal onlyInitializing {
    }

    function __AccessControl_init_unchained() internal onlyInitializing {
    }
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

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

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        StringsUpgradeable.toHexString(account),
                        " is missing role ",
                        StringsUpgradeable.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * May emit a {RoleGranted} event.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 20 of 29 : IAccessControlUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControlUpgradeable {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

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

pragma solidity ^0.8.0;

import "ContextUpgradeable.sol";
import "Initializable.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * 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 OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

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

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

    function __Ownable_init_unchained() internal onlyInitializing {
        _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);
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 22 of 29 : ReentrancyGuardUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;
import "Initializable.sol";

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuardUpgradeable is Initializable {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    function __ReentrancyGuard_init() internal onlyInitializing {
        __ReentrancyGuard_init_unchained();
    }

    function __ReentrancyGuard_init_unchained() internal onlyInitializing {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 23 of 29 : ECDSAUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "StringsUpgradeable.sol";

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

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

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

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

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

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

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

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

        return (signer, RecoverError.NoError);
    }

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

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

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

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 24 of 29 : MerkleProofUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The tree and the proofs can be generated using our
 * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
 * You will find a quickstart guide in the readme.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 * OpenZeppelin's JavaScript library generates merkle trees that are safe
 * against this attack out of the box.
 */
library MerkleProofUpgradeable {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Calldata version of {verify}
     *
     * _Available since v4.7._
     */
    function verifyCalldata(
        bytes32[] calldata proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Calldata version of {processProof}
     *
     * _Available since v4.7._
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     *
     * _Available since v4.7._
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}.
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

File 25 of 29 : UUPSUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/UUPSUpgradeable.sol)

pragma solidity ^0.8.0;

import "draft-IERC1822Upgradeable.sol";
import "ERC1967UpgradeUpgradeable.sol";
import "Initializable.sol";

/**
 * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an
 * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.
 *
 * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is
 * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing
 * `UUPSUpgradeable` with a custom implementation of upgrades.
 *
 * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.
 *
 * _Available since v4.1._
 */
abstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {
    function __UUPSUpgradeable_init() internal onlyInitializing {
    }

    function __UUPSUpgradeable_init_unchained() internal onlyInitializing {
    }
    /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment
    address private immutable __self = address(this);

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

    /**
     * @dev Check that the execution is not being performed through a delegate call. This allows a function to be
     * callable on the implementing contract but not through proxies.
     */
    modifier notDelegated() {
        require(address(this) == __self, "UUPSUpgradeable: must not be called through delegatecall");
        _;
    }

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

    /**
     * @dev Upgrade the implementation of the proxy to `newImplementation`.
     *
     * Calls {_authorizeUpgrade}.
     *
     * Emits an {Upgraded} event.
     */
    function upgradeTo(address newImplementation) external virtual onlyProxy {
        _authorizeUpgrade(newImplementation);
        _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);
    }

    /**
     * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call
     * encoded in `data`.
     *
     * Calls {_authorizeUpgrade}.
     *
     * Emits an {Upgraded} event.
     */
    function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {
        _authorizeUpgrade(newImplementation);
        _upgradeToAndCallUUPS(newImplementation, data, true);
    }

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 26 of 29 : draft-IERC1822Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)

pragma solidity ^0.8.0;

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

File 27 of 29 : ERC1967UpgradeUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)

pragma solidity ^0.8.2;

import "IBeaconUpgradeable.sol";
import "draft-IERC1822Upgradeable.sol";
import "AddressUpgradeable.sol";
import "StorageSlotUpgradeable.sol";
import "Initializable.sol";

/**
 * @dev This abstract contract provides getters and event emitting update functions for
 * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.
 *
 * _Available since v4.1._
 *
 * @custom:oz-upgrades-unsafe-allow delegatecall
 */
abstract contract ERC1967UpgradeUpgradeable is Initializable {
    function __ERC1967Upgrade_init() internal onlyInitializing {
    }

    function __ERC1967Upgrade_init_unchained() internal onlyInitializing {
    }
    // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1
    bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;

    /**
     * @dev Storage slot with the address of the current implementation.
     * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is
     * validated in the constructor.
     */
    bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;

    /**
     * @dev Emitted when the implementation is upgraded.
     */
    event Upgraded(address indexed implementation);

    /**
     * @dev Returns the current implementation address.
     */
    function _getImplementation() internal view returns (address) {
        return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value;
    }

    /**
     * @dev Stores a new address in the EIP1967 implementation slot.
     */
    function _setImplementation(address newImplementation) private {
        require(AddressUpgradeable.isContract(newImplementation), "ERC1967: new implementation is not a contract");
        StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
    }

    /**
     * @dev Perform implementation upgrade
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeTo(address newImplementation) internal {
        _setImplementation(newImplementation);
        emit Upgraded(newImplementation);
    }

    /**
     * @dev Perform implementation upgrade with additional setup call.
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeToAndCall(
        address newImplementation,
        bytes memory data,
        bool forceCall
    ) internal {
        _upgradeTo(newImplementation);
        if (data.length > 0 || forceCall) {
            _functionDelegateCall(newImplementation, data);
        }
    }

    /**
     * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeToAndCallUUPS(
        address newImplementation,
        bytes memory data,
        bool forceCall
    ) internal {
        // Upgrades from old implementations will perform a rollback test. This test requires the new
        // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing
        // this special case will break upgrade paths from old UUPS implementation to new ones.
        if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {
            _setImplementation(newImplementation);
        } else {
            try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {
                require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID");
            } catch {
                revert("ERC1967Upgrade: new implementation is not UUPS");
            }
            _upgradeToAndCall(newImplementation, data, forceCall);
        }
    }

    /**
     * @dev Storage slot with the admin of the contract.
     * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is
     * validated in the constructor.
     */
    bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;

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

    /**
     * @dev Returns the current admin.
     */
    function _getAdmin() internal view returns (address) {
        return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value;
    }

    /**
     * @dev Stores a new address in the EIP1967 admin slot.
     */
    function _setAdmin(address newAdmin) private {
        require(newAdmin != address(0), "ERC1967: new admin is the zero address");
        StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin;
    }

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

    /**
     * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.
     * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.
     */
    bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;

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

    /**
     * @dev Returns the current beacon.
     */
    function _getBeacon() internal view returns (address) {
        return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value;
    }

    /**
     * @dev Stores a new beacon in the EIP1967 beacon slot.
     */
    function _setBeacon(address newBeacon) private {
        require(AddressUpgradeable.isContract(newBeacon), "ERC1967: new beacon is not a contract");
        require(
            AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),
            "ERC1967: beacon implementation is not a contract"
        );
        StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon;
    }

    /**
     * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does
     * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).
     *
     * Emits a {BeaconUpgraded} event.
     */
    function _upgradeBeaconToAndCall(
        address newBeacon,
        bytes memory data,
        bool forceCall
    ) internal {
        _setBeacon(newBeacon);
        emit BeaconUpgraded(newBeacon);
        if (data.length > 0 || forceCall) {
            _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);
        }
    }

    /**
     * @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) private returns (bytes memory) {
        require(AddressUpgradeable.isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return AddressUpgradeable.verifyCallResult(success, returndata, "Address: low-level delegate call failed");
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 28 of 29 : IBeaconUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)

pragma solidity ^0.8.0;

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

File 29 of 29 : StorageSlotUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)

pragma solidity ^0.8.0;

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

    struct BooleanSlot {
        bool value;
    }

    struct Bytes32Slot {
        bytes32 value;
    }

    struct Uint256Slot {
        uint256 value;
    }

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

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

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

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

Settings
{
  "evmVersion": "istanbul",
  "optimizer": {
    "enabled": true,
    "runs": 140
  },
  "libraries": {
    "FairxyzPolygonzkEVM.sol": {}
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AddressLimitPerTx","type":"error"},{"inputs":[],"name":"BurnerIsNotApproved","type":"error"},{"inputs":[],"name":"BurningOff","type":"error"},{"inputs":[],"name":"CannotDeleteOngoingStage","type":"error"},{"inputs":[],"name":"CannotEditPastStages","type":"error"},{"inputs":[],"name":"ETHSendFail","type":"error"},{"inputs":[],"name":"EndTimeInThePast","type":"error"},{"inputs":[],"name":"EndTimeLessThanStartTime","type":"error"},{"inputs":[],"name":"ExceedsMintsPerWallet","type":"error"},{"inputs":[],"name":"ExceedsNFTsOnSale","type":"error"},{"inputs":[],"name":"IncorrectIndex","type":"error"},{"inputs":[],"name":"InvalidNonce","type":"error"},{"inputs":[],"name":"InvalidStartTime","type":"error"},{"inputs":[],"name":"LessNFTsOnSaleThanBefore","type":"error"},{"inputs":[],"name":"MerkleProofFail","type":"error"},{"inputs":[],"name":"MerkleStage","type":"error"},{"inputs":[],"name":"NotEnoughETH","type":"error"},{"inputs":[],"name":"OnlyAdmin","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"PhaseLimitEnd","type":"error"},{"inputs":[],"name":"PhaseLimitExceedsTokenCount","type":"error"},{"inputs":[],"name":"PhaseStartsBeforePriorPhaseEnd","type":"error"},{"inputs":[],"name":"PublicStage","type":"error"},{"inputs":[],"name":"RegistryInvalid","type":"error"},{"inputs":[],"name":"ReusedHash","type":"error"},{"inputs":[],"name":"SaleEnd","type":"error"},{"inputs":[],"name":"SaleNotActive","type":"error"},{"inputs":[],"name":"StageDoesNotExist","type":"error"},{"inputs":[],"name":"StageLimitPerTx","type":"error"},{"inputs":[],"name":"StartTimeInThePast","type":"error"},{"inputs":[],"name":"TimeLimit","type":"error"},{"inputs":[],"name":"TokenCountExceedsPhaseLimit","type":"error"},{"inputs":[],"name":"TokenDoesNotExist","type":"error"},{"inputs":[],"name":"TokenIsSoulBound","type":"error"},{"inputs":[],"name":"TokenLimitPerTx","type":"error"},{"inputs":[],"name":"TooManyStagesInTheFuture","type":"error"},{"inputs":[],"name":"UnauthorisedUser","type":"error"},{"inputs":[],"name":"UnrecognizableHash","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenCount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newTotal","type":"uint256"},{"indexed":false,"internalType":"address[]","name":"recipients","type":"address[]"}],"name":"Airdrop","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":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"burnState","type":"bool"}],"name":"BurnableSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"minterAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"stage","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"mintCount","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_newClone","type":"address"},{"indexed":false,"internalType":"address","name":"_owner","type":"address"},{"indexed":false,"internalType":"string","name":"symbol","type":"string"}],"name":"NewCloneTicker","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint128","name":"newGlobalMintsPerWallet","type":"uint128"}],"name":"NewMaxMintsPerWalletSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newPrimaryReceiver","type":"address"}],"name":"NewPrimarySaleReceiver","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newSecondaryReceiver","type":"address"},{"indexed":false,"internalType":"uint96","name":"newRoyalty","type":"uint96"}],"name":"NewSecondaryRoyalties","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint40","name":"startTime","type":"uint40"},{"internalType":"uint40","name":"endTime","type":"uint40"},{"internalType":"uint32","name":"mintsPerWallet","type":"uint32"},{"internalType":"uint32","name":"phaseLimit","type":"uint32"},{"internalType":"uint112","name":"price","type":"uint112"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"indexed":false,"internalType":"struct FairxyzPolygonzkEVM.StageData[]","name":"stages","type":"tuple[]"},{"indexed":false,"internalType":"uint256","name":"startIndex","type":"uint256"}],"name":"NewStagesSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"disabled","type":"bool"}],"name":"OperatorFilterDisabled","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":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[],"name":"SignatureReleased","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SECOND_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"URIs","outputs":[{"internalType":"string","name":"URI1","type":"string"},{"internalType":"string","name":"URI2","type":"string"},{"internalType":"string","name":"URI3","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint128","name":"maxTokens_","type":"uint128"},{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"string","name":"URI","type":"string"},{"internalType":"uint96","name":"royaltyPercentage_","type":"uint96"},{"internalType":"uint128","name":"globalMintsPerWallet_","type":"uint128"},{"internalType":"address[]","name":"royaltyReceivers","type":"address[]"},{"internalType":"address","name":"ownerOfContract","type":"address"},{"components":[{"internalType":"uint40","name":"startTime","type":"uint40"},{"internalType":"uint40","name":"endTime","type":"uint40"},{"internalType":"uint32","name":"mintsPerWallet","type":"uint32"},{"internalType":"uint32","name":"phaseLimit","type":"uint32"},{"internalType":"uint112","name":"price","type":"uint112"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"internalType":"struct FairxyzPolygonzkEVM.StageData[]","name":"stages","type":"tuple[]"},{"internalType":"bool","name":"isSBT","type":"bool"}],"name":"_initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"_mintedTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"address_","type":"address[]"},{"internalType":"uint256[]","name":"tokenCounts","type":"uint256[]"},{"internalType":"uint256","name":"expectedFirst","type":"uint256"},{"internalType":"uint256","name":"expectedLast","type":"uint256"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","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":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burnable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newPrimarySaleReceiver","type":"address"}],"name":"changePrimarySaleReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSecondaryRoyaltyReceiver","type":"address"},{"internalType":"uint96","name":"newRoyaltyValue","type":"uint96"}],"name":"changeSecondaryRoyaltyReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"URI1","type":"string"},{"internalType":"string","name":"URI2","type":"string"},{"internalType":"string","name":"URI3","type":"string"}],"internalType":"struct FairxyzPolygonzkEVM.AllURIs","name":"uris","type":"tuple"}],"name":"changeURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emitEvent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[],"name":"isSoulBound","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"uint256","name":"numberOfTokens","type":"uint256"},{"internalType":"uint256","name":"maxMintsPerWallet","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"merkleMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"numberOfTokens","type":"uint256"},{"internalType":"uint256","name":"maxMintsPerWallet","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operatorFilterDisabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operatorFilterRegistry","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"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":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"releaseSignature","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"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":"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":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"newGlobalMaxMintsPerWallet","type":"uint128"}],"name":"setGlobalMaxMints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint40","name":"startTime","type":"uint40"},{"internalType":"uint40","name":"endTime","type":"uint40"},{"internalType":"uint32","name":"mintsPerWallet","type":"uint32"},{"internalType":"uint32","name":"phaseLimit","type":"uint32"},{"internalType":"uint112","name":"price","type":"uint112"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"internalType":"struct FairxyzPolygonzkEVM.StageData[]","name":"stages","type":"tuple[]"},{"internalType":"uint256","name":"startId","type":"uint256"}],"name":"setStages","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signatureReleased","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"stageMints","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":[],"name":"toggleBurnable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleOperatorFilterDisabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleSoulBound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokensAvailable","outputs":[{"internalType":"uint128","name":"maxTokens","type":"uint128"},{"internalType":"uint128","name":"globalMintsPerWallet","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStages","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"minterAddress","type":"address"}],"name":"totalWalletMints","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":"address","name":"newRegistry","type":"address"},{"internalType":"address","name":"subscriptionOrRegistrantToCopy","type":"address"},{"internalType":"bool","name":"subscribe","type":"bool"}],"name":"updateOperatorFilterRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"subscriptionOrRegistrantToCopy","type":"address"},{"internalType":"bool","name":"subscribe","type":"bool"},{"internalType":"bool","name":"copyEntries","type":"bool"}],"name":"updateRegistrySubscription","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"viewCurrentPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"viewCurrentStage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"viewLatestStage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"viewMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"stageId","type":"uint256"}],"name":"viewStageMap","outputs":[{"components":[{"internalType":"uint40","name":"startTime","type":"uint40"},{"internalType":"uint40","name":"endTime","type":"uint40"},{"internalType":"uint32","name":"mintsPerWallet","type":"uint32"},{"internalType":"uint32","name":"phaseLimit","type":"uint32"},{"internalType":"uint112","name":"price","type":"uint112"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"internalType":"struct FairxyzPolygonzkEVM.StageData","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"}]

60a0604052306080523480156200001557600080fd5b506200002062000026565b620000e8565b600054610100900460ff1615620000935760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e6576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b608051615f3562000120600039600081816117460152818161178601528181611b5e01528181611b9e0152611c160152615f356000f3fe6080604052600436106103385760003560e01c80637b0cb839116101b2578063b0ccc31e116100ed578063ce4c61aa11610090578063ce4c61aa14610a0d578063d539139314610a22578063d547741f14610a56578063dedd76e714610a76578063e985e9c514610b02578063ec44d61514610b22578063f2fde38b14610b42578063f86a352914610b6257600080fd5b8063b0ccc31e14610928578063b0fde7fb1461094d578063b3cc59db14610967578063b88d4fde1461097c578063bc20a04a1461099c578063bdc769eb146109c0578063c0dad79b146109d3578063c87b56dd146109ed57600080fd5b806390411aca1161015557806390411aca1461085357806391d148541461086857806394b08a4b1461088857806395d89b41146108a857806397f5cdcf146108bd578063a07c7ce4146108d3578063a217fddf146108f3578063a22cb4651461090857600080fd5b80637b0cb839146107365780637f1fea591461074b578063804207361461076b57806385df4dad14610780578063869d3bde146107a05780638c8ea8e6146107b55780638cd90c32146107fb5780638da5cb5b1461083457600080fd5b80633f52af3c11610282578063548e768211610225578063548e768214610625578063577199fd1461064557806360659a92146106655780636352211e146106b1578063659b8b2a146106d157806370a08231146106ec578063715018a61461070c57806372c06f5a1461072157600080fd5b80633f52af3c14610553578063408d3ca91461057357806341dfed3a1461058857806342842e0e1461059d57806342966c68146105bd5780634e0b9df2146105dd5780634f1ef286146105fd57806352d1902d1461061057600080fd5b8063248a9ca3116102ea578063248a9ca3146104465780632955a21d146104775780632a55205a1461048a5780632f2ff15d146104c95780633540558a146104e957806336568abe1461050b5780633659cfe61461052b5780633ccfd60b1461054b57600080fd5b806301ffc9a71461033d57806306fdde0314610372578063081812fc14610394578063095ea7b3146103c157806318160ddd146103e357806319315d011461040657806323b872dd14610426575b600080fd5b34801561034957600080fd5b5061035d610358366004614ca2565b610b79565b60405190151581526020015b60405180910390f35b34801561037e57600080fd5b50610387610b8a565b6040516103699190614d0f565b3480156103a057600080fd5b506103b46103af366004614d22565b610c1c565b6040516103699190614d3b565b3480156103cd57600080fd5b506103e16103dc366004614d6b565b610ca9565b005b3480156103ef57600080fd5b506103f8610e7a565b604051908152602001610369565b34801561041257600080fd5b506103e1610421366004614f6a565b610e91565b34801561043257600080fd5b506103e161044136600461509d565b6110e5565b34801561045257600080fd5b506103f8610461366004614d22565b6000908152610100602052604090206001015490565b6103e16104853660046150d9565b61121c565b34801561049657600080fd5b506104aa6104a5366004615143565b6115e5565b604080516001600160a01b039093168352602083019190915201610369565b3480156104d557600080fd5b506103e16104e4366004615165565b611693565b3480156104f557600080fd5b506103f8600080516020615ee083398151915281565b34801561051757600080fd5b506103e1610526366004615165565b6116be565b34801561053757600080fd5b506103e1610546366004615191565b61173c565b6103e1611804565b34801561055f57600080fd5b506103e161056e3660046151ac565b61188a565b34801561057f57600080fd5b506103e161190a565b34801561059457600080fd5b506103f8611926565b3480156105a957600080fd5b506103e16105b836600461509d565b611968565b3480156105c957600080fd5b506103f86105d8366004614d22565b611a6e565b3480156105e957600080fd5b506103e16105f83660046151d6565b611b14565b6103e161060b366004615221565b611b54565b34801561061c57600080fd5b506103f8611c09565b34801561063157600080fd5b506103e161064036600461526e565b611cb7565b34801561065157600080fd5b506103e1610660366004615289565b611d42565b34801561067157600080fd5b506101fa54610691906001600160801b0380821691600160801b90041682565b604080516001600160801b03938416815292909116602083015201610369565b3480156106bd57600080fd5b506103b46106cc366004614d22565b611e3d565b3480156106dd57600080fd5b506101fc5461035d9060ff1681565b3480156106f857600080fd5b506103f8610707366004615191565b611efd565b34801561071857600080fd5b506103e1611f8d565b34801561072d57600080fd5b5061035d611fa1565b34801561074257600080fd5b506103e1612015565b34801561075757600080fd5b506103e1610766366004615191565b61206d565b34801561077757600080fd5b506103e161211b565b34801561078c57600080fd5b506103e161079b3660046152d0565b61218d565b3480156107ac57600080fd5b506103f86121a3565b3480156107c157600080fd5b506103f86107d0366004615191565b6001600160a01b0316600090815260d36020526040902054600160601b90046001600160601b031690565b34801561080757600080fd5b506103f8610816366004615165565b6101fe60209081526000928352604080842090915290825290205481565b34801561084057600080fd5b50610164546001600160a01b03166103b4565b34801561085f57600080fd5b5060cc546103f8565b34801561087457600080fd5b5061035d610883366004615165565b612221565b34801561089457600080fd5b506103e16108a336600461530a565b61224d565b3480156108b457600080fd5b50610387612325565b3480156108c957600080fd5b506103f860cc5481565b3480156108df57600080fd5b506101fc5461035d90610100900460ff1681565b3480156108ff57600080fd5b506103f8600081565b34801561091457600080fd5b506103e1610923366004615338565b612334565b34801561093457600080fd5b506097546103b49061010090046001600160a01b031681565b34801561095957600080fd5b5060d45461035d9060ff1681565b34801561097357600080fd5b506103e16123ff565b34801561098857600080fd5b506103e161099736600461536f565b61248d565b3480156109a857600080fd5b506109b16125cd565b604051610369939291906153d6565b6103e16109ce36600461540f565b61277c565b3480156109df57600080fd5b5060975461035d9060ff1681565b3480156109f957600080fd5b50610387610a08366004614d22565b61290b565b348015610a1957600080fd5b506103f8612a24565b348015610a2e57600080fd5b506103f87ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc981565b348015610a6257600080fd5b506103e1610a71366004615165565b612a79565b348015610a8257600080fd5b50610a96610a91366004614d22565b612a9f565b6040516103699190600060c08201905064ffffffffff80845116835280602085015116602084015250604083015163ffffffff808216604085015280606086015116606085015250506001600160701b03608084015116608083015260a083015160a083015292915050565b348015610b0e57600080fd5b5061035d610b1d366004615498565b612b73565b348015610b2e57600080fd5b506103e1610b3d3660046154c2565b612ba1565b348015610b4e57600080fd5b506103e1610b5d366004615191565b612d49565b348015610b6e57600080fd5b506103f86101ff5481565b6000610b8482612dbf565b92915050565b606060ca8054610b999061558a565b80601f0160208091040260200160405190810160405280929190818152602001828054610bc59061558a565b8015610c125780601f10610be757610100808354040283529160200191610c12565b820191906000526020600020905b815481529060010190602001808311610bf557829003601f168201915b5050505050905090565b6000610c2782612de4565b610c8d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b50600090815260d160205260409020546001600160a01b031690565b609754829060ff16158015610cce575060975461010090046001600160a01b03163b15155b15610d6957609754604051633185c44d60e21b81526101009091046001600160a01b03169063c617113490610d0990309085906004016155c4565b602060405180830381865afa158015610d26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4a91906155de565b610d695780604051633b79c77360e21b8152600401610c849190614d3b565b6000610d7483611e3d565b9050806001600160a01b0316846001600160a01b031603610de15760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610c84565b336001600160a01b0382161480610dfd5750610dfd8133612b73565b610e6a5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b6064820152608401610c84565b610e748484612e17565b50505050565b600060cd5460cc54610e8c9190615611565b905090565b600054610100900460ff1615808015610eb15750600054600160ff909116105b80610ecb5750303b158015610ecb575060005460ff166001145b610f2e5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610c84565b6000805460ff191660011790558015610f51576000805461ff0019166101001790555b8551600214610f5f57600080fd5b610f698b8b612ea9565b610f71612eda565b610f9f6daaeb6d7670e522a718067333cd4e733cc6cdda760b79bafa08df41ecfa224f810dceb66001612f01565b610fa885612f44565b604080518082019091526001600160801b03808e168083529089166020909201829052600160801b909102176101fa556101fb610fe58a82615687565b5060d4805460ff19168315151790558551869060009061100757611007615740565b60200260200101516101fc60026101000a8154816001600160a01b0302191690836001600160a01b0316021790555061105a8660018151811061104c5761104c615740565b602002602001015189612f97565b611065600086613094565b61107d600080516020615ee083398151915286613094565b82156110915761108f8484600061311b565b505b80156110d7576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050505050565b609754839060ff1615801561110a575060975461010090046001600160a01b03163b15155b156111ec57336001600160a01b038216036111565761112a335b836135aa565b6111465760405162461bcd60e51b8152600401610c8490615756565b611151848484613674565b610e74565b609754604051633185c44d60e21b81526101009091046001600160a01b03169063c61711349061118c90309033906004016155c4565b602060405180830381865afa1580156111a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111cd91906155de565b6111ec5733604051633b79c77360e21b8152600401610c849190614d3b565b6111f533611124565b6112115760405162461bcd60e51b8152600401610c8490615756565b610e74848484613674565b82600010801561122d575060148311155b61124a576040516332b4cb2160e21b815260040160405180910390fd5b60006112546121a3565b60008181526101fd60209081526040808320815160c081018352815464ffffffffff8082168352600160281b82041694820194909452600160501b840463ffffffff90811693820193909352600160701b84049092166060830152600160901b9092046001600160701b03166080820181905260019092015460a08201529293506112e79066031742a8f46000906157a7565b90506112f386826157ba565b341461131257604051632c1d501360e11b815260040160405180910390fd5b8660000361133357604051633ab3447f60e11b815260040160405180910390fd5b60cc54606083015163ffffffff16811061135f5760405162491a1760e81b815260040160405180910390fd5b60a08301511561138257604051630268975d60e51b815260040160405180910390fd5b6101fc5460ff1661145857600061139b86898b8a613808565b9050737a6f5866f97034bb7153829bdaac1ffcb8facb716113bc828c613889565b6001600160a01b0316146113e3576040516332c3ce2560e11b815260040160405180910390fd5b6001600160a01b038616600090815260d36020526040902054600160c01b90046001600160401b0316891161142b5760405163dc5a682560e01b815260040160405180910390fd5b6114368960286157a7565b43111561145657604051639e8c142f60e01b815260040160405180910390fd5b505b600061146886868a85888c6138ad565b905061147586828b613a3d565b600073c5a2f45ff2d4ca27e167600b5225c7e6e187d8c061149d8366031742a8f460006157ba565b604051600081818185875af1925050503d80600081146114d9576040519150601f19603f3d011682016040523d82523d6000602084013e6114de565b606091505b505090508061150057604051635579a42f60e11b815260040160405180910390fd5b8882101561158e57600084611515848c615611565b61151f91906157ba565b604051909150600090339083908381818185875af1925050503d8060008114611564576040519150601f19603f3d011682016040523d82523d6000602084013e611569565b606091505b505090508061158b57604051635579a42f60e11b815260040160405180910390fd5b50505b604080516001600160a01b0389168152602081018890529081018390527f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f9060600160405180910390a15050505050505050505050565b60008281526066602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b031692820192909252829161165a5750604080518082019091526065546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090611679906001600160601b0316876157ba565b61168391906157d1565b91519350909150505b9250929050565b600082815261010060205260409020600101546116af81613a58565b6116b98383613094565b505050565b6001600160a01b038116331461172e5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c84565b6117388282613a62565b5050565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036117845760405162461bcd60e51b8152600401610c84906157f3565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166117b6613aca565b6001600160a01b0316146117dc5760405162461bcd60e51b8152600401610c849061583f565b6117e581613ae6565b6040805160008082526020820190925261180191839190613aee565b50565b600061180f81613a58565b6101fc546040516000916201000090046001600160a01b03169047908381818185875af1925050503d8060008114611863576040519150601f19603f3d011682016040523d82523d6000602084013e611868565b606091505b505090508061173857604051635579a42f60e11b815260040160405180910390fd5b611895600033612221565b6118b257604051634e8df0bf60e01b815260040160405180910390fd5b6118bc8282612f97565b604080516001600160a01b03841681526001600160601b03831660208201527fef5955f7902e6696c028804c62be1c24a0f98d9d30de5c31c83fa7f8b5c15c6f910160405180910390a15050565b611912613c59565b60d4805460ff19811660ff90911615179055565b600066031742a8f460006101fd600061193d6121a3565b8152602081019190915260400160002054610e8c9190600160901b90046001600160701b03166157a7565b609754839060ff1615801561198d575060975461010090046001600160a01b03163b15155b15611a5357336001600160a01b038216036119bd576111518484846040518060200160405280600081525061248d565b609754604051633185c44d60e21b81526101009091046001600160a01b03169063c6171134906119f390309033906004016155c4565b602060405180830381865afa158015611a10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a3491906155de565b611a535733604051633b79c77360e21b8152600401610c849190614d3b565b610e748484846040518060200160405280600081525061248d565b6101fc54600090610100900460ff16611a9a5760405163c7c39e4f60e01b815260040160405180910390fd5b611aac611aa683611e3d565b33612b73565b80611ad05750611abb82611e3d565b6001600160a01b0316336001600160a01b0316145b80611aeb575033611ae083610c1c565b6001600160a01b0316145b611b075760405162ccfedb60e31b815260040160405180910390fd5b611b1082613cb4565b5090565b611b2c600080516020615ee083398151915233612221565b611b4957604051634e8df0bf60e01b815260040160405180910390fd5b610e7483838361311b565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003611b9c5760405162461bcd60e51b8152600401610c84906157f3565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316611bce613aca565b6001600160a01b031614611bf45760405162461bcd60e51b8152600401610c849061583f565b611bfd82613ae6565b61173882826001613aee565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611ca45760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c6044820152771b1959081d1a1c9bdd59da0819195b1959d85d1958d85b1b60421b6064820152608401610c84565b50600080516020615e9983398151915290565b611ccf600080516020615ee083398151915233612221565b611cec57604051634e8df0bf60e01b815260040160405180910390fd5b6101fa80546001600160801b03908116600160801b918416918202179091556040519081527f8c8298dd23c82a4aa45d27f480c6ce0aa2588e13df0b2fe2c827ca4a6836a5f8906020015b60405180910390a150565b611d4b33613dc9565b611d6857604051634755657960e01b815260040160405180910390fd5b826001600160a01b0381163b600003611d9457604051630458607f60e41b815260040160405180910390fd5b60405163c3c5a54760e01b81526001600160a01b0382169063c3c5a54790611dc0903090600401614d3b565b6020604051808303816000875af1158015611ddf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e0391906155de565b611e1257611e12818484613dd5565b609780546001600160a01b0390921661010002610100600160a81b0319909216919091179055505050565b6000611e4882612de4565b611ea55760405162461bcd60e51b815260206004820152602860248201527f45524337323178797a3a20517565727920666f72206e6f6e206578697374656e6044820152677420746f6b656e2160c01b6064820152608401610c84565b600082815260ce602052604090205482906001600160a01b031680611ef6575b50600081815260cf60205260409020546001600160a01b03168015611eeb579392505050565b816001019150611ec5565b9392505050565b60006001600160a01b038216611f685760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610c84565b506001600160a01b0316600090815260d360205260409020546001600160601b031690565b611f95613c59565b611f9f6000612f44565b565b6000611fac33613dc9565b611fc957604051634755657960e01b815260040160405180910390fd5b6097805460ff81161560ff1990911681179091556040518181527fd8c469bcb7a4be6d69103a5fdb65991249a95423350dc583495ccf5e7c28a88d9060200160405180910390a1905090565b61201d613c59565b7f62e4ed1ae964bf13ab15b4efee5e0889bdf5d1b1cd6d33d036546dc478773c6030612052610164546001600160a01b031690565b60cb6040516120639392919061588b565b60405180910390a1565b612078600033612221565b61209557604051634e8df0bf60e01b815260040160405180910390fd5b6001600160a01b0381166120bc5760405163d92e233d60e01b815260040160405180910390fd5b6101fc805462010000600160b01b031916620100006001600160a01b03848116820292909217928390556040517fd45e158b56e768c1167267f8516bcf96348071775faded3c9216b60855d873de93611d379392900490911690614d3b565b612126600033612221565b61214357604051634e8df0bf60e01b815260040160405180910390fd5b6101fc5460ff161561215457600080fd5b6101fc805460ff191660011790556040517ffbbcc58867e8fad1d9f72f1b991660f5ec5e4e068374aa442b8604eef182b63990600090a1565b612195613c59565b806102006116b98282615a33565b6101ff546000905b8015612207576000190160008181526101fd602052604090205464ffffffffff1642108015906121f8575060008181526101fd6020526040902054600160281b900464ffffffffff164211155b1561220257919050565b6121ab565b5060405163b7b2409760e01b815260040160405180910390fd5b6000918252610100602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61225633613dc9565b61227357604051634755657960e01b815260040160405180910390fd5b60975461010090046001600160a01b0316803b6000036122a657604051630458607f60e41b815260040160405180910390fd5b6001600160a01b03841661231a5760405163034a0dc160e41b815230600482015282151560248201526001600160a01b038216906334a0dc1090604401600060405180830381600087803b1580156122fd57600080fd5b505af1158015612311573d6000803e3d6000fd5b50505050610e74565b610e74818585613dd5565b606060cb8054610b999061558a565b609754829060ff16158015612359575060975461010090046001600160a01b03163b15155b156123f457609754604051633185c44d60e21b81526101009091046001600160a01b03169063c61711349061239490309085906004016155c4565b602060405180830381865afa1580156123b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123d591906155de565b6123f45780604051633b79c77360e21b8152600401610c849190614d3b565b6116b9338484613f7f565b612417600080516020615ee083398151915233612221565b61243457604051634e8df0bf60e01b815260040160405180910390fd5b6101fc805460ff610100808304821615810261ff001990931692909217928390556040517f6ae3331a8bd1998bb8fd9d3d02b720f4862fb43e7586d302ba44e3923cea922d936120639390049091161515815260200190565b609754849060ff161580156124b2575060975461010090046001600160a01b03163b15155b1561259557336001600160a01b038216036124ff576124d2335b846135aa565b6124ee5760405162461bcd60e51b8152600401610c8490615756565b6124fa8585858561404d565b6125c6565b609754604051633185c44d60e21b81526101009091046001600160a01b03169063c61711349061253590309033906004016155c4565b602060405180830381865afa158015612552573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061257691906155de565b6125955733604051633b79c77360e21b8152600401610c849190614d3b565b61259e336124cc565b6125ba5760405162461bcd60e51b8152600401610c8490615756565b6125c68585858561404d565b5050505050565b610200805481906125dd9061558a565b80601f01602080910402602001604051908101604052809291908181526020018280546126099061558a565b80156126565780601f1061262b57610100808354040283529160200191612656565b820191906000526020600020905b81548152906001019060200180831161263957829003601f168201915b50505050509080600101805461266b9061558a565b80601f01602080910402602001604051908101604052809291908181526020018280546126979061558a565b80156126e45780601f106126b9576101008083540402835291602001916126e4565b820191906000526020600020905b8154815290600101906020018083116126c757829003601f168201915b5050505050908060020180546126f99061558a565b80601f01602080910402602001604051908101604052809291908181526020018280546127259061558a565b80156127725780601f1061274757610100808354040283529160200191612772565b820191906000526020600020905b81548152906001019060200180831161275557829003601f168201915b5050505050905083565b82600010801561278d575060148311155b6127aa576040516332b4cb2160e21b815260040160405180910390fd5b60006127b46121a3565b60008181526101fd60209081526040808320815160c081018352815464ffffffffff8082168352600160281b82041694820194909452600160501b840463ffffffff90811693820193909352600160701b84049092166060830152600160901b9092046001600160701b03166080820181905260019092015460a08201529293506128479066031742a8f46000906157a7565b905061285386826157ba565b341461287257604051632c1d501360e11b815260040160405180910390fd5b60a082015161289457604051637904b60360e11b815260040160405180910390fd5b60cc54606083015163ffffffff1681106128c05760405162491a1760e81b815260040160405180910390fd5b6128d189898560a00151888a614080565b6128ee576040516334ce9a3d60e11b815260040160405180910390fd5b60006128fe86868a85888c6138ad565b9050611475868243613a3d565b606061291682612de4565b6129625760405162461bcd60e51b815260206004820152601a60248201527f546f6b656e20686173206e6f74206265656e206d696e746564210000000000006044820152606401610c84565b6201388082106129ff57610200805461297a9061558a565b80601f01602080910402602001604051908101604052809291908181526020018280546129a69061558a565b80156129f35780601f106129c8576101008083540402835291602001916129f3565b820191906000526020600020905b8154815290600101906020018083116129d657829003601f168201915b50505050509050919050565b614e208210612a1657610201805461297a9061558a565b610202805461297a9061558a565b6101ff546000905b8015612a71576000190160008181526101fd6020526040902054600160281b900464ffffffffff16421115612a6c57612a668160016157a7565b91505090565b612a2c565b506000905090565b60008281526101006020526040902060010154612a9581613a58565b6116b98383613a62565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a08101919091526101ff548210612af4576040516327e7ab7d60e11b815260040160405180910390fd5b5060009081526101fd6020908152604091829020825160c081018452815464ffffffffff8082168352600160281b82041693820193909352600160501b830463ffffffff90811694820194909452600160701b83049093166060840152600160901b9091046001600160701b031660808301526001015460a082015290565b6001600160a01b03918216600090815260d26020908152604080832093909416825291909152205460ff1690565b606484511115612bc4576040516349a3ec1560e11b815260040160405180910390fd5b8251845114612c0a5760405162461bcd60e51b81526020600482015260126024820152710aee4dedcce40c2e4e4c2f240d8cadccee8d60731b6044820152606401610c84565b8160cc5414612c4c5760405162461bcd60e51b815260206004820152600e60248201526d15dc9bdb99c81cdd185c9d08125160921b6044820152606401610c84565b612c64600080516020615ee083398151915233612221565b158015612c985750612c967ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc933612221565b155b15612cb657604051634e8df0bf60e01b815260040160405180910390fd5b60005b8451811015612d0857612d00858281518110612cd757612cd7615740565b6020026020010151858381518110612cf157612cf1615740565b602002602001015160006140f7565b600101612cb9565b508060cc5414610e745760405162461bcd60e51b815260206004820152600c60248201526b15dc9bdb99c8195b9908125160a21b6044820152606401610c84565b612d51613c59565b6001600160a01b038116612db65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c84565b61180181612f44565b60006001600160e01b03198216637965db0b60e01b1480610b845750610b8482614277565b600081815260d0602052604081205460ff1615612e0357506000919050565b816000108015610b8457505060cc54101590565b600081815260d160205260409020546001600160a01b0390811690831681146116b957600082815260d16020526040902080546001600160a01b0319166001600160a01b0385169081179091558290612e6f82611e3d565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b600054610100900460ff16612ed05760405162461bcd60e51b8152600401610c8490615b2c565b61173882826142d2565b600054610100900460ff16611f9f5760405162461bcd60e51b8152600401610c8490615b2c565b600054610100900460ff16612f285760405162461bcd60e51b8152600401610c8490615b2c565b6001600160a01b0383163b156116b95782611e12818484613dd5565b61016480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6127106001600160601b03821611156130055760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610c84565b6001600160a01b03821661305b5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610c84565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217606555565b61309e8282612221565b611738576000828152610100602090815260408083206001600160a01b03851684529091529020805460ff191660011790556130d73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281613127612a24565b9050601482111561314b576040516373c2b52560e11b815260040160405180910390fd5b6101ff54801580159061315d57508185105b1561317b576040516344ca163560e11b815260040160405180910390fd5b8085111561319c576040516307cc4d8f60e01b815260040160405180910390fd5b6131a76014836157a7565b6131b184876157a7565b11156131d05760405163c1eae7bb60e01b815260040160405180910390fd5b60008581526101fd602052604081205464ffffffffff169084900361325d5742811161320f5760405163bf4a806960e01b815260040160405180910390fd5b6101ff8690556040517f842cd1905522b3731a39e0d2fb9d3757bc29b4e57e9253b230d437bf10505e9b90613249908a908a908a90615bb7565b60405180910390a185945050505050611ef6565b60008888600081811061327257613272615740565b905060c002018036038101906132889190615c72565b905060cc54816060015163ffffffff1610156132b757604051630e93fda160e21b815260040160405180910390fd5b4282111580156132c657508115155b80156132d457506101ff5487105b1561333157805164ffffffffff16821461330157604051632ca4094f60e21b815260040160405180910390fd5b42816020015164ffffffffff161161332c5760405163804491f960e01b815260040160405180910390fd5b61335c565b42816000015164ffffffffff161161335c5760405163667e606760e11b815260040160405180910390fd5b868581015b888214613395578a8a8a840381811061337c5761337c615740565b905060c002018036038101906133929190615c72565b92505b6101fa5460608401516001600160801b0390911663ffffffff90911611156133d05760405163bccc7e2360e01b815260040160405180910390fd5b826000015164ffffffffff16836020015164ffffffffff161161340657604051631131dc6b60e11b815260040160405180910390fd5b811561349657600019820160009081526101fd6020526040902054606084015164ffffffffff600160281b8304169163ffffffff600160701b90910481169116101561346c5742811061346c576040516357be1d0d60e01b815260040160405180910390fd5b835164ffffffffff1681106134945760405163064f2b0760e31b815260040160405180910390fd5b505b60008281526101fd60209081526040918290208551815492870151938701516060880151608089015164ffffffffff93841669ffffffffffffffffffff1990961695909517600160281b93909616929092029490941767ffffffffffffffff60501b1916600160501b63ffffffff9586160263ffffffff60701b191617600160701b9490911693909302929092176001600160901b0316600160901b6001600160701b039092169190910217815560a084015160019182015590910190808210613361576101ff8190556040517f842cd1905522b3731a39e0d2fb9d3757bc29b4e57e9253b230d437bf10505e9b90613594908d908d908d90615bb7565b60405180910390a19a9950505050505050505050565b60006135b582612de4565b6136165760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610c84565b600061362183611e3d565b9050806001600160a01b0316846001600160a01b0316148061365c5750836001600160a01b031661365184610c1c565b6001600160a01b0316145b8061366c575061366c8185612b73565b949350505050565b826001600160a01b031661368782611e3d565b6001600160a01b0316146136eb5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610c84565b6001600160a01b03821661374d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610c84565b613758838383614312565b613763600082612e17565b6001600160a01b03838116600081815260d36020908152604080832080546001600160601b03198082166001600160601b039283166000190183161790925595881680855282852080549283169288166001019097169190911790955585835260ce90915280822080546001600160a01b0319168517905551849392917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b604080517f5b174e00b853ebb074ee5cb5d23ca67a264896e5670f923ac103fccad5232b5560208201526001600160a01b03861691810191909152606081018490526080810183905260a08101829052600090819061387f9060c0016040516020818303038152906040528051906020012061435b565b9695505050505050565b60008060006138988585614436565b915091506138a581614478565b509392505050565b6001600160a01b038616600081815260d360209081526040808320548984526101fe83528184209484529390915280822054908501519192600160601b90046001600160601b03169163ffffffff161561394f57846040015163ffffffff16811061392b57604051632f18066d60e01b815260040160405180910390fd5b846040015163ffffffff16878201111561394f5780856040015163ffffffff160396505b6101fa54600160801b90046001600160801b031680156139995780831061398957604051632f18066d60e01b815260040160405180910390fd5b8088840111156139995782810397505b856060015163ffffffff1688880111156139bd5786866060015163ffffffff160397505b6000851180156139d157506101fc5460ff16155b15613a06578482106139f657604051632f18066d60e01b815260040160405180910390fd5b848883011115613a065781850397505b5060008881526101fe602090815260408083206001600160a01b038d16845290915290209087019055508490509695505050505050565b6116b9838360405180602001604052806000815250846145bd565b61180181336145d7565b613a6c8282612221565b15611738576000828152610100602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600080516020615e99833981519152546001600160a01b031690565b611801613c59565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615613b21576116b983614630565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015613b7b575060408051601f3d908101601f19168201909252613b7891810190615d0c565b60015b613bde5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610c84565b600080516020615e998339815191528114613c4d5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610c84565b506116b98383836146cc565b610164546001600160a01b03163314611f9f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c84565b613cbd81612de4565b613d195760405162461bcd60e51b815260206004820152602760248201527f45524337323178797a3a20517565727920666f72206e6f6e6578697374656e7460448201526620746f6b656e2160c81b6064820152608401610c84565b6000613d2482611e3d565b9050613d3281600084614312565b613d3d600083612e17565b6001600160a01b038116600081815260d36020908152604080832080546001600160601b031981166001600160601b039182166000190190911617905585835260d0909152808220805460ff1916600190811790915560cd80549091019055518492907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000610b848183612221565b60405163c3c5a54760e01b81526001600160a01b0384169063c3c5a54790613e01903090600401614d3b565b6020604051808303816000875af1158015613e20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e4491906155de565b15613ee2578015613eb457604051632cc5350560e21b81526001600160a01b0384169063b314d41490613e7d90309086906004016155c4565b600060405180830381600087803b158015613e9757600080fd5b505af1158015613eab573d6000803e3d6000fd5b50505050505050565b604051630781ad2d60e21b81526001600160a01b03841690631e06b4b490613e7d90309086906004016155c4565b8015613f1657604051633e9f1edf60e11b81526001600160a01b03841690637d3e3dbe90613e7d90309086906004016155c4565b6001600160a01b03821615613f535760405163a0af290360e01b81526001600160a01b0384169063a0af290390613e7d90309086906004016155c4565b604051632210724360e11b81526001600160a01b03841690634420e48690613e7d903090600401614d3b565b816001600160a01b0316836001600160a01b031603613fe05760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610c84565b6001600160a01b03838116600081815260d26020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b614058848484613674565b614064848484846146f1565b610e745760405162461bcd60e51b8152600401610c8490615d25565b600061387f868680806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506040516001600160601b0319606089901b166020820152603481018790528892506054019050604051602081830303815290604052805190602001206147ef565b6001600160a01b03831661414d5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610c84565b61415b60008460cc54614312565b60cc8054838101918290556001600160a01b038516600090815260d36020526040902080546001600160601b038082168701166001600160601b03199091161790559082156141fa576001600160a01b038516600090815260d36020526040902080546001600160601b03808216600160601b92839004821688019091169091026001600160c01b031617600160c01b6001600160401b038616021790555b600081815260cf6020526040902080546001600160a01b0319166001600160a01b03871617905560018281019082015b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a481600101915080821061422a57505050610e74565b60006001600160e01b0319821663152a902d60e11b14806142a857506001600160e01b031982166380ac58cd60e01b145b806142c357506001600160e01b03198216635b5e139f60e01b145b80610b845750610b8482614805565b600054610100900460ff166142f95760405162461bcd60e51b8152600401610c8490615b2c565b60ca6143058382615687565b5060cb6116b98282615687565b6001600160a01b0383161580159061433257506001600160a01b03821615155b156116b95760d45460ff16156116b9576040516328f11eb160e21b815260040160405180910390fd5b604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6020808301919091527f36cb08f6aafe2399767bf40e9642429d7535f40e61bd81428cad09095c5d337d828401527f06c015bd22b4c69690933c1058878ebdfef31f9aaae40bbe86d8a09fe1b2972c60608301524660808301523060a0808401919091528351808403909101815260c08301845280519082012061190160f01b60e084015260e2830181905261010280840186905284518085039091018152610122909301909352815191012060009190611ef6565b600080825160410361446c5760208301516040840151606085015160001a6144608782858561483a565b9450945050505061168c565b5060009050600261168c565b600081600481111561448c5761448c615d77565b036144945750565b60018160048111156144a8576144a8615d77565b036144f05760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610c84565b600281600481111561450457614504615d77565b036145515760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610c84565b600381600481111561456557614565615d77565b036118015760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610c84565b6145c88484836140f7565b61406460008560cc54856146f1565b6145e18282612221565b611738576145ee816148f4565b6145f9836020614906565b60405160200161460a929190615d8d565b60408051601f198184030181529082905262461bcd60e51b8252610c8491600401614d0f565b6001600160a01b0381163b61469d5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610c84565b600080516020615e9983398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6146d583614aa1565b6000825111806146e25750805b156116b957610e748383614ae1565b60006001600160a01b0384163b156147e757604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290614735903390899088908890600401615dfc565b6020604051808303816000875af1925050508015614770575060408051601f3d908101601f1916820190925261476d91810190615e2f565b60015b6147cd573d80801561479e576040519150601f19603f3d011682016040523d82523d6000602084013e6147a3565b606091505b5080516000036147c55760405162461bcd60e51b8152600401610c8490615d25565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061366c565b50600161366c565b6000826147fc8584614bd5565b14949350505050565b60006001600160e01b0319821663152a902d60e11b1480610b8457506301ffc9a760e01b6001600160e01b0319831614610b84565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b0383111561486757506000905060036148eb565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156148bb573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166148e4576000600192509250506148eb565b9150600090505b94509492505050565b6060610b846001600160a01b03831660145b606060006149158360026157ba565b6149209060026157a7565b6001600160401b0381111561493757614937614dac565b6040519080825280601f01601f191660200182016040528015614961576020820181803683370190505b509050600360fc1b8160008151811061497c5761497c615740565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106149ab576149ab615740565b60200101906001600160f81b031916908160001a90535060006149cf8460026157ba565b6149da9060016157a7565b90505b6001811115614a52576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110614a0e57614a0e615740565b1a60f81b828281518110614a2457614a24615740565b60200101906001600160f81b031916908160001a90535060049490941c93614a4b81615e4c565b90506149dd565b508315611ef65760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c84565b614aaa81614630565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b614b495760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610c84565b600080846001600160a01b031684604051614b649190615e63565b600060405180830381855af49150503d8060008114614b9f576040519150601f19603f3d011682016040523d82523d6000602084013e614ba4565b606091505b5091509150614bcc8282604051806060016040528060278152602001615eb960279139614c1a565b95945050505050565b600081815b84518110156138a557614c0682868381518110614bf957614bf9615740565b6020026020010151614c33565b915080614c1281615e7f565b915050614bda565b60608315614c29575081611ef6565b611ef68383614c62565b6000818310614c4f576000828152602084905260409020611ef6565b6000838152602083905260409020611ef6565b815115614c725781518083602001fd5b8060405162461bcd60e51b8152600401610c849190614d0f565b6001600160e01b03198116811461180157600080fd5b600060208284031215614cb457600080fd5b8135611ef681614c8c565b60005b83811015614cda578181015183820152602001614cc2565b50506000910152565b60008151808452614cfb816020860160208601614cbf565b601f01601f19169290920160200192915050565b602081526000611ef66020830184614ce3565b600060208284031215614d3457600080fd5b5035919050565b6001600160a01b0391909116815260200190565b80356001600160a01b0381168114614d6657600080fd5b919050565b60008060408385031215614d7e57600080fd5b614d8783614d4f565b946020939093013593505050565b80356001600160801b0381168114614d6657600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614dea57614dea614dac565b604052919050565b600082601f830112614e0357600080fd5b81356001600160401b03811115614e1c57614e1c614dac565b614e2f601f8201601f1916602001614dc2565b818152846020838601011115614e4457600080fd5b816020850160208301376000918101602001919091529392505050565b80356001600160601b0381168114614d6657600080fd5b60006001600160401b03821115614e9157614e91614dac565b5060051b60200190565b600082601f830112614eac57600080fd5b81356020614ec1614ebc83614e78565b614dc2565b82815260059290921b84018101918181019086841115614ee057600080fd5b8286015b84811015614f0257614ef581614d4f565b8352918301918301614ee4565b509695505050505050565b60008083601f840112614f1f57600080fd5b5081356001600160401b03811115614f3657600080fd5b60208301915083602060c08302850101111561168c57600080fd5b801515811461180157600080fd5b8035614d6681614f51565b60008060008060008060008060008060006101408c8e031215614f8c57600080fd5b614f958c614d95565b9a506001600160401b038060208e01351115614fb057600080fd5b614fc08e60208f01358f01614df2565b9a508060408e01351115614fd357600080fd5b614fe38e60408f01358f01614df2565b99508060608e01351115614ff657600080fd5b6150068e60608f01358f01614df2565b985061501460808e01614e61565b975061502260a08e01614d95565b96508060c08e0135111561503557600080fd5b6150458e60c08f01358f01614e9b565b955061505360e08e01614d4f565b9450806101008e0135111561506757600080fd5b506150798d6101008e01358e01614f0d565b909350915061508b6101208d01614f5f565b90509295989b509295989b9093969950565b6000806000606084860312156150b257600080fd5b6150bb84614d4f565b92506150c960208501614d4f565b9150604084013590509250925092565b600080600080600060a086880312156150f157600080fd5b85356001600160401b0381111561510757600080fd5b61511388828901614df2565b95505060208601359350604086013592506060860135915061513760808701614d4f565b90509295509295909350565b6000806040838503121561515657600080fd5b50508035926020909101359150565b6000806040838503121561517857600080fd5b8235915061518860208401614d4f565b90509250929050565b6000602082840312156151a357600080fd5b611ef682614d4f565b600080604083850312156151bf57600080fd5b6151c883614d4f565b915061518860208401614e61565b6000806000604084860312156151eb57600080fd5b83356001600160401b0381111561520157600080fd5b61520d86828701614f0d565b909790965060209590950135949350505050565b6000806040838503121561523457600080fd5b61523d83614d4f565b915060208301356001600160401b0381111561525857600080fd5b61526485828601614df2565b9150509250929050565b60006020828403121561528057600080fd5b611ef682614d95565b60008060006060848603121561529e57600080fd5b6152a784614d4f565b92506152b560208501614d4f565b915060408401356152c581614f51565b809150509250925092565b6000602082840312156152e257600080fd5b81356001600160401b038111156152f857600080fd5b820160608185031215611ef657600080fd5b60008060006060848603121561531f57600080fd5b61532884614d4f565b925060208401356152b581614f51565b6000806040838503121561534b57600080fd5b61535483614d4f565b9150602083013561536481614f51565b809150509250929050565b6000806000806080858703121561538557600080fd5b61538e85614d4f565b935061539c60208601614d4f565b92506040850135915060608501356001600160401b038111156153be57600080fd5b6153ca87828801614df2565b91505092959194509250565b6060815260006153e96060830186614ce3565b82810360208401526153fb8186614ce3565b9050828103604084015261387f8185614ce3565b60008060008060006080868803121561542757600080fd5b85356001600160401b038082111561543e57600080fd5b818801915088601f83011261545257600080fd5b81358181111561546157600080fd5b8960208260051b850101111561547657600080fd5b6020928301975095505086013592506040860135915061513760608701614d4f565b600080604083850312156154ab57600080fd5b6154b483614d4f565b915061518860208401614d4f565b600080600080608085870312156154d857600080fd5b84356001600160401b03808211156154ef57600080fd5b6154fb88838901614e9b565b955060209150818701358181111561551257600080fd5b87019050601f8101881361552557600080fd5b8035615533614ebc82614e78565b81815260059190911b8201830190838101908a83111561555257600080fd5b928401925b8284101561557057833582529284019290840190615557565b979a97995050505060408601359560600135949350505050565b600181811c9082168061559e57607f821691505b6020821081036155be57634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b0392831681529116602082015260400190565b6000602082840312156155f057600080fd5b8151611ef681614f51565b634e487b7160e01b600052601160045260246000fd5b81810381811115610b8457610b846155fb565b601f8211156116b957600081815260208120601f850160051c8101602086101561564b5750805b601f850160051c820191505b8181101561566a57828155600101615657565b505050505050565b600019600383901b1c191660019190911b1790565b81516001600160401b038111156156a0576156a0614dac565b6156b4816156ae845461558a565b84615624565b602080601f8311600181146156e357600084156156d15750858301515b6156db8582615672565b86555061566a565b600085815260208120601f198616915b82811015615712578886015182559484019460019091019084016156f3565b50858210156157305787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b80820180821115610b8457610b846155fb565b8082028115828204841417610b8457610b846155fb565b6000826157ee57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6001600160a01b038481168252831660208083019190915260606040830152825460009182916158ba8161558a565b80606087015260806001808416600081146158dc57600181146158f657615924565b60ff1985168984015283151560051b890183019650615924565b896000528560002060005b8581101561591c5781548b8201860152908301908701615901565b8a0184019750505b50949a9950505050505050505050565b6000808335601e1984360301811261594b57600080fd5b8301803591506001600160401b0382111561596557600080fd5b60200191503681900382131561168c57600080fd5b6001600160401b0383111561599157615991614dac565b6159a58361599f835461558a565b83615624565b6000601f8411600181146159d357600085156159c15750838201355b6159cb8682615672565b8455506125c6565b600083815260209020601f19861690835b82811015615a0457868501358255602094850194600190920191016159e4565b5086821015615a215760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b615a3d8283615934565b6001600160401b03811115615a5457615a54614dac565b615a6881615a62855461558a565b85615624565b6000601f821160018114615a965760008315615a845750838201355b615a8e8482615672565b865550615af0565b600085815260209020601f19841690835b82811015615ac75786850135825560209485019460019092019101615aa7565b5084821015615ae45760001960f88660031b161c19848701351681555b505060018360011b0185555b50505050615b016020830183615934565b615b0f81836001860161597a565b5050615b1e6040830183615934565b610e7481836002860161597a565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b803564ffffffffff81168114614d6657600080fd5b803563ffffffff81168114614d6657600080fd5b80356001600160701b0381168114614d6657600080fd5b6040808252818101849052600090606080840187845b88811015615c5c5764ffffffffff80615be584615b77565b168452602081615bf6828601615b77565b169085015250615c07828601615b8c565b63ffffffff8082168786015280615c1f878601615b8c565b1686860152505060806001600160701b03615c3b828501615ba0565b169084015260a0828101359084015260c09283019290910190600101615bcd565b5050809350505050826020830152949350505050565b600060c08284031215615c8457600080fd5b60405160c081018181106001600160401b0382111715615ca657615ca6614dac565b604052615cb283615b77565b8152615cc060208401615b77565b6020820152615cd160408401615b8c565b6040820152615ce260608401615b8c565b6060820152615cf360808401615ba0565b608082015260a083013560a08201528091505092915050565b600060208284031215615d1e57600080fd5b5051919050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052602160045260246000fd5b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b815260008351615dbf816017850160208801614cbf565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615df0816028840160208801614cbf565b01602801949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061387f90830184614ce3565b600060208284031215615e4157600080fd5b8151611ef681614c8c565b600081615e5b57615e5b6155fb565b506000190190565b60008251615e75818460208701614cbf565b9190910192915050565b600060018201615e9157615e916155fb565b506001019056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564fd63b67fde00b77f1f54f050135a475665b815acd10a8e7fd785ba074846734aa2646970667358221220c42d6986455398a860eaeafb6ff3f11aef4bf649aa09b6448cf7431eebea95f064736f6c63430008110033

Deployed Bytecode

0x6080604052600436106103385760003560e01c80637b0cb839116101b2578063b0ccc31e116100ed578063ce4c61aa11610090578063ce4c61aa14610a0d578063d539139314610a22578063d547741f14610a56578063dedd76e714610a76578063e985e9c514610b02578063ec44d61514610b22578063f2fde38b14610b42578063f86a352914610b6257600080fd5b8063b0ccc31e14610928578063b0fde7fb1461094d578063b3cc59db14610967578063b88d4fde1461097c578063bc20a04a1461099c578063bdc769eb146109c0578063c0dad79b146109d3578063c87b56dd146109ed57600080fd5b806390411aca1161015557806390411aca1461085357806391d148541461086857806394b08a4b1461088857806395d89b41146108a857806397f5cdcf146108bd578063a07c7ce4146108d3578063a217fddf146108f3578063a22cb4651461090857600080fd5b80637b0cb839146107365780637f1fea591461074b578063804207361461076b57806385df4dad14610780578063869d3bde146107a05780638c8ea8e6146107b55780638cd90c32146107fb5780638da5cb5b1461083457600080fd5b80633f52af3c11610282578063548e768211610225578063548e768214610625578063577199fd1461064557806360659a92146106655780636352211e146106b1578063659b8b2a146106d157806370a08231146106ec578063715018a61461070c57806372c06f5a1461072157600080fd5b80633f52af3c14610553578063408d3ca91461057357806341dfed3a1461058857806342842e0e1461059d57806342966c68146105bd5780634e0b9df2146105dd5780634f1ef286146105fd57806352d1902d1461061057600080fd5b8063248a9ca3116102ea578063248a9ca3146104465780632955a21d146104775780632a55205a1461048a5780632f2ff15d146104c95780633540558a146104e957806336568abe1461050b5780633659cfe61461052b5780633ccfd60b1461054b57600080fd5b806301ffc9a71461033d57806306fdde0314610372578063081812fc14610394578063095ea7b3146103c157806318160ddd146103e357806319315d011461040657806323b872dd14610426575b600080fd5b34801561034957600080fd5b5061035d610358366004614ca2565b610b79565b60405190151581526020015b60405180910390f35b34801561037e57600080fd5b50610387610b8a565b6040516103699190614d0f565b3480156103a057600080fd5b506103b46103af366004614d22565b610c1c565b6040516103699190614d3b565b3480156103cd57600080fd5b506103e16103dc366004614d6b565b610ca9565b005b3480156103ef57600080fd5b506103f8610e7a565b604051908152602001610369565b34801561041257600080fd5b506103e1610421366004614f6a565b610e91565b34801561043257600080fd5b506103e161044136600461509d565b6110e5565b34801561045257600080fd5b506103f8610461366004614d22565b6000908152610100602052604090206001015490565b6103e16104853660046150d9565b61121c565b34801561049657600080fd5b506104aa6104a5366004615143565b6115e5565b604080516001600160a01b039093168352602083019190915201610369565b3480156104d557600080fd5b506103e16104e4366004615165565b611693565b3480156104f557600080fd5b506103f8600080516020615ee083398151915281565b34801561051757600080fd5b506103e1610526366004615165565b6116be565b34801561053757600080fd5b506103e1610546366004615191565b61173c565b6103e1611804565b34801561055f57600080fd5b506103e161056e3660046151ac565b61188a565b34801561057f57600080fd5b506103e161190a565b34801561059457600080fd5b506103f8611926565b3480156105a957600080fd5b506103e16105b836600461509d565b611968565b3480156105c957600080fd5b506103f86105d8366004614d22565b611a6e565b3480156105e957600080fd5b506103e16105f83660046151d6565b611b14565b6103e161060b366004615221565b611b54565b34801561061c57600080fd5b506103f8611c09565b34801561063157600080fd5b506103e161064036600461526e565b611cb7565b34801561065157600080fd5b506103e1610660366004615289565b611d42565b34801561067157600080fd5b506101fa54610691906001600160801b0380821691600160801b90041682565b604080516001600160801b03938416815292909116602083015201610369565b3480156106bd57600080fd5b506103b46106cc366004614d22565b611e3d565b3480156106dd57600080fd5b506101fc5461035d9060ff1681565b3480156106f857600080fd5b506103f8610707366004615191565b611efd565b34801561071857600080fd5b506103e1611f8d565b34801561072d57600080fd5b5061035d611fa1565b34801561074257600080fd5b506103e1612015565b34801561075757600080fd5b506103e1610766366004615191565b61206d565b34801561077757600080fd5b506103e161211b565b34801561078c57600080fd5b506103e161079b3660046152d0565b61218d565b3480156107ac57600080fd5b506103f86121a3565b3480156107c157600080fd5b506103f86107d0366004615191565b6001600160a01b0316600090815260d36020526040902054600160601b90046001600160601b031690565b34801561080757600080fd5b506103f8610816366004615165565b6101fe60209081526000928352604080842090915290825290205481565b34801561084057600080fd5b50610164546001600160a01b03166103b4565b34801561085f57600080fd5b5060cc546103f8565b34801561087457600080fd5b5061035d610883366004615165565b612221565b34801561089457600080fd5b506103e16108a336600461530a565b61224d565b3480156108b457600080fd5b50610387612325565b3480156108c957600080fd5b506103f860cc5481565b3480156108df57600080fd5b506101fc5461035d90610100900460ff1681565b3480156108ff57600080fd5b506103f8600081565b34801561091457600080fd5b506103e1610923366004615338565b612334565b34801561093457600080fd5b506097546103b49061010090046001600160a01b031681565b34801561095957600080fd5b5060d45461035d9060ff1681565b34801561097357600080fd5b506103e16123ff565b34801561098857600080fd5b506103e161099736600461536f565b61248d565b3480156109a857600080fd5b506109b16125cd565b604051610369939291906153d6565b6103e16109ce36600461540f565b61277c565b3480156109df57600080fd5b5060975461035d9060ff1681565b3480156109f957600080fd5b50610387610a08366004614d22565b61290b565b348015610a1957600080fd5b506103f8612a24565b348015610a2e57600080fd5b506103f87ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc981565b348015610a6257600080fd5b506103e1610a71366004615165565b612a79565b348015610a8257600080fd5b50610a96610a91366004614d22565b612a9f565b6040516103699190600060c08201905064ffffffffff80845116835280602085015116602084015250604083015163ffffffff808216604085015280606086015116606085015250506001600160701b03608084015116608083015260a083015160a083015292915050565b348015610b0e57600080fd5b5061035d610b1d366004615498565b612b73565b348015610b2e57600080fd5b506103e1610b3d3660046154c2565b612ba1565b348015610b4e57600080fd5b506103e1610b5d366004615191565b612d49565b348015610b6e57600080fd5b506103f86101ff5481565b6000610b8482612dbf565b92915050565b606060ca8054610b999061558a565b80601f0160208091040260200160405190810160405280929190818152602001828054610bc59061558a565b8015610c125780601f10610be757610100808354040283529160200191610c12565b820191906000526020600020905b815481529060010190602001808311610bf557829003601f168201915b5050505050905090565b6000610c2782612de4565b610c8d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b50600090815260d160205260409020546001600160a01b031690565b609754829060ff16158015610cce575060975461010090046001600160a01b03163b15155b15610d6957609754604051633185c44d60e21b81526101009091046001600160a01b03169063c617113490610d0990309085906004016155c4565b602060405180830381865afa158015610d26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4a91906155de565b610d695780604051633b79c77360e21b8152600401610c849190614d3b565b6000610d7483611e3d565b9050806001600160a01b0316846001600160a01b031603610de15760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610c84565b336001600160a01b0382161480610dfd5750610dfd8133612b73565b610e6a5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b6064820152608401610c84565b610e748484612e17565b50505050565b600060cd5460cc54610e8c9190615611565b905090565b600054610100900460ff1615808015610eb15750600054600160ff909116105b80610ecb5750303b158015610ecb575060005460ff166001145b610f2e5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610c84565b6000805460ff191660011790558015610f51576000805461ff0019166101001790555b8551600214610f5f57600080fd5b610f698b8b612ea9565b610f71612eda565b610f9f6daaeb6d7670e522a718067333cd4e733cc6cdda760b79bafa08df41ecfa224f810dceb66001612f01565b610fa885612f44565b604080518082019091526001600160801b03808e168083529089166020909201829052600160801b909102176101fa556101fb610fe58a82615687565b5060d4805460ff19168315151790558551869060009061100757611007615740565b60200260200101516101fc60026101000a8154816001600160a01b0302191690836001600160a01b0316021790555061105a8660018151811061104c5761104c615740565b602002602001015189612f97565b611065600086613094565b61107d600080516020615ee083398151915286613094565b82156110915761108f8484600061311b565b505b80156110d7576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050505050565b609754839060ff1615801561110a575060975461010090046001600160a01b03163b15155b156111ec57336001600160a01b038216036111565761112a335b836135aa565b6111465760405162461bcd60e51b8152600401610c8490615756565b611151848484613674565b610e74565b609754604051633185c44d60e21b81526101009091046001600160a01b03169063c61711349061118c90309033906004016155c4565b602060405180830381865afa1580156111a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111cd91906155de565b6111ec5733604051633b79c77360e21b8152600401610c849190614d3b565b6111f533611124565b6112115760405162461bcd60e51b8152600401610c8490615756565b610e74848484613674565b82600010801561122d575060148311155b61124a576040516332b4cb2160e21b815260040160405180910390fd5b60006112546121a3565b60008181526101fd60209081526040808320815160c081018352815464ffffffffff8082168352600160281b82041694820194909452600160501b840463ffffffff90811693820193909352600160701b84049092166060830152600160901b9092046001600160701b03166080820181905260019092015460a08201529293506112e79066031742a8f46000906157a7565b90506112f386826157ba565b341461131257604051632c1d501360e11b815260040160405180910390fd5b8660000361133357604051633ab3447f60e11b815260040160405180910390fd5b60cc54606083015163ffffffff16811061135f5760405162491a1760e81b815260040160405180910390fd5b60a08301511561138257604051630268975d60e51b815260040160405180910390fd5b6101fc5460ff1661145857600061139b86898b8a613808565b9050737a6f5866f97034bb7153829bdaac1ffcb8facb716113bc828c613889565b6001600160a01b0316146113e3576040516332c3ce2560e11b815260040160405180910390fd5b6001600160a01b038616600090815260d36020526040902054600160c01b90046001600160401b0316891161142b5760405163dc5a682560e01b815260040160405180910390fd5b6114368960286157a7565b43111561145657604051639e8c142f60e01b815260040160405180910390fd5b505b600061146886868a85888c6138ad565b905061147586828b613a3d565b600073c5a2f45ff2d4ca27e167600b5225c7e6e187d8c061149d8366031742a8f460006157ba565b604051600081818185875af1925050503d80600081146114d9576040519150601f19603f3d011682016040523d82523d6000602084013e6114de565b606091505b505090508061150057604051635579a42f60e11b815260040160405180910390fd5b8882101561158e57600084611515848c615611565b61151f91906157ba565b604051909150600090339083908381818185875af1925050503d8060008114611564576040519150601f19603f3d011682016040523d82523d6000602084013e611569565b606091505b505090508061158b57604051635579a42f60e11b815260040160405180910390fd5b50505b604080516001600160a01b0389168152602081018890529081018390527f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f9060600160405180910390a15050505050505050505050565b60008281526066602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b031692820192909252829161165a5750604080518082019091526065546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090611679906001600160601b0316876157ba565b61168391906157d1565b91519350909150505b9250929050565b600082815261010060205260409020600101546116af81613a58565b6116b98383613094565b505050565b6001600160a01b038116331461172e5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c84565b6117388282613a62565b5050565b6001600160a01b037f000000000000000000000000ac26674773271aaafec3d31d2ae2c9c4de0de51f1630036117845760405162461bcd60e51b8152600401610c84906157f3565b7f000000000000000000000000ac26674773271aaafec3d31d2ae2c9c4de0de51f6001600160a01b03166117b6613aca565b6001600160a01b0316146117dc5760405162461bcd60e51b8152600401610c849061583f565b6117e581613ae6565b6040805160008082526020820190925261180191839190613aee565b50565b600061180f81613a58565b6101fc546040516000916201000090046001600160a01b03169047908381818185875af1925050503d8060008114611863576040519150601f19603f3d011682016040523d82523d6000602084013e611868565b606091505b505090508061173857604051635579a42f60e11b815260040160405180910390fd5b611895600033612221565b6118b257604051634e8df0bf60e01b815260040160405180910390fd5b6118bc8282612f97565b604080516001600160a01b03841681526001600160601b03831660208201527fef5955f7902e6696c028804c62be1c24a0f98d9d30de5c31c83fa7f8b5c15c6f910160405180910390a15050565b611912613c59565b60d4805460ff19811660ff90911615179055565b600066031742a8f460006101fd600061193d6121a3565b8152602081019190915260400160002054610e8c9190600160901b90046001600160701b03166157a7565b609754839060ff1615801561198d575060975461010090046001600160a01b03163b15155b15611a5357336001600160a01b038216036119bd576111518484846040518060200160405280600081525061248d565b609754604051633185c44d60e21b81526101009091046001600160a01b03169063c6171134906119f390309033906004016155c4565b602060405180830381865afa158015611a10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a3491906155de565b611a535733604051633b79c77360e21b8152600401610c849190614d3b565b610e748484846040518060200160405280600081525061248d565b6101fc54600090610100900460ff16611a9a5760405163c7c39e4f60e01b815260040160405180910390fd5b611aac611aa683611e3d565b33612b73565b80611ad05750611abb82611e3d565b6001600160a01b0316336001600160a01b0316145b80611aeb575033611ae083610c1c565b6001600160a01b0316145b611b075760405162ccfedb60e31b815260040160405180910390fd5b611b1082613cb4565b5090565b611b2c600080516020615ee083398151915233612221565b611b4957604051634e8df0bf60e01b815260040160405180910390fd5b610e7483838361311b565b6001600160a01b037f000000000000000000000000ac26674773271aaafec3d31d2ae2c9c4de0de51f163003611b9c5760405162461bcd60e51b8152600401610c84906157f3565b7f000000000000000000000000ac26674773271aaafec3d31d2ae2c9c4de0de51f6001600160a01b0316611bce613aca565b6001600160a01b031614611bf45760405162461bcd60e51b8152600401610c849061583f565b611bfd82613ae6565b61173882826001613aee565b6000306001600160a01b037f000000000000000000000000ac26674773271aaafec3d31d2ae2c9c4de0de51f1614611ca45760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c6044820152771b1959081d1a1c9bdd59da0819195b1959d85d1958d85b1b60421b6064820152608401610c84565b50600080516020615e9983398151915290565b611ccf600080516020615ee083398151915233612221565b611cec57604051634e8df0bf60e01b815260040160405180910390fd5b6101fa80546001600160801b03908116600160801b918416918202179091556040519081527f8c8298dd23c82a4aa45d27f480c6ce0aa2588e13df0b2fe2c827ca4a6836a5f8906020015b60405180910390a150565b611d4b33613dc9565b611d6857604051634755657960e01b815260040160405180910390fd5b826001600160a01b0381163b600003611d9457604051630458607f60e41b815260040160405180910390fd5b60405163c3c5a54760e01b81526001600160a01b0382169063c3c5a54790611dc0903090600401614d3b565b6020604051808303816000875af1158015611ddf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e0391906155de565b611e1257611e12818484613dd5565b609780546001600160a01b0390921661010002610100600160a81b0319909216919091179055505050565b6000611e4882612de4565b611ea55760405162461bcd60e51b815260206004820152602860248201527f45524337323178797a3a20517565727920666f72206e6f6e206578697374656e6044820152677420746f6b656e2160c01b6064820152608401610c84565b600082815260ce602052604090205482906001600160a01b031680611ef6575b50600081815260cf60205260409020546001600160a01b03168015611eeb579392505050565b816001019150611ec5565b9392505050565b60006001600160a01b038216611f685760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610c84565b506001600160a01b0316600090815260d360205260409020546001600160601b031690565b611f95613c59565b611f9f6000612f44565b565b6000611fac33613dc9565b611fc957604051634755657960e01b815260040160405180910390fd5b6097805460ff81161560ff1990911681179091556040518181527fd8c469bcb7a4be6d69103a5fdb65991249a95423350dc583495ccf5e7c28a88d9060200160405180910390a1905090565b61201d613c59565b7f62e4ed1ae964bf13ab15b4efee5e0889bdf5d1b1cd6d33d036546dc478773c6030612052610164546001600160a01b031690565b60cb6040516120639392919061588b565b60405180910390a1565b612078600033612221565b61209557604051634e8df0bf60e01b815260040160405180910390fd5b6001600160a01b0381166120bc5760405163d92e233d60e01b815260040160405180910390fd5b6101fc805462010000600160b01b031916620100006001600160a01b03848116820292909217928390556040517fd45e158b56e768c1167267f8516bcf96348071775faded3c9216b60855d873de93611d379392900490911690614d3b565b612126600033612221565b61214357604051634e8df0bf60e01b815260040160405180910390fd5b6101fc5460ff161561215457600080fd5b6101fc805460ff191660011790556040517ffbbcc58867e8fad1d9f72f1b991660f5ec5e4e068374aa442b8604eef182b63990600090a1565b612195613c59565b806102006116b98282615a33565b6101ff546000905b8015612207576000190160008181526101fd602052604090205464ffffffffff1642108015906121f8575060008181526101fd6020526040902054600160281b900464ffffffffff164211155b1561220257919050565b6121ab565b5060405163b7b2409760e01b815260040160405180910390fd5b6000918252610100602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61225633613dc9565b61227357604051634755657960e01b815260040160405180910390fd5b60975461010090046001600160a01b0316803b6000036122a657604051630458607f60e41b815260040160405180910390fd5b6001600160a01b03841661231a5760405163034a0dc160e41b815230600482015282151560248201526001600160a01b038216906334a0dc1090604401600060405180830381600087803b1580156122fd57600080fd5b505af1158015612311573d6000803e3d6000fd5b50505050610e74565b610e74818585613dd5565b606060cb8054610b999061558a565b609754829060ff16158015612359575060975461010090046001600160a01b03163b15155b156123f457609754604051633185c44d60e21b81526101009091046001600160a01b03169063c61711349061239490309085906004016155c4565b602060405180830381865afa1580156123b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123d591906155de565b6123f45780604051633b79c77360e21b8152600401610c849190614d3b565b6116b9338484613f7f565b612417600080516020615ee083398151915233612221565b61243457604051634e8df0bf60e01b815260040160405180910390fd5b6101fc805460ff610100808304821615810261ff001990931692909217928390556040517f6ae3331a8bd1998bb8fd9d3d02b720f4862fb43e7586d302ba44e3923cea922d936120639390049091161515815260200190565b609754849060ff161580156124b2575060975461010090046001600160a01b03163b15155b1561259557336001600160a01b038216036124ff576124d2335b846135aa565b6124ee5760405162461bcd60e51b8152600401610c8490615756565b6124fa8585858561404d565b6125c6565b609754604051633185c44d60e21b81526101009091046001600160a01b03169063c61711349061253590309033906004016155c4565b602060405180830381865afa158015612552573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061257691906155de565b6125955733604051633b79c77360e21b8152600401610c849190614d3b565b61259e336124cc565b6125ba5760405162461bcd60e51b8152600401610c8490615756565b6125c68585858561404d565b5050505050565b610200805481906125dd9061558a565b80601f01602080910402602001604051908101604052809291908181526020018280546126099061558a565b80156126565780601f1061262b57610100808354040283529160200191612656565b820191906000526020600020905b81548152906001019060200180831161263957829003601f168201915b50505050509080600101805461266b9061558a565b80601f01602080910402602001604051908101604052809291908181526020018280546126979061558a565b80156126e45780601f106126b9576101008083540402835291602001916126e4565b820191906000526020600020905b8154815290600101906020018083116126c757829003601f168201915b5050505050908060020180546126f99061558a565b80601f01602080910402602001604051908101604052809291908181526020018280546127259061558a565b80156127725780601f1061274757610100808354040283529160200191612772565b820191906000526020600020905b81548152906001019060200180831161275557829003601f168201915b5050505050905083565b82600010801561278d575060148311155b6127aa576040516332b4cb2160e21b815260040160405180910390fd5b60006127b46121a3565b60008181526101fd60209081526040808320815160c081018352815464ffffffffff8082168352600160281b82041694820194909452600160501b840463ffffffff90811693820193909352600160701b84049092166060830152600160901b9092046001600160701b03166080820181905260019092015460a08201529293506128479066031742a8f46000906157a7565b905061285386826157ba565b341461287257604051632c1d501360e11b815260040160405180910390fd5b60a082015161289457604051637904b60360e11b815260040160405180910390fd5b60cc54606083015163ffffffff1681106128c05760405162491a1760e81b815260040160405180910390fd5b6128d189898560a00151888a614080565b6128ee576040516334ce9a3d60e11b815260040160405180910390fd5b60006128fe86868a85888c6138ad565b9050611475868243613a3d565b606061291682612de4565b6129625760405162461bcd60e51b815260206004820152601a60248201527f546f6b656e20686173206e6f74206265656e206d696e746564210000000000006044820152606401610c84565b6201388082106129ff57610200805461297a9061558a565b80601f01602080910402602001604051908101604052809291908181526020018280546129a69061558a565b80156129f35780601f106129c8576101008083540402835291602001916129f3565b820191906000526020600020905b8154815290600101906020018083116129d657829003601f168201915b50505050509050919050565b614e208210612a1657610201805461297a9061558a565b610202805461297a9061558a565b6101ff546000905b8015612a71576000190160008181526101fd6020526040902054600160281b900464ffffffffff16421115612a6c57612a668160016157a7565b91505090565b612a2c565b506000905090565b60008281526101006020526040902060010154612a9581613a58565b6116b98383613a62565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a08101919091526101ff548210612af4576040516327e7ab7d60e11b815260040160405180910390fd5b5060009081526101fd6020908152604091829020825160c081018452815464ffffffffff8082168352600160281b82041693820193909352600160501b830463ffffffff90811694820194909452600160701b83049093166060840152600160901b9091046001600160701b031660808301526001015460a082015290565b6001600160a01b03918216600090815260d26020908152604080832093909416825291909152205460ff1690565b606484511115612bc4576040516349a3ec1560e11b815260040160405180910390fd5b8251845114612c0a5760405162461bcd60e51b81526020600482015260126024820152710aee4dedcce40c2e4e4c2f240d8cadccee8d60731b6044820152606401610c84565b8160cc5414612c4c5760405162461bcd60e51b815260206004820152600e60248201526d15dc9bdb99c81cdd185c9d08125160921b6044820152606401610c84565b612c64600080516020615ee083398151915233612221565b158015612c985750612c967ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc933612221565b155b15612cb657604051634e8df0bf60e01b815260040160405180910390fd5b60005b8451811015612d0857612d00858281518110612cd757612cd7615740565b6020026020010151858381518110612cf157612cf1615740565b602002602001015160006140f7565b600101612cb9565b508060cc5414610e745760405162461bcd60e51b815260206004820152600c60248201526b15dc9bdb99c8195b9908125160a21b6044820152606401610c84565b612d51613c59565b6001600160a01b038116612db65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c84565b61180181612f44565b60006001600160e01b03198216637965db0b60e01b1480610b845750610b8482614277565b600081815260d0602052604081205460ff1615612e0357506000919050565b816000108015610b8457505060cc54101590565b600081815260d160205260409020546001600160a01b0390811690831681146116b957600082815260d16020526040902080546001600160a01b0319166001600160a01b0385169081179091558290612e6f82611e3d565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b600054610100900460ff16612ed05760405162461bcd60e51b8152600401610c8490615b2c565b61173882826142d2565b600054610100900460ff16611f9f5760405162461bcd60e51b8152600401610c8490615b2c565b600054610100900460ff16612f285760405162461bcd60e51b8152600401610c8490615b2c565b6001600160a01b0383163b156116b95782611e12818484613dd5565b61016480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6127106001600160601b03821611156130055760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610c84565b6001600160a01b03821661305b5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610c84565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217606555565b61309e8282612221565b611738576000828152610100602090815260408083206001600160a01b03851684529091529020805460ff191660011790556130d73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281613127612a24565b9050601482111561314b576040516373c2b52560e11b815260040160405180910390fd5b6101ff54801580159061315d57508185105b1561317b576040516344ca163560e11b815260040160405180910390fd5b8085111561319c576040516307cc4d8f60e01b815260040160405180910390fd5b6131a76014836157a7565b6131b184876157a7565b11156131d05760405163c1eae7bb60e01b815260040160405180910390fd5b60008581526101fd602052604081205464ffffffffff169084900361325d5742811161320f5760405163bf4a806960e01b815260040160405180910390fd5b6101ff8690556040517f842cd1905522b3731a39e0d2fb9d3757bc29b4e57e9253b230d437bf10505e9b90613249908a908a908a90615bb7565b60405180910390a185945050505050611ef6565b60008888600081811061327257613272615740565b905060c002018036038101906132889190615c72565b905060cc54816060015163ffffffff1610156132b757604051630e93fda160e21b815260040160405180910390fd5b4282111580156132c657508115155b80156132d457506101ff5487105b1561333157805164ffffffffff16821461330157604051632ca4094f60e21b815260040160405180910390fd5b42816020015164ffffffffff161161332c5760405163804491f960e01b815260040160405180910390fd5b61335c565b42816000015164ffffffffff161161335c5760405163667e606760e11b815260040160405180910390fd5b868581015b888214613395578a8a8a840381811061337c5761337c615740565b905060c002018036038101906133929190615c72565b92505b6101fa5460608401516001600160801b0390911663ffffffff90911611156133d05760405163bccc7e2360e01b815260040160405180910390fd5b826000015164ffffffffff16836020015164ffffffffff161161340657604051631131dc6b60e11b815260040160405180910390fd5b811561349657600019820160009081526101fd6020526040902054606084015164ffffffffff600160281b8304169163ffffffff600160701b90910481169116101561346c5742811061346c576040516357be1d0d60e01b815260040160405180910390fd5b835164ffffffffff1681106134945760405163064f2b0760e31b815260040160405180910390fd5b505b60008281526101fd60209081526040918290208551815492870151938701516060880151608089015164ffffffffff93841669ffffffffffffffffffff1990961695909517600160281b93909616929092029490941767ffffffffffffffff60501b1916600160501b63ffffffff9586160263ffffffff60701b191617600160701b9490911693909302929092176001600160901b0316600160901b6001600160701b039092169190910217815560a084015160019182015590910190808210613361576101ff8190556040517f842cd1905522b3731a39e0d2fb9d3757bc29b4e57e9253b230d437bf10505e9b90613594908d908d908d90615bb7565b60405180910390a19a9950505050505050505050565b60006135b582612de4565b6136165760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610c84565b600061362183611e3d565b9050806001600160a01b0316846001600160a01b0316148061365c5750836001600160a01b031661365184610c1c565b6001600160a01b0316145b8061366c575061366c8185612b73565b949350505050565b826001600160a01b031661368782611e3d565b6001600160a01b0316146136eb5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610c84565b6001600160a01b03821661374d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610c84565b613758838383614312565b613763600082612e17565b6001600160a01b03838116600081815260d36020908152604080832080546001600160601b03198082166001600160601b039283166000190183161790925595881680855282852080549283169288166001019097169190911790955585835260ce90915280822080546001600160a01b0319168517905551849392917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b604080517f5b174e00b853ebb074ee5cb5d23ca67a264896e5670f923ac103fccad5232b5560208201526001600160a01b03861691810191909152606081018490526080810183905260a08101829052600090819061387f9060c0016040516020818303038152906040528051906020012061435b565b9695505050505050565b60008060006138988585614436565b915091506138a581614478565b509392505050565b6001600160a01b038616600081815260d360209081526040808320548984526101fe83528184209484529390915280822054908501519192600160601b90046001600160601b03169163ffffffff161561394f57846040015163ffffffff16811061392b57604051632f18066d60e01b815260040160405180910390fd5b846040015163ffffffff16878201111561394f5780856040015163ffffffff160396505b6101fa54600160801b90046001600160801b031680156139995780831061398957604051632f18066d60e01b815260040160405180910390fd5b8088840111156139995782810397505b856060015163ffffffff1688880111156139bd5786866060015163ffffffff160397505b6000851180156139d157506101fc5460ff16155b15613a06578482106139f657604051632f18066d60e01b815260040160405180910390fd5b848883011115613a065781850397505b5060008881526101fe602090815260408083206001600160a01b038d16845290915290209087019055508490509695505050505050565b6116b9838360405180602001604052806000815250846145bd565b61180181336145d7565b613a6c8282612221565b15611738576000828152610100602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600080516020615e99833981519152546001600160a01b031690565b611801613c59565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615613b21576116b983614630565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015613b7b575060408051601f3d908101601f19168201909252613b7891810190615d0c565b60015b613bde5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610c84565b600080516020615e998339815191528114613c4d5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610c84565b506116b98383836146cc565b610164546001600160a01b03163314611f9f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c84565b613cbd81612de4565b613d195760405162461bcd60e51b815260206004820152602760248201527f45524337323178797a3a20517565727920666f72206e6f6e6578697374656e7460448201526620746f6b656e2160c81b6064820152608401610c84565b6000613d2482611e3d565b9050613d3281600084614312565b613d3d600083612e17565b6001600160a01b038116600081815260d36020908152604080832080546001600160601b031981166001600160601b039182166000190190911617905585835260d0909152808220805460ff1916600190811790915560cd80549091019055518492907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000610b848183612221565b60405163c3c5a54760e01b81526001600160a01b0384169063c3c5a54790613e01903090600401614d3b565b6020604051808303816000875af1158015613e20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e4491906155de565b15613ee2578015613eb457604051632cc5350560e21b81526001600160a01b0384169063b314d41490613e7d90309086906004016155c4565b600060405180830381600087803b158015613e9757600080fd5b505af1158015613eab573d6000803e3d6000fd5b50505050505050565b604051630781ad2d60e21b81526001600160a01b03841690631e06b4b490613e7d90309086906004016155c4565b8015613f1657604051633e9f1edf60e11b81526001600160a01b03841690637d3e3dbe90613e7d90309086906004016155c4565b6001600160a01b03821615613f535760405163a0af290360e01b81526001600160a01b0384169063a0af290390613e7d90309086906004016155c4565b604051632210724360e11b81526001600160a01b03841690634420e48690613e7d903090600401614d3b565b816001600160a01b0316836001600160a01b031603613fe05760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610c84565b6001600160a01b03838116600081815260d26020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b614058848484613674565b614064848484846146f1565b610e745760405162461bcd60e51b8152600401610c8490615d25565b600061387f868680806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506040516001600160601b0319606089901b166020820152603481018790528892506054019050604051602081830303815290604052805190602001206147ef565b6001600160a01b03831661414d5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610c84565b61415b60008460cc54614312565b60cc8054838101918290556001600160a01b038516600090815260d36020526040902080546001600160601b038082168701166001600160601b03199091161790559082156141fa576001600160a01b038516600090815260d36020526040902080546001600160601b03808216600160601b92839004821688019091169091026001600160c01b031617600160c01b6001600160401b038616021790555b600081815260cf6020526040902080546001600160a01b0319166001600160a01b03871617905560018281019082015b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a481600101915080821061422a57505050610e74565b60006001600160e01b0319821663152a902d60e11b14806142a857506001600160e01b031982166380ac58cd60e01b145b806142c357506001600160e01b03198216635b5e139f60e01b145b80610b845750610b8482614805565b600054610100900460ff166142f95760405162461bcd60e51b8152600401610c8490615b2c565b60ca6143058382615687565b5060cb6116b98282615687565b6001600160a01b0383161580159061433257506001600160a01b03821615155b156116b95760d45460ff16156116b9576040516328f11eb160e21b815260040160405180910390fd5b604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6020808301919091527f36cb08f6aafe2399767bf40e9642429d7535f40e61bd81428cad09095c5d337d828401527f06c015bd22b4c69690933c1058878ebdfef31f9aaae40bbe86d8a09fe1b2972c60608301524660808301523060a0808401919091528351808403909101815260c08301845280519082012061190160f01b60e084015260e2830181905261010280840186905284518085039091018152610122909301909352815191012060009190611ef6565b600080825160410361446c5760208301516040840151606085015160001a6144608782858561483a565b9450945050505061168c565b5060009050600261168c565b600081600481111561448c5761448c615d77565b036144945750565b60018160048111156144a8576144a8615d77565b036144f05760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610c84565b600281600481111561450457614504615d77565b036145515760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610c84565b600381600481111561456557614565615d77565b036118015760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610c84565b6145c88484836140f7565b61406460008560cc54856146f1565b6145e18282612221565b611738576145ee816148f4565b6145f9836020614906565b60405160200161460a929190615d8d565b60408051601f198184030181529082905262461bcd60e51b8252610c8491600401614d0f565b6001600160a01b0381163b61469d5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610c84565b600080516020615e9983398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6146d583614aa1565b6000825111806146e25750805b156116b957610e748383614ae1565b60006001600160a01b0384163b156147e757604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290614735903390899088908890600401615dfc565b6020604051808303816000875af1925050508015614770575060408051601f3d908101601f1916820190925261476d91810190615e2f565b60015b6147cd573d80801561479e576040519150601f19603f3d011682016040523d82523d6000602084013e6147a3565b606091505b5080516000036147c55760405162461bcd60e51b8152600401610c8490615d25565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061366c565b50600161366c565b6000826147fc8584614bd5565b14949350505050565b60006001600160e01b0319821663152a902d60e11b1480610b8457506301ffc9a760e01b6001600160e01b0319831614610b84565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b0383111561486757506000905060036148eb565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156148bb573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166148e4576000600192509250506148eb565b9150600090505b94509492505050565b6060610b846001600160a01b03831660145b606060006149158360026157ba565b6149209060026157a7565b6001600160401b0381111561493757614937614dac565b6040519080825280601f01601f191660200182016040528015614961576020820181803683370190505b509050600360fc1b8160008151811061497c5761497c615740565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106149ab576149ab615740565b60200101906001600160f81b031916908160001a90535060006149cf8460026157ba565b6149da9060016157a7565b90505b6001811115614a52576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110614a0e57614a0e615740565b1a60f81b828281518110614a2457614a24615740565b60200101906001600160f81b031916908160001a90535060049490941c93614a4b81615e4c565b90506149dd565b508315611ef65760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c84565b614aaa81614630565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b614b495760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610c84565b600080846001600160a01b031684604051614b649190615e63565b600060405180830381855af49150503d8060008114614b9f576040519150601f19603f3d011682016040523d82523d6000602084013e614ba4565b606091505b5091509150614bcc8282604051806060016040528060278152602001615eb960279139614c1a565b95945050505050565b600081815b84518110156138a557614c0682868381518110614bf957614bf9615740565b6020026020010151614c33565b915080614c1281615e7f565b915050614bda565b60608315614c29575081611ef6565b611ef68383614c62565b6000818310614c4f576000828152602084905260409020611ef6565b6000838152602083905260409020611ef6565b815115614c725781518083602001fd5b8060405162461bcd60e51b8152600401610c849190614d0f565b6001600160e01b03198116811461180157600080fd5b600060208284031215614cb457600080fd5b8135611ef681614c8c565b60005b83811015614cda578181015183820152602001614cc2565b50506000910152565b60008151808452614cfb816020860160208601614cbf565b601f01601f19169290920160200192915050565b602081526000611ef66020830184614ce3565b600060208284031215614d3457600080fd5b5035919050565b6001600160a01b0391909116815260200190565b80356001600160a01b0381168114614d6657600080fd5b919050565b60008060408385031215614d7e57600080fd5b614d8783614d4f565b946020939093013593505050565b80356001600160801b0381168114614d6657600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614dea57614dea614dac565b604052919050565b600082601f830112614e0357600080fd5b81356001600160401b03811115614e1c57614e1c614dac565b614e2f601f8201601f1916602001614dc2565b818152846020838601011115614e4457600080fd5b816020850160208301376000918101602001919091529392505050565b80356001600160601b0381168114614d6657600080fd5b60006001600160401b03821115614e9157614e91614dac565b5060051b60200190565b600082601f830112614eac57600080fd5b81356020614ec1614ebc83614e78565b614dc2565b82815260059290921b84018101918181019086841115614ee057600080fd5b8286015b84811015614f0257614ef581614d4f565b8352918301918301614ee4565b509695505050505050565b60008083601f840112614f1f57600080fd5b5081356001600160401b03811115614f3657600080fd5b60208301915083602060c08302850101111561168c57600080fd5b801515811461180157600080fd5b8035614d6681614f51565b60008060008060008060008060008060006101408c8e031215614f8c57600080fd5b614f958c614d95565b9a506001600160401b038060208e01351115614fb057600080fd5b614fc08e60208f01358f01614df2565b9a508060408e01351115614fd357600080fd5b614fe38e60408f01358f01614df2565b99508060608e01351115614ff657600080fd5b6150068e60608f01358f01614df2565b985061501460808e01614e61565b975061502260a08e01614d95565b96508060c08e0135111561503557600080fd5b6150458e60c08f01358f01614e9b565b955061505360e08e01614d4f565b9450806101008e0135111561506757600080fd5b506150798d6101008e01358e01614f0d565b909350915061508b6101208d01614f5f565b90509295989b509295989b9093969950565b6000806000606084860312156150b257600080fd5b6150bb84614d4f565b92506150c960208501614d4f565b9150604084013590509250925092565b600080600080600060a086880312156150f157600080fd5b85356001600160401b0381111561510757600080fd5b61511388828901614df2565b95505060208601359350604086013592506060860135915061513760808701614d4f565b90509295509295909350565b6000806040838503121561515657600080fd5b50508035926020909101359150565b6000806040838503121561517857600080fd5b8235915061518860208401614d4f565b90509250929050565b6000602082840312156151a357600080fd5b611ef682614d4f565b600080604083850312156151bf57600080fd5b6151c883614d4f565b915061518860208401614e61565b6000806000604084860312156151eb57600080fd5b83356001600160401b0381111561520157600080fd5b61520d86828701614f0d565b909790965060209590950135949350505050565b6000806040838503121561523457600080fd5b61523d83614d4f565b915060208301356001600160401b0381111561525857600080fd5b61526485828601614df2565b9150509250929050565b60006020828403121561528057600080fd5b611ef682614d95565b60008060006060848603121561529e57600080fd5b6152a784614d4f565b92506152b560208501614d4f565b915060408401356152c581614f51565b809150509250925092565b6000602082840312156152e257600080fd5b81356001600160401b038111156152f857600080fd5b820160608185031215611ef657600080fd5b60008060006060848603121561531f57600080fd5b61532884614d4f565b925060208401356152b581614f51565b6000806040838503121561534b57600080fd5b61535483614d4f565b9150602083013561536481614f51565b809150509250929050565b6000806000806080858703121561538557600080fd5b61538e85614d4f565b935061539c60208601614d4f565b92506040850135915060608501356001600160401b038111156153be57600080fd5b6153ca87828801614df2565b91505092959194509250565b6060815260006153e96060830186614ce3565b82810360208401526153fb8186614ce3565b9050828103604084015261387f8185614ce3565b60008060008060006080868803121561542757600080fd5b85356001600160401b038082111561543e57600080fd5b818801915088601f83011261545257600080fd5b81358181111561546157600080fd5b8960208260051b850101111561547657600080fd5b6020928301975095505086013592506040860135915061513760608701614d4f565b600080604083850312156154ab57600080fd5b6154b483614d4f565b915061518860208401614d4f565b600080600080608085870312156154d857600080fd5b84356001600160401b03808211156154ef57600080fd5b6154fb88838901614e9b565b955060209150818701358181111561551257600080fd5b87019050601f8101881361552557600080fd5b8035615533614ebc82614e78565b81815260059190911b8201830190838101908a83111561555257600080fd5b928401925b8284101561557057833582529284019290840190615557565b979a97995050505060408601359560600135949350505050565b600181811c9082168061559e57607f821691505b6020821081036155be57634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b0392831681529116602082015260400190565b6000602082840312156155f057600080fd5b8151611ef681614f51565b634e487b7160e01b600052601160045260246000fd5b81810381811115610b8457610b846155fb565b601f8211156116b957600081815260208120601f850160051c8101602086101561564b5750805b601f850160051c820191505b8181101561566a57828155600101615657565b505050505050565b600019600383901b1c191660019190911b1790565b81516001600160401b038111156156a0576156a0614dac565b6156b4816156ae845461558a565b84615624565b602080601f8311600181146156e357600084156156d15750858301515b6156db8582615672565b86555061566a565b600085815260208120601f198616915b82811015615712578886015182559484019460019091019084016156f3565b50858210156157305787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b80820180821115610b8457610b846155fb565b8082028115828204841417610b8457610b846155fb565b6000826157ee57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6001600160a01b038481168252831660208083019190915260606040830152825460009182916158ba8161558a565b80606087015260806001808416600081146158dc57600181146158f657615924565b60ff1985168984015283151560051b890183019650615924565b896000528560002060005b8581101561591c5781548b8201860152908301908701615901565b8a0184019750505b50949a9950505050505050505050565b6000808335601e1984360301811261594b57600080fd5b8301803591506001600160401b0382111561596557600080fd5b60200191503681900382131561168c57600080fd5b6001600160401b0383111561599157615991614dac565b6159a58361599f835461558a565b83615624565b6000601f8411600181146159d357600085156159c15750838201355b6159cb8682615672565b8455506125c6565b600083815260209020601f19861690835b82811015615a0457868501358255602094850194600190920191016159e4565b5086821015615a215760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b615a3d8283615934565b6001600160401b03811115615a5457615a54614dac565b615a6881615a62855461558a565b85615624565b6000601f821160018114615a965760008315615a845750838201355b615a8e8482615672565b865550615af0565b600085815260209020601f19841690835b82811015615ac75786850135825560209485019460019092019101615aa7565b5084821015615ae45760001960f88660031b161c19848701351681555b505060018360011b0185555b50505050615b016020830183615934565b615b0f81836001860161597a565b5050615b1e6040830183615934565b610e7481836002860161597a565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b803564ffffffffff81168114614d6657600080fd5b803563ffffffff81168114614d6657600080fd5b80356001600160701b0381168114614d6657600080fd5b6040808252818101849052600090606080840187845b88811015615c5c5764ffffffffff80615be584615b77565b168452602081615bf6828601615b77565b169085015250615c07828601615b8c565b63ffffffff8082168786015280615c1f878601615b8c565b1686860152505060806001600160701b03615c3b828501615ba0565b169084015260a0828101359084015260c09283019290910190600101615bcd565b5050809350505050826020830152949350505050565b600060c08284031215615c8457600080fd5b60405160c081018181106001600160401b0382111715615ca657615ca6614dac565b604052615cb283615b77565b8152615cc060208401615b77565b6020820152615cd160408401615b8c565b6040820152615ce260608401615b8c565b6060820152615cf360808401615ba0565b608082015260a083013560a08201528091505092915050565b600060208284031215615d1e57600080fd5b5051919050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052602160045260246000fd5b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b815260008351615dbf816017850160208801614cbf565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615df0816028840160208801614cbf565b01602801949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061387f90830184614ce3565b600060208284031215615e4157600080fd5b8151611ef681614c8c565b600081615e5b57615e5b6155fb565b506000190190565b60008251615e75818460208701614cbf565b9190910192915050565b600060018201615e9157615e916155fb565b506001019056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564fd63b67fde00b77f1f54f050135a475665b815acd10a8e7fd785ba074846734aa2646970667358221220c42d6986455398a860eaeafb6ff3f11aef4bf649aa09b6448cf7431eebea95f064736f6c63430008110033

Block Transaction Gas Used Reward
view all blocks sequenced

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

Validator Index Block Amount
View All Withdrawals

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

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