false
true
0

Contract Address Details

0xb94fA5796AEF6593CD56dE3d4b6a562ed2a20871

Contract Name
FairXYZDeployer
Creator
0x476b53–0a5314 at 0xfa99f4–9f8ea5
Balance
0 PLS ( )
Tokens
Fetching tokens...
Transactions
1 Transactions
Transfers
0 Transfers
Gas Used
0
Last Balance Update
26777424
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
This contract has been verified via Sourcify. View contract in Sourcify repository
Contract name:
FairXYZDeployer




Optimization enabled
true
Compiler version
v0.8.17+commit.8df45f5f




Optimization runs
140
EVM Version
london




Verified at
2026-06-13T16:54:18.112614Z

contracts/FairXYZDeployer.sol

// SPDX-License-Identifier: MIT

// @ Fair.xyz dev

pragma solidity 0.8.17;

import "./ERC721xyzUpgradeable.sol";
import "./FairXYZDeployerErrorsAndEvents.sol";
import "./IFairXYZWallets.sol";
import "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/cryptography/MerkleProofUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/MulticallUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";

contract FairXYZDeployer is
    ERC721xyzUpgradeable,
    AccessControlUpgradeable,
    MulticallUpgradeable,
    ReentrancyGuardUpgradeable,
    OwnableUpgradeable,
    FairXYZDeployerErrorsAndEvents
{
    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 baseURI;
    string internal pathURI;
    string internal preRevealURI;
    string internal _overrideURI;
    bool public lockURI;

    /// @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 Interface into FairXYZWallets. This provides the wallet address to which the Fair.xyz fee is sent to
    address public interfaceAddress;

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

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

    /// @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)"
        );
    bytes32 constant EIP712_URICHANGE_TYPE_HASH =
        keccak256("URIChange(address sender,string newPathURI,string newURI)");

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

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

    /**
     * @dev Intended to be called from the original implementation for the factory contract
     */
    function initialize() external initializer {
        __ERC721_init("", "");
        __AccessControl_init();
        __Multicall_init();
        __ReentrancyGuard_init();
    }

    /**
     * @dev Initialise a new Creator contract by setting variables and initialising
     * inherited contracts
     */
    function _initialize(
        uint128 maxTokens_,
        string memory name_,
        string memory symbol_,
        address interfaceAddress_,
        string[] memory URIs_,
        uint96 royaltyPercentage_,
        uint128 globalMintsPerWallet_,
        address[] memory royaltyReceivers,
        address ownerOfContract,
        StageData[] calldata stages
    ) external initializer {
        if (interfaceAddress_ == address(0)) revert ZeroAddress();
        require(URIs_.length == 3);
        require(royaltyReceivers.length == 2);
        __ERC721_init(name_, symbol_);
        __AccessControl_init();
        __Multicall_init();
        __ReentrancyGuard_init();
        __OperatorFilterer_init(
            DEFAULT_OPERATOR_FILTER_REGISTRY,
            DEFAULT_OPERATOR_FILTER_SUBSCRIPTION,
            true
        );
        _transferOwnership(ownerOfContract);
        tokensAvailable = TokensAvailableToMint(
            maxTokens_,
            globalMintsPerWallet_
        );
        interfaceAddress = interfaceAddress_;
        preRevealURI = URIs_[0];
        baseURI = URIs_[1];
        pathURI = URIs_[2];
        _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 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
        ) {
            // 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 Returns the wallet of Fair.xyz to which primary sale fee will be
     */
    function viewWithdraw() public view returns (address) {
        address returnWithdraw = IFairXYZWallets(interfaceAddress)
            .viewWithdraw();
        return (returnWithdraw);
    }

    /**
     * @dev Only owner or Fair.xyz - withdraw contract balance to owner wallet. 6% primary sale fee to Fair.xyz
     */
    function withdraw() external payable nonReentrant {
        require(
            hasRole(DEFAULT_ADMIN_ROLE, msg.sender) ||
                msg.sender == viewWithdraw(),
            "Not owner or Fair.xyz!"
        );
        uint256 contractBalance = address(this).balance;

        (bool sent, ) = viewWithdraw().call{value: (contractBalance * 3) / 50}(
            ""
        );
        if (!sent) revert ETHSendFail();

        uint256 remainingContractBalance = address(this).balance;
        (bool sent_, ) = _primarySaleReceiver.call{
            value: remainingContractBalance
        }("");
        if (!sent_) revert ETHSendFail();
    }

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

    /**
     * @dev Return the Base URI, used when there is no expected reveal experience
     */
    function _baseURI() public view returns (string memory) {
        return baseURI;
    }

    /**
     * @dev Return the path URI - used for reveal experience
     */
    function _pathURI() public view returns (string memory) {
        if (bytes(_overrideURI).length == 0) {
            return IFairXYZWallets(interfaceAddress).viewPathURI(pathURI);
        } else {
            return _overrideURI;
        }
    }

    /**
     * @dev Return the pre-reveal URI, which is used when there is a reveal experience
     * and the reveal metadata has not been set yet.
     */
    function _preRevealURI() public view returns (string memory) {
        return preRevealURI;
    }

    /**
     * @dev Combines path URI, base URI and pre-reveal URI for the full metadata journey on Fair.xyz
     */
    function tokenURI(uint256 tokenId)
        public
        view
        virtual
        override
        returns (string memory)
    {
        if (!_exists(tokenId)) revert TokenDoesNotExist();

        string memory pathURI_ = _pathURI();
        string memory baseURI_ = _baseURI();
        string memory preRevealURI_ = _preRevealURI();

        if (bytes(pathURI_).length == 0) {
            return preRevealURI_;
        } else {
            return
                string(
                    abi.encodePacked(pathURI_, baseURI_, tokenId.toString())
                );
        }
    }

    /**
     * @dev Lock the token metadata forever. This action is non reversible.
     */
    function lockURIforever() external {
        if (!hasRole(DEFAULT_ADMIN_ROLE, msg.sender)) revert UnauthorisedUser();
        if (lockURI) revert AlreadyLockedURI();
        lockURI = true;
        emit URILocked();
    }

    /**
     * @dev Hash the variables to be modified for URI changes.
     */
    function hashURIChange(
        address sender,
        string memory newPathURI,
        string memory newURI
    ) private view returns (bytes32) {
        bytes32 digest = _hashTypedDataV4(
            keccak256(
                abi.encode(
                    EIP712_URICHANGE_TYPE_HASH,
                    sender,
                    keccak256(bytes(newPathURI)),
                    keccak256(bytes(newURI))
                )
            )
        );
        return digest;
    }

    /**
     * @dev Change values for the URIs. New Path URI implies a new reveal date being used.
     * newURI acts as an override for all priorly defined URIs). If lockURI() has been
     * executed, then this function will fail, as the data will have been locked forever.
     */
    function changeURI(
        bytes memory signature,
        string memory newPathURI,
        string memory newURI
    ) external {
        if (!hasRole(SECOND_ADMIN_ROLE, msg.sender)) revert UnauthorisedUser();

        // URI cannot be modified if it has been locked
        if (lockURI) revert AlreadyLockedURI();

        bytes32 messageHash = hashURIChange(msg.sender, newPathURI, newURI);

        if (messageHash.recover(signature) != FairxyzSignerAddress)
            revert UnrecognizableHash();

        if (bytes(newPathURI).length != 0) {
            pathURI = newPathURI;
            emit NewPathURI(pathURI);
        }
        if (bytes(newURI).length != 0) {
            _overrideURI = newURI;
            baseURI = "";
            emit NewTokenURI(_overrideURI);
        }
    }

    /*///////////////////////////////////////////////////////////////
                            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 Ensure number of minted tokens never goes above the total contract minting limit
     */
    modifier saleIsOpen() {
        if (!(_mintedTokens < tokensAvailable.maxTokens)) revert SaleEnd();
        _;
    }

    /**
     * @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 {
        // 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];

        // 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();
        }

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

        // At least 1 and no more than 20 tokens can be minted per transaction
        if (!((0 < numberOfTokens) && (numberOfTokens <= 20)))
            revert TokenLimitPerTx();

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

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

        // If the value for numberOfTokens is less than the origMintCount, then there is reimbursement
        // to be done
        if (adjustedNumberOfTokens < numberOfTokens) {
            uint256 reimbursementPrice = (numberOfTokens -
                adjustedNumberOfTokens) * dropData.price;
            (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 saleIsOpen {
        // 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];

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

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

        // At least 1 and no more than 20 tokens can be minted per transaction
        if (!((0 < numberOfTokens) && (numberOfTokens <= 20)))
            revert TokenLimitPerTx();

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

        // Mint NFTs
        _safeMint(recipient, adjustedNumberOfTokens, block.number);

        // If the value for numberOfTokens is less than the origMintCount, then there is reimbursement
        // to be done
        if (adjustedNumberOfTokens < numberOfTokens) {
            uint256 reimbursementPrice = (numberOfTokens -
                adjustedNumberOfTokens) * dropData.price;
            (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 tokenCount)
        external
        returns (uint256)
    {
        if (tokenCount > 20) revert TokenLimitPerTx();

        if (tokenCount == 0) revert TokenLimitPerTx();

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

        if (address_.length == 0) revert AddressLimitPerTx();

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

        uint256 newTotal = _mintedTokens + address_.length * tokenCount;
        unchecked {
            if (newTotal > tokensAvailable.maxTokens)
                revert ExceedsNFTsOnSale();

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

            emit Airdrop(tokenCount, newTotal, address_);
            return newTotal;
        }
    }

    /*///////////////////////////////////////////////////////////////
                            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);
    }

    /**
     * @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;
}
        

/ECDSAUpgradeable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.3) (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
    }

    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");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' 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 (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

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

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

/OperatorFiltererUpgradeable.sol

// SPDX-License-Identifier: MIT

// @author: Fair.xyz dev

pragma solidity 0.8.17;

import {IOperatorFilterRegistry} from "./OperatorFilterRegistry/IOperatorFilterRegistry.sol";
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/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;
}
          

/Initializable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

import "../../utils/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. Equivalent to `reinitializer(1)`.
     */
    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.
     *
     * `initializer` is equivalent to `reinitializer(1)`, so 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.
     *
     * 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.
     */
    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.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized < type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }
}
          

/ERC2981Upgradeable.sol

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

pragma solidity ^0.8.0;

import "../../interfaces/IERC2981Upgradeable.sol";
import "../../utils/introspection/ERC165Upgradeable.sol";
import "../../proxy/utils/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;
}
          

/StringsUpgradeable.sol

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

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library StringsUpgradeable {
    bytes16 private constant _HEX_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) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @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] = _HEX_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);
    }
}
          

/MulticallUpgradeable.sol

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

pragma solidity ^0.8.0;

import "./AddressUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

/**
 * @dev Provides a function to batch together multiple calls in a single external call.
 *
 * _Available since v4.1._
 */
abstract contract MulticallUpgradeable is Initializable {
    function __Multicall_init() internal onlyInitializing {
    }

    function __Multicall_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev Receives and executes a batch of function calls on this contract.
     */
    function multicall(bytes[] calldata data) external virtual returns (bytes[] memory results) {
        results = new bytes[](data.length);
        for (uint256 i = 0; i < data.length; i++) {
            results[i] = _functionDelegateCall(address(this), data[i]);
        }
        return results;
    }

    /**
     * @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;
}
          

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

/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 NewMaxMintsPerWalletSet(uint128 newGlobalMintsPerWallet);
    event NewPathURI(string newPathURI);
    event NewPrimarySaleReceiver(address newPrimaryReceiver);
    event NewSecondaryRoyalties(
        address newSecondaryReceiver,
        uint96 newRoyalty
    );
    event NewTokenURI(string newTokenURI);
    event Mint(address minterAddress, uint256 stage, uint256 mintCount);
    event URILocked();

    /// @dev Errors
    error AddressLimitPerTx();
    error AlreadyLockedURI();
    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();

}
          

/ERC165Upgradeable.sol

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

pragma solidity ^0.8.0;

import "./IERC165Upgradeable.sol";
import "../../proxy/utils/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;
}
          

/AddressUpgradeable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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 functionCall(target, data, "Address: low-level call failed");
    }

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

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

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

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

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

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

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

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

/extensions/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);
}
          

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

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

/IERC2981Upgradeable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

import "../utils/introspection/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);
}
          

/ContextUpgradeable.sol

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

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

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

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

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

    /**
     * @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;
}
          

/IERC721Upgradeable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * 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);
}
          

/ERC721xyzUpgradeable.sol

// SPDX-License-Identifier: MIT

// @ Fair.xyz dev

pragma solidity 0.8.17;

import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721MetadataUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/common/ERC2981Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/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 private _name;

    // Token symbol
    string private _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;

    /**
     * @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 virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero.
     * - `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[44] private __gap;
}
          

/OwnableUpgradeable.sol

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

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

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

/ReentrancyGuardUpgradeable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/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() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

/MerkleProofUpgradeable.sol

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

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 *
 * 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.
 */
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 proved to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * _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}
     *
     * _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 the sibling nodes in `proof`,
     * consuming from one or the other at each step according to the instructions given by
     * `proofFlags`.
     *
     * _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}
     *
     * _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)
        }
    }
}
          

/AccessControlUpgradeable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControlUpgradeable.sol";
import "../utils/ContextUpgradeable.sol";
import "../utils/StringsUpgradeable.sol";
import "../utils/introspection/ERC165Upgradeable.sol";
import "../proxy/utils/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(uint160(account), 20),
                        " 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;
}
          

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

Compiler Settings

{"remappings":[],"optimizer":{"runs":140,"enabled":true},"metadata":{"bytecodeHash":"ipfs"},"libraries":{},"evmVersion":"london","compilationTarget":{"contracts/FairXYZDeployer.sol":"FairXYZDeployer"}}
              

Contract ABI

[{"type":"error","name":"AddressLimitPerTx","inputs":[]},{"type":"error","name":"AlreadyLockedURI","inputs":[]},{"type":"error","name":"BurnerIsNotApproved","inputs":[]},{"type":"error","name":"BurningOff","inputs":[]},{"type":"error","name":"CannotDeleteOngoingStage","inputs":[]},{"type":"error","name":"CannotEditPastStages","inputs":[]},{"type":"error","name":"ETHSendFail","inputs":[]},{"type":"error","name":"EndTimeInThePast","inputs":[]},{"type":"error","name":"EndTimeLessThanStartTime","inputs":[]},{"type":"error","name":"ExceedsMintsPerWallet","inputs":[]},{"type":"error","name":"ExceedsNFTsOnSale","inputs":[]},{"type":"error","name":"IncorrectIndex","inputs":[]},{"type":"error","name":"InvalidNonce","inputs":[]},{"type":"error","name":"InvalidStartTime","inputs":[]},{"type":"error","name":"LessNFTsOnSaleThanBefore","inputs":[]},{"type":"error","name":"MerkleProofFail","inputs":[]},{"type":"error","name":"MerkleStage","inputs":[]},{"type":"error","name":"NotEnoughETH","inputs":[]},{"type":"error","name":"OnlyAdmin","inputs":[]},{"type":"error","name":"OperatorNotAllowed","inputs":[{"type":"address","name":"operator","internalType":"address"}]},{"type":"error","name":"PhaseLimitEnd","inputs":[]},{"type":"error","name":"PhaseLimitExceedsTokenCount","inputs":[]},{"type":"error","name":"PhaseStartsBeforePriorPhaseEnd","inputs":[]},{"type":"error","name":"PublicStage","inputs":[]},{"type":"error","name":"RegistryInvalid","inputs":[]},{"type":"error","name":"ReusedHash","inputs":[]},{"type":"error","name":"SaleEnd","inputs":[]},{"type":"error","name":"SaleNotActive","inputs":[]},{"type":"error","name":"StageDoesNotExist","inputs":[]},{"type":"error","name":"StageLimitPerTx","inputs":[]},{"type":"error","name":"StartTimeInThePast","inputs":[]},{"type":"error","name":"TimeLimit","inputs":[]},{"type":"error","name":"TokenCountExceedsPhaseLimit","inputs":[]},{"type":"error","name":"TokenDoesNotExist","inputs":[]},{"type":"error","name":"TokenLimitPerTx","inputs":[]},{"type":"error","name":"TooManyStagesInTheFuture","inputs":[]},{"type":"error","name":"UnauthorisedUser","inputs":[]},{"type":"error","name":"UnrecognizableHash","inputs":[]},{"type":"error","name":"ZeroAddress","inputs":[]},{"type":"event","name":"Airdrop","inputs":[{"type":"uint256","name":"tokenCount","internalType":"uint256","indexed":false},{"type":"uint256","name":"newTotal","internalType":"uint256","indexed":false},{"type":"address[]","name":"recipients","internalType":"address[]","indexed":false}],"anonymous":false},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"approved","internalType":"address","indexed":true},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"event","name":"ApprovalForAll","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"operator","internalType":"address","indexed":true},{"type":"bool","name":"approved","internalType":"bool","indexed":false}],"anonymous":false},{"type":"event","name":"BurnableSet","inputs":[{"type":"bool","name":"burnState","internalType":"bool","indexed":false}],"anonymous":false},{"type":"event","name":"Initialized","inputs":[{"type":"uint8","name":"version","internalType":"uint8","indexed":false}],"anonymous":false},{"type":"event","name":"Mint","inputs":[{"type":"address","name":"minterAddress","internalType":"address","indexed":false},{"type":"uint256","name":"stage","internalType":"uint256","indexed":false},{"type":"uint256","name":"mintCount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"NewMaxMintsPerWalletSet","inputs":[{"type":"uint128","name":"newGlobalMintsPerWallet","internalType":"uint128","indexed":false}],"anonymous":false},{"type":"event","name":"NewPathURI","inputs":[{"type":"string","name":"newPathURI","internalType":"string","indexed":false}],"anonymous":false},{"type":"event","name":"NewPrimarySaleReceiver","inputs":[{"type":"address","name":"newPrimaryReceiver","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"NewSecondaryRoyalties","inputs":[{"type":"address","name":"newSecondaryReceiver","internalType":"address","indexed":false},{"type":"uint96","name":"newRoyalty","internalType":"uint96","indexed":false}],"anonymous":false},{"type":"event","name":"NewStagesSet","inputs":[{"type":"tuple[]","name":"stages","internalType":"struct FairXYZDeployer.StageData[]","indexed":false,"components":[{"type":"uint40","name":"startTime","internalType":"uint40"},{"type":"uint40","name":"endTime","internalType":"uint40"},{"type":"uint32","name":"mintsPerWallet","internalType":"uint32"},{"type":"uint32","name":"phaseLimit","internalType":"uint32"},{"type":"uint112","name":"price","internalType":"uint112"},{"type":"bytes32","name":"merkleRoot","internalType":"bytes32"}]},{"type":"uint256","name":"startIndex","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"NewTokenURI","inputs":[{"type":"string","name":"newTokenURI","internalType":"string","indexed":false}],"anonymous":false},{"type":"event","name":"OperatorFilterDisabled","inputs":[{"type":"bool","name":"disabled","internalType":"bool","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RoleAdminChanged","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"bytes32","name":"previousAdminRole","internalType":"bytes32","indexed":true},{"type":"bytes32","name":"newAdminRole","internalType":"bytes32","indexed":true}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"sender","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"sender","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"SignatureReleased","inputs":[],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"event","name":"URILocked","inputs":[],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"DEFAULT_ADMIN_ROLE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"MINTER_ROLE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"SECOND_ADMIN_ROLE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"_baseURI","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"_initialize","inputs":[{"type":"uint128","name":"maxTokens_","internalType":"uint128"},{"type":"string","name":"name_","internalType":"string"},{"type":"string","name":"symbol_","internalType":"string"},{"type":"address","name":"interfaceAddress_","internalType":"address"},{"type":"string[]","name":"URIs_","internalType":"string[]"},{"type":"uint96","name":"royaltyPercentage_","internalType":"uint96"},{"type":"uint128","name":"globalMintsPerWallet_","internalType":"uint128"},{"type":"address[]","name":"royaltyReceivers","internalType":"address[]"},{"type":"address","name":"ownerOfContract","internalType":"address"},{"type":"tuple[]","name":"stages","internalType":"struct FairXYZDeployer.StageData[]","components":[{"type":"uint40","name":"startTime","internalType":"uint40"},{"type":"uint40","name":"endTime","internalType":"uint40"},{"type":"uint32","name":"mintsPerWallet","internalType":"uint32"},{"type":"uint32","name":"phaseLimit","internalType":"uint32"},{"type":"uint112","name":"price","internalType":"uint112"},{"type":"bytes32","name":"merkleRoot","internalType":"bytes32"}]}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"_mintedTokens","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"_pathURI","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"_preRevealURI","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"airdrop","inputs":[{"type":"address[]","name":"address_","internalType":"address[]"},{"type":"uint256","name":"tokenCount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"approve","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"owner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"burn","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"burnable","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changePrimarySaleReceiver","inputs":[{"type":"address","name":"newPrimarySaleReceiver","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changeSecondaryRoyaltyReceiver","inputs":[{"type":"address","name":"newSecondaryRoyaltyReceiver","internalType":"address"},{"type":"uint96","name":"newRoyaltyValue","internalType":"uint96"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changeURI","inputs":[{"type":"bytes","name":"signature","internalType":"bytes"},{"type":"string","name":"newPathURI","internalType":"string"},{"type":"string","name":"newURI","internalType":"string"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getApproved","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"getRoleAdmin","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"grantRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"hasRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"interfaceAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isApprovedForAll","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"address","name":"operator","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"lockURI","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"lockURIforever","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"merkleMint","inputs":[{"type":"bytes32[]","name":"_merkleProof","internalType":"bytes32[]"},{"type":"uint256","name":"numberOfTokens","internalType":"uint256"},{"type":"uint256","name":"maxMintsPerWallet","internalType":"uint256"},{"type":"address","name":"recipient","internalType":"address"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"mint","inputs":[{"type":"bytes","name":"signature","internalType":"bytes"},{"type":"uint256","name":"nonce","internalType":"uint256"},{"type":"uint256","name":"numberOfTokens","internalType":"uint256"},{"type":"uint256","name":"maxMintsPerWallet","internalType":"uint256"},{"type":"address","name":"recipient","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bytes[]","name":"results","internalType":"bytes[]"}],"name":"multicall","inputs":[{"type":"bytes[]","name":"data","internalType":"bytes[]"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"operatorFilterDisabled","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IOperatorFilterRegistry"}],"name":"operatorFilterRegistry","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"ownerOf","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"releaseSignature","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"revokeRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"},{"type":"uint256","name":"","internalType":"uint256"}],"name":"royaltyInfo","inputs":[{"type":"uint256","name":"_tokenId","internalType":"uint256"},{"type":"uint256","name":"_salePrice","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"safeTransferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"safeTransferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"bytes","name":"_data","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setApprovalForAll","inputs":[{"type":"address","name":"operator","internalType":"address"},{"type":"bool","name":"approved","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setGlobalMaxMints","inputs":[{"type":"uint128","name":"newGlobalMaxMintsPerWallet","internalType":"uint128"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setStages","inputs":[{"type":"tuple[]","name":"stages","internalType":"struct FairXYZDeployer.StageData[]","components":[{"type":"uint40","name":"startTime","internalType":"uint40"},{"type":"uint40","name":"endTime","internalType":"uint40"},{"type":"uint32","name":"mintsPerWallet","internalType":"uint32"},{"type":"uint32","name":"phaseLimit","internalType":"uint32"},{"type":"uint112","name":"price","internalType":"uint112"},{"type":"bytes32","name":"merkleRoot","internalType":"bytes32"}]},{"type":"uint256","name":"startId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"signatureReleased","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"stageMints","inputs":[{"type":"uint256","name":"","internalType":"uint256"},{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"supportsInterface","inputs":[{"type":"bytes4","name":"interfaceId","internalType":"bytes4"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"toggleBurnable","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"toggleOperatorFilterDisabled","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"tokenURI","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint128","name":"maxTokens","internalType":"uint128"},{"type":"uint128","name":"globalMintsPerWallet","internalType":"uint128"}],"name":"tokensAvailable","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalStages","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalWalletMints","inputs":[{"type":"address","name":"minterAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateOperatorFilterRegistry","inputs":[{"type":"address","name":"newRegistry","internalType":"address"},{"type":"address","name":"subscriptionOrRegistrantToCopy","internalType":"address"},{"type":"bool","name":"subscribe","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateRegistrySubscription","inputs":[{"type":"address","name":"subscriptionOrRegistrantToCopy","internalType":"address"},{"type":"bool","name":"subscribe","internalType":"bool"},{"type":"bool","name":"copyEntries","internalType":"bool"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"viewCurrentStage","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"viewLatestStage","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"viewMinted","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple","name":"","internalType":"struct FairXYZDeployer.StageData","components":[{"type":"uint40","name":"startTime","internalType":"uint40"},{"type":"uint40","name":"endTime","internalType":"uint40"},{"type":"uint32","name":"mintsPerWallet","internalType":"uint32"},{"type":"uint32","name":"phaseLimit","internalType":"uint32"},{"type":"uint112","name":"price","internalType":"uint112"},{"type":"bytes32","name":"merkleRoot","internalType":"bytes32"}]}],"name":"viewStageMap","inputs":[{"type":"uint256","name":"stageId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"viewWithdraw","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"withdraw","inputs":[]}]
              

Contract Creation Code

0x608060405234801561001057600080fd5b50615fda80620000216000396000f3fe6080604052600436106103435760003560e01c8063869d3bde116101b2578063b3cc59db116100ed578063d547741f11610090578063d547741f14610a5b578063d7818e2814610a7b578063dedd76e714610a9b578063e985e9c514610b27578063effcf2b714610b47578063f2fde38b14610b5c578063f53ddc3b14610b7c578063f86a352914610b9c57600080fd5b8063b3cc59db14610970578063b88d4fde14610985578063bdc769eb146109a5578063c0dad79b146109b8578063c204642c146109d2578063c87b56dd146109f2578063ce4c61aa14610a12578063d539139314610a2757600080fd5b806395d89b411161015557806395d89b411461087557806397f5cdcf1461088a578063a07c7ce4146108a0578063a217fddf146108c2578063a22cb465146108d7578063aa8a6754146108f7578063ac9650d81461091e578063b0ccc31e1461094b57600080fd5b8063869d3bde146107525780638c8ea8e6146107675780638cd90c32146107ad5780638da5cb5b146107e65780638e021c061461080557806390411aca1461082057806391d148541461083557806394b08a4b1461085557600080fd5b806342842e0e11610282578063659b8b2a11610225578063659b8b2a1461068957806370a08231146106a9578063715018a6146106c957806372c06f5a146106de578063743976a0146106f35780637f1fea591461070857806380420736146107285780638129fc1c1461073d57600080fd5b806342842e0e1461056857806342966c68146105885780634e0b9df2146105a857806351e85af6146105c8578063548e7682146105dd578063577199fd146105fd57806360659a921461061d5780636352211e1461066957600080fd5b8063248a9ca3116102ea578063248a9ca31461045b5780632955a21d1461048c5780632a55205a1461049f5780632f2ff15d146104de5780633540558a146104fe57806336568abe146105205780633ccfd60b146105405780633f52af3c1461054857600080fd5b806301ffc9a7146103485780630293741b1461037d57806304b8adb41461039f57806306fdde03146103c1578063081812fc146103d6578063095ea7b3146103f657806318160ddd1461041857806323b872dd1461043b575b600080fd5b34801561035457600080fd5b50610368610363366004614db9565b610bb3565b60405190151581526020015b60405180910390f35b34801561038957600080fd5b50610392610bc4565b6040516103749190614e26565b3480156103ab57600080fd5b506103b4610c57565b6040516103749190614e39565b3480156103cd57600080fd5b50610392610cd2565b3480156103e257600080fd5b506103b46103f1366004614e4d565b610ce1565b34801561040257600080fd5b50610416610411366004614e8b565b610d6e565b005b34801561042457600080fd5b5061042d610f3f565b604051908152602001610374565b34801561044757600080fd5b50610416610456366004614eb7565b610f56565b34801561046757600080fd5b5061042d610476366004614e4d565b6000908152610100602052604090206001015490565b61041661049a366004614fbb565b61108d565b3480156104ab57600080fd5b506104bf6104ba366004615029565b6113d4565b604080516001600160a01b039093168352602083019190915201610374565b3480156104ea57600080fd5b506104166104f936600461504b565b611482565b34801561050a57600080fd5b5061042d600080516020615f8583398151915281565b34801561052c57600080fd5b5061041661053b36600461504b565b6114ad565b61041661152b565b34801561055457600080fd5b50610416610563366004615092565b61170a565b34801561057457600080fd5b50610416610583366004614eb7565b61178a565b34801561059457600080fd5b5061042d6105a3366004614e4d565b611890565b3480156105b457600080fd5b506104166105c336600461510b565b611938565b3480156105d457600080fd5b50610416611978565b3480156105e957600080fd5b506104166105f836600461516d565b6119fe565b34801561060957600080fd5b50610416610618366004615196565b611a89565b34801561062957600080fd5b506101c854610649906001600160801b0380821691600160801b90041682565b604080516001600160801b03938416815292909116602083015201610374565b34801561067557600080fd5b506103b4610684366004614e4d565b611b84565b34801561069557600080fd5b506101cd5461036890610100900460ff1681565b3480156106b557600080fd5b5061042d6106c43660046151e1565b611c44565b3480156106d557600080fd5b50610416611cd4565b3480156106ea57600080fd5b50610368611ce8565b3480156106ff57600080fd5b50610392611d5c565b34801561071457600080fd5b506104166107233660046151e1565b611d6c565b34801561073457600080fd5b50610416611e08565b34801561074957600080fd5b50610416611e81565b34801561075e57600080fd5b5061042d611f7f565b34801561077357600080fd5b5061042d6107823660046151e1565b6001600160a01b0316600090815260d36020526040902054600160601b90046001600160601b031690565b3480156107b957600080fd5b5061042d6107c836600461504b565b6101d060209081526000928352604080842090915290825290205481565b3480156107f257600080fd5b50610196546001600160a01b03166103b4565b34801561081157600080fd5b506101cd546103689060ff1681565b34801561082c57600080fd5b5060cc5461042d565b34801561084157600080fd5b5061036861085036600461504b565b611ffd565b34801561086157600080fd5b506104166108703660046151fe565b612029565b34801561088157600080fd5b50610392612101565b34801561089657600080fd5b5061042d60cc5481565b3480156108ac57600080fd5b506101cd5461036890600160b01b900460ff1681565b3480156108ce57600080fd5b5061042d600081565b3480156108e357600080fd5b506104166108f236600461522e565b612110565b34801561090357600080fd5b506101cd546103b4906201000090046001600160a01b031681565b34801561092a57600080fd5b5061093e6109393660046152a0565b6121db565b60405161037491906152e1565b34801561095757600080fd5b506097546103b49061010090046001600160a01b031681565b34801561097c57600080fd5b506104166122cf565b34801561099157600080fd5b506104166109a0366004615343565b61236b565b6104166109b33660046153ae565b6124ab565b3480156109c457600080fd5b506097546103689060ff1681565b3480156109de57600080fd5b5061042d6109ed36600461549c565b612660565b3480156109fe57600080fd5b50610392610a0d366004614e4d565b61281c565b348015610a1e57600080fd5b5061042d6128af565b348015610a3357600080fd5b5061042d7ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc981565b348015610a6757600080fd5b50610416610a7636600461504b565b612904565b348015610a8757600080fd5b50610416610a963660046154e0565b61292a565b348015610aa757600080fd5b50610abb610ab6366004614e4d565b612a9a565b6040516103749190600060c08201905064ffffffffff80845116835280602085015116602084015250604083015163ffffffff808216604085015280606086015116606085015250506001600160701b03608084015116608083015260a083015160a083015292915050565b348015610b3357600080fd5b50610368610b42366004615567565b612b6e565b348015610b5357600080fd5b50610392612b9c565b348015610b6857600080fd5b50610416610b773660046151e1565b612c40565b348015610b8857600080fd5b50610416610b97366004615614565b612cb6565b348015610ba857600080fd5b5061042d6101d15481565b6000610bbe82612f90565b92915050565b60606101cb8054610bd49061574a565b80601f0160208091040260200160405190810160405280929190818152602001828054610c009061574a565b8015610c4d5780601f10610c2257610100808354040283529160200191610c4d565b820191906000526020600020905b815481529060010190602001808311610c3057829003601f168201915b5050505050905090565b6000806101cd60029054906101000a90046001600160a01b03166001600160a01b03166304b8adb46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bbe9190615784565b606060ca8054610bd49061574a565b6000610cec82612fb5565b610d525760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b50600090815260d160205260409020546001600160a01b031690565b609754829060ff16158015610d93575060975461010090046001600160a01b03163b15155b15610e2e57609754604051633185c44d60e21b81526101009091046001600160a01b03169063c617113490610dce90309085906004016157a1565b602060405180830381865afa158015610deb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0f91906157bb565b610e2e5780604051633b79c77360e21b8152600401610d499190614e39565b6000610e3983611b84565b9050806001600160a01b0316846001600160a01b031603610ea65760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610d49565b336001600160a01b0382161480610ec25750610ec28133612b6e565b610f2f5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b6064820152608401610d49565b610f398484612fe8565b50505050565b600060cd5460cc54610f5191906157ee565b905090565b609754839060ff16158015610f7b575060975461010090046001600160a01b03163b15155b1561105d57336001600160a01b03821603610fc757610f9b335b8361307a565b610fb75760405162461bcd60e51b8152600401610d4990615801565b610fc2848484613144565b610f39565b609754604051633185c44d60e21b81526101009091046001600160a01b03169063c617113490610ffd90309033906004016157a1565b602060405180830381865afa15801561101a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061103e91906157bb565b61105d5733604051633b79c77360e21b8152600401610d499190614e39565b61106633610f95565b6110825760405162461bcd60e51b8152600401610d4990615801565b610f39848484613144565b6000611097611f7f565b60008181526101cf60209081526040808320815160c081018352815464ffffffffff8082168352600160281b82041694820194909452600160501b840463ffffffff90811693820193909352600160701b84049092166060830152600160901b9092046001600160701b0316608082015260019091015460a082015291925086900361113657604051633ab3447f60e11b815260040160405180910390fd5b60cc54606082015163ffffffff1681106111625760405162491a1760e81b815260040160405180910390fd5b60a08201511561118557604051630268975d60e51b815260040160405180910390fd5b6101cd54610100900460ff166112605760006111a385888a896132cd565b9050737a6f5866f97034bb7153829bdaac1ffcb8facb716111c4828b61334f565b6001600160a01b0316146111eb576040516332c3ce2560e11b815260040160405180910390fd5b6001600160a01b038516600090815260d36020526040902054600160c01b90046001600160401b031688116112335760405163dc5a682560e01b815260040160405180910390fd5b61123e886028615852565b43111561125e57604051639e8c142f60e01b815260040160405180910390fd5b505b8582608001516001600160701b03166112799190615865565b341461129857604051632c1d501360e11b815260040160405180910390fd5b8560001080156112a9575060148611155b6112c6576040516332b4cb2160e21b815260040160405180910390fd5b60006112d685858985878b613373565b90506112e385828a613508565b8681101561137f5760808301516000906001600160701b0316611306838a6157ee565b6113109190615865565b604051909150600090339083908381818185875af1925050503d8060008114611355576040519150601f19603f3d011682016040523d82523d6000602084013e61135a565b606091505b505090508061137c57604051635579a42f60e11b815260040160405180910390fd5b50505b604080516001600160a01b0387168152602081018690529081018290527f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f9060600160405180910390a1505050505050505050565b60008281526066602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916114495750604080518082019091526065546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090611468906001600160601b031687615865565b6114729190615892565b91519350909150505b9250929050565b6000828152610100602052604090206001015461149e81613523565b6114a8838361352d565b505050565b6001600160a01b038116331461151d5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610d49565b61152782826135b4565b5050565b6002610164540361157e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610d49565b60026101645561158f600033611ffd565b806115b2575061159d610c57565b6001600160a01b0316336001600160a01b0316145b6115f75760405162461bcd60e51b81526020600482015260166024820152754e6f74206f776e6572206f7220466169722e78797a2160501b6044820152606401610d49565b476000611602610c57565b6001600160a01b03166032611618846003615865565b6116229190615892565b604051600081818185875af1925050503d806000811461165e576040519150601f19603f3d011682016040523d82523d6000602084013e611663565b606091505b505090508061168557604051635579a42f60e11b815260040160405180910390fd5b6101ce5460405147916000916001600160a01b039091169083908381818185875af1925050503d80600081146116d7576040519150601f19603f3d011682016040523d82523d6000602084013e6116dc565b606091505b50509050806116fe57604051635579a42f60e11b815260040160405180910390fd5b50506001610164555050565b611715600033611ffd565b61173257604051634e8df0bf60e01b815260040160405180910390fd5b61173c828261361c565b604080516001600160a01b03841681526001600160601b03831660208201527fef5955f7902e6696c028804c62be1c24a0f98d9d30de5c31c83fa7f8b5c15c6f910160405180910390a15050565b609754839060ff161580156117af575060975461010090046001600160a01b03163b15155b1561187557336001600160a01b038216036117df57610fc28484846040518060200160405280600081525061236b565b609754604051633185c44d60e21b81526101009091046001600160a01b03169063c61711349061181590309033906004016157a1565b602060405180830381865afa158015611832573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061185691906157bb565b6118755733604051633b79c77360e21b8152600401610d499190614e39565b610f398484846040518060200160405280600081525061236b565b6101cd54600090600160b01b900460ff166118be5760405163c7c39e4f60e01b815260040160405180910390fd5b6118d06118ca83611b84565b33612b6e565b806118f457506118df82611b84565b6001600160a01b0316336001600160a01b0316145b8061190f57503361190483610ce1565b6001600160a01b0316145b61192b5760405162ccfedb60e31b815260040160405180910390fd5b61193482613719565b5090565b611950600080516020615f8583398151915233611ffd565b61196d57604051634e8df0bf60e01b815260040160405180910390fd5b610f39838383613822565b611983600033611ffd565b6119a057604051634e8df0bf60e01b815260040160405180910390fd5b6101cd5460ff16156119c55760405163ddff29e960e01b815260040160405180910390fd5b6101cd805460ff191660011790556040517f31d1c0a3af6e15844ff9c1bf6201a5cf123137eb2fb3eeb96861a436d49cd25f90600090a1565b611a16600080516020615f8583398151915233611ffd565b611a3357604051634e8df0bf60e01b815260040160405180910390fd5b6101c880546001600160801b03908116600160801b918416918202179091556040519081527f8c8298dd23c82a4aa45d27f480c6ce0aa2588e13df0b2fe2c827ca4a6836a5f8906020015b60405180910390a150565b611a9233613ca3565b611aaf57604051634755657960e01b815260040160405180910390fd5b826001600160a01b0381163b600003611adb57604051630458607f60e41b815260040160405180910390fd5b60405163c3c5a54760e01b81526001600160a01b0382169063c3c5a54790611b07903090600401614e39565b6020604051808303816000875af1158015611b26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b4a91906157bb565b611b5957611b59818484613caf565b609780546001600160a01b0390921661010002610100600160a81b0319909216919091179055505050565b6000611b8f82612fb5565b611bec5760405162461bcd60e51b815260206004820152602860248201527f45524337323178797a3a20517565727920666f72206e6f6e206578697374656e6044820152677420746f6b656e2160c01b6064820152608401610d49565b600082815260ce602052604090205482906001600160a01b031680611c3d575b50600081815260cf60205260409020546001600160a01b03168015611c32579392505050565b816001019150611c0c565b9392505050565b60006001600160a01b038216611caf5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610d49565b506001600160a01b0316600090815260d360205260409020546001600160601b031690565b611cdc613e59565b611ce66000613eb4565b565b6000611cf333613ca3565b611d1057604051634755657960e01b815260040160405180910390fd5b6097805460ff81161560ff1990911681179091556040518181527fd8c469bcb7a4be6d69103a5fdb65991249a95423350dc583495ccf5e7c28a88d9060200160405180910390a1905090565b60606101c98054610bd49061574a565b611d77600033611ffd565b611d9457604051634e8df0bf60e01b815260040160405180910390fd5b6001600160a01b038116611dbb5760405163d92e233d60e01b815260040160405180910390fd5b6101ce80546001600160a01b0319166001600160a01b0383169081179091556040517fd45e158b56e768c1167267f8516bcf96348071775faded3c9216b60855d873de91611a7e91614e39565b611e13600033611ffd565b611e3057604051634e8df0bf60e01b815260040160405180910390fd5b6101cd54610100900460ff1615611e4657600080fd5b6101cd805461ff0019166101001790556040517ffbbcc58867e8fad1d9f72f1b991660f5ec5e4e068374aa442b8604eef182b63990600090a1565b600054610100900460ff1615808015611ea15750600054600160ff909116105b80611ebb5750303b158015611ebb575060005460ff166001145b611ed75760405162461bcd60e51b8152600401610d49906158a6565b6000805460ff191660011790558015611efa576000805461ff0019166101001790555b611f226040518060200160405280600081525060405180602001604052806000815250613f07565b611f2a613f38565b611f32613f38565b611f3a613f5f565b8015611f7c576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001611a7e565b50565b6101d1546000905b8015611fe3576000190160008181526101cf602052604090205464ffffffffff164210801590611fd4575060008181526101cf6020526040902054600160281b900464ffffffffff164211155b15611fde57919050565b611f87565b5060405163b7b2409760e01b815260040160405180910390fd5b6000918252610100602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61203233613ca3565b61204f57604051634755657960e01b815260040160405180910390fd5b60975461010090046001600160a01b0316803b60000361208257604051630458607f60e41b815260040160405180910390fd5b6001600160a01b0384166120f65760405163034a0dc160e41b815230600482015282151560248201526001600160a01b038216906334a0dc1090604401600060405180830381600087803b1580156120d957600080fd5b505af11580156120ed573d6000803e3d6000fd5b50505050610f39565b610f39818585613caf565b606060cb8054610bd49061574a565b609754829060ff16158015612135575060975461010090046001600160a01b03163b15155b156121d057609754604051633185c44d60e21b81526101009091046001600160a01b03169063c61711349061217090309085906004016157a1565b602060405180830381865afa15801561218d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121b191906157bb565b6121d05780604051633b79c77360e21b8152600401610d499190614e39565b6114a8338484613f8e565b6060816001600160401b038111156121f5576121f5614ef8565b60405190808252806020026020018201604052801561222857816020015b60608152602001906001900390816122135790505b50905060005b828110156122c8576122983085858481811061224c5761224c6158f4565b905060200281019061225e919061590a565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061405c92505050565b8282815181106122aa576122aa6158f4565b602002602001018190525080806122c090615950565b91505061222e565b5092915050565b6122e7600080516020615f8583398151915233611ffd565b61230457604051634e8df0bf60e01b815260040160405180910390fd5b6101cd805460ff600160b01b808304821615810260ff60b01b1990931692909217928390556040517f6ae3331a8bd1998bb8fd9d3d02b720f4862fb43e7586d302ba44e3923cea922d936123619390049091161515815260200190565b60405180910390a1565b609754849060ff16158015612390575060975461010090046001600160a01b03163b15155b1561247357336001600160a01b038216036123dd576123b0335b8461307a565b6123cc5760405162461bcd60e51b8152600401610d4990615801565b6123d885858585614150565b6124a4565b609754604051633185c44d60e21b81526101009091046001600160a01b03169063c61711349061241390309033906004016157a1565b602060405180830381865afa158015612430573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061245491906157bb565b6124735733604051633b79c77360e21b8152600401610d499190614e39565b61247c336123aa565b6124985760405162461bcd60e51b8152600401610d4990615801565b6124a485858585614150565b5050505050565b6101c85460cc546001600160801b03909116116124db5760405163edf7f6fb60e01b815260040160405180910390fd5b60006124e5611f7f565b60008181526101cf6020908152604091829020825160c081018452815464ffffffffff8082168352600160281b82041693820193909352600160501b830463ffffffff90811694820194909452600160701b83049093166060840152600160901b9091046001600160701b031660808301526001015460a082018190529192509061258357604051637904b60360e11b815260040160405180910390fd5b60cc54606082015163ffffffff1681106125af5760405162491a1760e81b815260040160405180910390fd5b6125c088888460a001518789614183565b6125dd576040516334ce9a3d60e11b815260040160405180910390fd5b8582608001516001600160701b03166125f69190615865565b341461261557604051632c1d501360e11b815260040160405180910390fd5b856000108015612626575060148611155b612643576040516332b4cb2160e21b815260040160405180910390fd5b600061265385858985878b613373565b90506112e3858243613508565b60006014821115612684576040516332b4cb2160e21b815260040160405180910390fd5b816000036126a5576040516332b4cb2160e21b815260040160405180910390fd5b6014835111156126c8576040516349a3ec1560e11b815260040160405180910390fd5b82516000036126ea576040516349a3ec1560e11b815260040160405180910390fd5b612702600080516020615f8583398151915233611ffd565b15801561273657506127347ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc933611ffd565b155b1561275457604051634e8df0bf60e01b815260040160405180910390fd5b60008284516127639190615865565b60cc546127709190615852565b6101c8549091506001600160801b03168111156127a05760405163a67c036160e01b815260040160405180910390fd5b60005b84518110156127d9576127d18582815181106127c1576127c16158f4565b6020026020010151856000613508565b6001016127a3565b507f74074e463a8efcb02859ade8892e3934bd28eb75c9d1e6085a40c474088e2bfe83828660405161280d93929190615969565b60405180910390a19392505050565b606061282782612fb5565b6128445760405163677510db60e11b815260040160405180910390fd5b600061284e612b9c565b9050600061285a611d5c565b90506000612866610bc4565b9050825160000361287957949350505050565b8282612884876141fa565b604051602001612896939291906159c7565b6040516020818303038152906040529350505050919050565b6101d1546000905b80156128fc576000190160008181526101cf6020526040902054600160281b900464ffffffffff164211156128f7576128f1816001615852565b91505090565b6128b7565b506000905090565b6000828152610100602052604090206001015461292081613523565b6114a883836135b4565b612942600080516020615f8583398151915233611ffd565b61295f57604051634e8df0bf60e01b815260040160405180910390fd5b6101cd5460ff16156129845760405163ddff29e960e01b815260040160405180910390fd5b60006129913384846142fa565b9050737a6f5866f97034bb7153829bdaac1ffcb8facb716129b2828661334f565b6001600160a01b0316146129d9576040516332c3ce2560e11b815260040160405180910390fd5b825115612a28576101ca6129ed8482615a58565b507ff5e721c51327df71720f204c71b46bc26bcafb44db5012739c85814c7862f6c06101ca604051612a1f9190615b17565b60405180910390a15b815115610f39576101cc612a3c8382615a58565b506040805160208101909152600081526101c990612a5a9082615a58565b507f8eca6ea708f9bc34439b72366aa672afc86bb8b1294f1ba9637945c5dab8ea746101cc604051612a8c9190615b17565b60405180910390a150505050565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a08101919091526101d1548210612aef576040516327e7ab7d60e11b815260040160405180910390fd5b5060009081526101cf6020908152604091829020825160c081018452815464ffffffffff8082168352600160281b82041693820193909352600160501b830463ffffffff90811694820194909452600160701b83049093166060840152600160901b9091046001600160701b031660808301526001015460a082015290565b6001600160a01b03918216600090815260d26020908152604080832093909416825291909152205460ff1690565b60606101cc8054612bac9061574a565b9050600003612c32576101cd5460405163511113e560e01b8152620100009091046001600160a01b03169063511113e590612bed906101ca90600401615b17565b600060405180830381865afa158015612c0a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f519190810190615ba2565b6101cc8054610bd49061574a565b612c48613e59565b6001600160a01b038116612cad5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d49565b611f7c81613eb4565b600054610100900460ff1615808015612cd65750600054600160ff909116105b80612cf05750303b158015612cf0575060005460ff166001145b612d0c5760405162461bcd60e51b8152600401610d49906158a6565b6000805460ff191660011790558015612d2f576000805461ff0019166101001790555b6001600160a01b038916612d565760405163d92e233d60e01b815260040160405180910390fd5b8751600314612d6457600080fd5b8451600214612d7257600080fd5b612d7c8b8b613f07565b612d84613f38565b612d8c613f38565b612d94613f5f565b612dc26daaeb6d7670e522a718067333cd4e733cc6cdda760b79bafa08df41ecfa224f810dceb66001614364565b612dcb84613eb4565b604080518082019091526001600160801b038d81168083529088166020909201829052600160801b909102176101c8556101cd805462010000600160b01b031916620100006001600160a01b038c160217905587518890600090612e3157612e316158f4565b60200260200101516101cb9081612e489190615a58565b5087600181518110612e5c57612e5c6158f4565b60200260200101516101c99081612e739190615a58565b5087600281518110612e8757612e876158f4565b60200260200101516101ca9081612e9e9190615a58565b5084600081518110612eb257612eb26158f4565b60200260200101516101ce60006101000a8154816001600160a01b0302191690836001600160a01b03160217905550612f0585600181518110612ef757612ef76158f4565b60200260200101518861361c565b612f1060008561352d565b612f28600080516020615f858339815191528561352d565b8115612f3c57612f3a83836000613822565b505b8015612f82576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050505050565b60006001600160e01b03198216637965db0b60e01b1480610bbe5750610bbe826143a7565b600081815260d0602052604081205460ff1615612fd457506000919050565b816000108015610bbe57505060cc54101590565b600081815260d160205260409020546001600160a01b0390811690831681146114a857600082815260d16020526040902080546001600160a01b0319166001600160a01b038516908117909155829061304082611b84565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b600061308582612fb5565b6130e65760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610d49565b60006130f183611b84565b9050806001600160a01b0316846001600160a01b0316148061312c5750836001600160a01b031661312184610ce1565b6001600160a01b0316145b8061313c575061313c8185612b6e565b949350505050565b826001600160a01b031661315782611b84565b6001600160a01b0316146131bb5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610d49565b6001600160a01b03821661321d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610d49565b613228600082612fe8565b6001600160a01b03838116600081815260d36020908152604080832080546001600160601b03198082166001600160601b039283166000190183161790925595881680855282852080549283169288166001019097169190911790955585835260ce90915280822080546001600160a01b0319168517905551849392917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b604080517f5b174e00b853ebb074ee5cb5d23ca67a264896e5670f923ac103fccad5232b5560208201526001600160a01b03861691810191909152606081018490526080810183905260a0810182905260009081906133459060c0015b60405160208183030381529060405280519060200120614402565b9695505050505050565b600080600061335e85856144dd565b9150915061336b8161451f565b509392505050565b6001600160a01b038616600081815260d360209081526040808320548984526101d083528184209484529390915280822054908501519192600160601b90046001600160601b03169163ffffffff161561341557846040015163ffffffff1681106133f157604051632f18066d60e01b815260040160405180910390fd5b846040015163ffffffff1687820111156134155780856040015163ffffffff160396505b6101c854600160801b90046001600160801b0316801561345f5780831061344f57604051632f18066d60e01b815260040160405180910390fd5b80888401111561345f5782810397505b856060015163ffffffff1688880111156134835786866060015163ffffffff160397505b60008511801561349c57506101cd54610100900460ff16155b156134d1578482106134c157604051632f18066d60e01b815260040160405180910390fd5b8488830111156134d15781850397505b5060008881526101d0602090815260408083206001600160a01b038d16845290915290209087019055508490509695505050505050565b6114a8838360405180602001604052806000815250846146d0565b611f7c81336146ea565b6135378282611ffd565b611527576000828152610100602090815260408083206001600160a01b03851684529091529020805460ff191660011790556135703390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6135be8282611ffd565b15611527576000828152610100602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6127106001600160601b038216111561368a5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610d49565b6001600160a01b0382166136e05760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610d49565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217606555565b61372281612fb5565b61377e5760405162461bcd60e51b815260206004820152602760248201527f45524337323178797a3a20517565727920666f72206e6f6e6578697374656e7460448201526620746f6b656e2160c81b6064820152608401610d49565b600061378982611b84565b9050613796600083612fe8565b6001600160a01b038116600081815260d36020908152604080832080546001600160601b031981166001600160601b039182166000190190911617905585835260d0909152808220805460ff1916600190811790915560cd80549091019055518492907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000828161382e6128af565b90506014821115613852576040516373c2b52560e11b815260040160405180910390fd5b6101d154801580159061386457508185105b15613882576040516344ca163560e11b815260040160405180910390fd5b808511156138a3576040516307cc4d8f60e01b815260040160405180910390fd5b6138ae601483615852565b6138b88487615852565b11156138d75760405163c1eae7bb60e01b815260040160405180910390fd5b60008581526101cf602052604081205464ffffffffff1690849003613964574281116139165760405163bf4a806960e01b815260040160405180910390fd5b6101d18690556040517f842cd1905522b3731a39e0d2fb9d3757bc29b4e57e9253b230d437bf10505e9b90613950908a908a908a90615c4f565b60405180910390a185945050505050611c3d565b600088886000818110613979576139796158f4565b905060c0020180360381019061398f9190615d0a565b905060cc54816060015163ffffffff1610156139be57604051630e93fda160e21b815260040160405180910390fd5b4282111580156139cd57508115155b15613a2a57805164ffffffffff1682146139fa57604051632ca4094f60e21b815260040160405180910390fd5b42816020015164ffffffffff1611613a255760405163804491f960e01b815260040160405180910390fd5b613a55565b42816000015164ffffffffff1611613a555760405163667e606760e11b815260040160405180910390fd5b868581015b888214613a8e578a8a8a8403818110613a7557613a756158f4565b905060c00201803603810190613a8b9190615d0a565b92505b6101c85460608401516001600160801b0390911663ffffffff9091161115613ac95760405163bccc7e2360e01b815260040160405180910390fd5b826000015164ffffffffff16836020015164ffffffffff1611613aff57604051631131dc6b60e11b815260040160405180910390fd5b8115613b8f57600019820160009081526101cf6020526040902054606084015164ffffffffff600160281b8304169163ffffffff600160701b909104811691161015613b6557428110613b65576040516357be1d0d60e01b815260040160405180910390fd5b835164ffffffffff168110613b8d5760405163064f2b0760e31b815260040160405180910390fd5b505b60008281526101cf60209081526040918290208551815492870151938701516060880151608089015164ffffffffff93841669ffffffffffffffffffff1990961695909517600160281b93909616929092029490941767ffffffffffffffff60501b1916600160501b63ffffffff9586160263ffffffff60701b191617600160701b9490911693909302929092176001600160901b0316600160901b6001600160701b039092169190910217815560a084015160019182015590910190808210613a5a576101d18190556040517f842cd1905522b3731a39e0d2fb9d3757bc29b4e57e9253b230d437bf10505e9b90613c8d908d908d908d90615c4f565b60405180910390a19a9950505050505050505050565b6000610bbe8183611ffd565b60405163c3c5a54760e01b81526001600160a01b0384169063c3c5a54790613cdb903090600401614e39565b6020604051808303816000875af1158015613cfa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d1e91906157bb565b15613dbc578015613d8e57604051632cc5350560e21b81526001600160a01b0384169063b314d41490613d5790309086906004016157a1565b600060405180830381600087803b158015613d7157600080fd5b505af1158015613d85573d6000803e3d6000fd5b50505050505050565b604051630781ad2d60e21b81526001600160a01b03841690631e06b4b490613d5790309086906004016157a1565b8015613df057604051633e9f1edf60e11b81526001600160a01b03841690637d3e3dbe90613d5790309086906004016157a1565b6001600160a01b03821615613e2d5760405163a0af290360e01b81526001600160a01b0384169063a0af290390613d5790309086906004016157a1565b604051632210724360e11b81526001600160a01b03841690634420e48690613d57903090600401614e39565b610196546001600160a01b03163314611ce65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d49565b61019680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16613f2e5760405162461bcd60e51b8152600401610d4990615da4565b611527828261474e565b600054610100900460ff16611ce65760405162461bcd60e51b8152600401610d4990615da4565b600054610100900460ff16613f865760405162461bcd60e51b8152600401610d4990615da4565b611ce661478e565b816001600160a01b0316836001600160a01b031603613fef5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610d49565b6001600160a01b03838116600081815260d26020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60606001600160a01b0383163b6140c45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610d49565b600080846001600160a01b0316846040516140df9190615def565b600060405180830381855af49150503d806000811461411a576040519150601f19603f3d011682016040523d82523d6000602084013e61411f565b606091505b50915091506141478282604051806060016040528060278152602001615f5e602791396147bd565b95945050505050565b61415b848484613144565b614167848484846147f6565b610f395760405162461bcd60e51b8152600401610d4990615e0b565b6000613345868680806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506040516001600160601b0319606089901b166020820152603481018790528892506054019050604051602081830303815290604052805190602001206148f4565b6060816000036142215750506040805180820190915260018152600360fc1b602082015290565b8160005b811561424b578061423581615950565b91506142449050600a83615892565b9150614225565b6000816001600160401b0381111561426557614265614ef8565b6040519080825280601f01601f19166020018201604052801561428f576020820181803683370190505b5090505b841561313c576142a46001836157ee565b91506142b1600a86615e5d565b6142bc906030615852565b60f81b8183815181106142d1576142d16158f4565b60200101906001600160f81b031916908160001a9053506142f3600a86615892565b9450614293565b6000806141477f35fa4dcabfcae3f1b6e0c4c1ac43df02ba9cb39e2dcdc3d3f1b92a38118e3354868680519060200120868051906020012060405160200161332a94939291909384526001600160a01b039290921660208401526040830152606082015260800190565b600054610100900460ff1661438b5760405162461bcd60e51b8152600401610d4990615da4565b6001600160a01b0383163b156114a85782611b59818484613caf565b60006001600160e01b0319821663152a902d60e11b14806143d857506001600160e01b031982166380ac58cd60e01b145b806143f357506001600160e01b03198216635b5e139f60e01b145b80610bbe5750610bbe8261490a565b604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6020808301919091527f36cb08f6aafe2399767bf40e9642429d7535f40e61bd81428cad09095c5d337d828401527f06c015bd22b4c69690933c1058878ebdfef31f9aaae40bbe86d8a09fe1b2972c60608301524660808301523060a0808401919091528351808403909101815260c08301845280519082012061190160f01b60e084015260e2830181905261010280840186905284518085039091018152610122909301909352815191012060009190611c3d565b60008082516041036145135760208301516040840151606085015160001a6145078782858561493f565b9450945050505061147b565b5060009050600261147b565b600081600481111561453357614533615e71565b0361453b5750565b600181600481111561454f5761454f615e71565b036145975760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610d49565b60028160048111156145ab576145ab615e71565b036145f85760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610d49565b600381600481111561460c5761460c615e71565b036146645760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610d49565b600481600481111561467857614678615e71565b03611f7c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610d49565b6146db848483614a22565b61416760008560cc54856147f6565b6146f48282611ffd565b6115275761470c816001600160a01b03166014614b94565b614717836020614b94565b604051602001614728929190615e87565b60408051601f198184030181529082905262461bcd60e51b8252610d4991600401614e26565b600054610100900460ff166147755760405162461bcd60e51b8152600401610d4990615da4565b60ca6147818382615a58565b5060cb6114a88282615a58565b600054610100900460ff166147b55760405162461bcd60e51b8152600401610d4990615da4565b600161016455565b606083156147cc575081611c3d565b8251156147dc5782518084602001fd5b8160405162461bcd60e51b8152600401610d499190614e26565b60006001600160a01b0384163b156148ec57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061483a903390899088908890600401615ef6565b6020604051808303816000875af1925050508015614875575060408051601f3d908101601f1916820190925261487291810190615f29565b60015b6148d2573d8080156148a3576040519150601f19603f3d011682016040523d82523d6000602084013e6148a8565b606091505b5080516000036148ca5760405162461bcd60e51b8152600401610d4990615e0b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061313c565b50600161313c565b6000826149018584614d2f565b14949350505050565b60006001600160e01b0319821663152a902d60e11b1480610bbe57506301ffc9a760e01b6001600160e01b0319831614610bbe565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b0383111561496c5750600090506003614a19565b8460ff16601b1415801561498457508460ff16601c14155b156149955750600090506004614a19565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156149e9573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116614a1257600060019250925050614a19565b9150600090505b94509492505050565b6001600160a01b038316614a785760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610d49565b60cc8054838101918290556001600160a01b038516600090815260d36020526040902080546001600160601b038082168701166001600160601b0319909116179055908215614b17576001600160a01b038516600090815260d36020526040902080546001600160601b03808216600160601b92839004821688019091169091026001600160c01b031617600160c01b6001600160401b038616021790555b600081815260cf6020526040902080546001600160a01b0319166001600160a01b03871617905560018281019082015b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4816001019150808210614b4757505050610f39565b60606000614ba3836002615865565b614bae906002615852565b6001600160401b03811115614bc557614bc5614ef8565b6040519080825280601f01601f191660200182016040528015614bef576020820181803683370190505b509050600360fc1b81600081518110614c0a57614c0a6158f4565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110614c3957614c396158f4565b60200101906001600160f81b031916908160001a9053506000614c5d846002615865565b614c68906001615852565b90505b6001811115614ce0576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110614c9c57614c9c6158f4565b1a60f81b828281518110614cb257614cb26158f4565b60200101906001600160f81b031916908160001a90535060049490941c93614cd981615f46565b9050614c6b565b508315611c3d5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610d49565b600081815b845181101561336b57614d6082868381518110614d5357614d536158f4565b6020026020010151614d74565b915080614d6c81615950565b915050614d34565b6000818310614d90576000828152602084905260409020611c3d565b6000838152602083905260409020611c3d565b6001600160e01b031981168114611f7c57600080fd5b600060208284031215614dcb57600080fd5b8135611c3d81614da3565b60005b83811015614df1578181015183820152602001614dd9565b50506000910152565b60008151808452614e12816020860160208601614dd6565b601f01601f19169290920160200192915050565b602081526000611c3d6020830184614dfa565b6001600160a01b0391909116815260200190565b600060208284031215614e5f57600080fd5b5035919050565b6001600160a01b0381168114611f7c57600080fd5b8035614e8681614e66565b919050565b60008060408385031215614e9e57600080fd5b8235614ea981614e66565b946020939093013593505050565b600080600060608486031215614ecc57600080fd5b8335614ed781614e66565b92506020840135614ee781614e66565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614f3657614f36614ef8565b604052919050565b60006001600160401b03821115614f5757614f57614ef8565b50601f01601f191660200190565b600082601f830112614f7657600080fd5b8135614f89614f8482614f3e565b614f0e565b818152846020838601011115614f9e57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215614fd357600080fd5b85356001600160401b03811115614fe957600080fd5b614ff588828901614f65565b955050602086013593506040860135925060608601359150608086013561501b81614e66565b809150509295509295909350565b6000806040838503121561503c57600080fd5b50508035926020909101359150565b6000806040838503121561505e57600080fd5b82359150602083013561507081614e66565b809150509250929050565b80356001600160601b0381168114614e8657600080fd5b600080604083850312156150a557600080fd5b82356150b081614e66565b91506150be6020840161507b565b90509250929050565b60008083601f8401126150d957600080fd5b5081356001600160401b038111156150f057600080fd5b60208301915083602060c08302850101111561147b57600080fd5b60008060006040848603121561512057600080fd5b83356001600160401b0381111561513657600080fd5b615142868287016150c7565b909790965060209590950135949350505050565b80356001600160801b0381168114614e8657600080fd5b60006020828403121561517f57600080fd5b611c3d82615156565b8015158114611f7c57600080fd5b6000806000606084860312156151ab57600080fd5b83356151b681614e66565b925060208401356151c681614e66565b915060408401356151d681615188565b809150509250925092565b6000602082840312156151f357600080fd5b8135611c3d81614e66565b60008060006060848603121561521357600080fd5b833561521e81614e66565b925060208401356151c681615188565b6000806040838503121561524157600080fd5b823561524c81614e66565b9150602083013561507081615188565b60008083601f84011261526e57600080fd5b5081356001600160401b0381111561528557600080fd5b6020830191508360208260051b850101111561147b57600080fd5b600080602083850312156152b357600080fd5b82356001600160401b038111156152c957600080fd5b6152d58582860161525c565b90969095509350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561533657603f19888603018452615324858351614dfa565b94509285019290850190600101615308565b5092979650505050505050565b6000806000806080858703121561535957600080fd5b843561536481614e66565b9350602085013561537481614e66565b92506040850135915060608501356001600160401b0381111561539657600080fd5b6153a287828801614f65565b91505092959194509250565b6000806000806000608086880312156153c657600080fd5b85356001600160401b038111156153dc57600080fd5b6153e88882890161525c565b9096509450506020860135925060408601359150606086013561501b81614e66565b60006001600160401b0382111561542357615423614ef8565b5060051b60200190565b600082601f83011261543e57600080fd5b8135602061544e614f848361540a565b82815260059290921b8401810191818101908684111561546d57600080fd5b8286015b8481101561549157803561548481614e66565b8352918301918301615471565b509695505050505050565b600080604083850312156154af57600080fd5b82356001600160401b038111156154c557600080fd5b6154d18582860161542d565b95602094909401359450505050565b6000806000606084860312156154f557600080fd5b83356001600160401b038082111561550c57600080fd5b61551887838801614f65565b9450602086013591508082111561552e57600080fd5b61553a87838801614f65565b9350604086013591508082111561555057600080fd5b5061555d86828701614f65565b9150509250925092565b6000806040838503121561557a57600080fd5b823561558581614e66565b9150602083013561507081614e66565b600082601f8301126155a657600080fd5b813560206155b6614f848361540a565b82815260059290921b840181019181810190868411156155d557600080fd5b8286015b848110156154915780356001600160401b038111156155f85760008081fd5b6156068986838b0101614f65565b8452509183019183016155d9565b60008060008060008060008060008060006101408c8e03121561563657600080fd5b61563f8c615156565b9a506001600160401b038060208e0135111561565a57600080fd5b61566a8e60208f01358f01614f65565b9a508060408e0135111561567d57600080fd5b61568d8e60408f01358f01614f65565b995061569b60608e01614e7b565b98508060808e013511156156ae57600080fd5b6156be8e60808f01358f01615595565b97506156cc60a08e0161507b565b96506156da60c08e01615156565b95508060e08e013511156156ed57600080fd5b6156fd8e60e08f01358f0161542d565b945061570c6101008e01614e7b565b9350806101208e0135111561572057600080fd5b506157328d6101208e01358e016150c7565b81935080925050509295989b509295989b9093969950565b600181811c9082168061575e57607f821691505b60208210810361577e57634e487b7160e01b600052602260045260246000fd5b50919050565b60006020828403121561579657600080fd5b8151611c3d81614e66565b6001600160a01b0392831681529116602082015260400190565b6000602082840312156157cd57600080fd5b8151611c3d81615188565b634e487b7160e01b600052601160045260246000fd5b81810381811115610bbe57610bbe6157d8565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b80820180821115610bbe57610bbe6157d8565b8082028115828204841417610bbe57610bbe6157d8565b634e487b7160e01b600052601260045260246000fd5b6000826158a1576158a161587c565b500490565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261592157600080fd5b8301803591506001600160401b0382111561593b57600080fd5b60200191503681900382131561147b57600080fd5b600060018201615962576159626157d8565b5060010190565b6000606082018583526020858185015260606040850152818551808452608086019150828701935060005b818110156159b95784516001600160a01b031683529383019391830191600101615994565b509098975050505050505050565b600084516159d9818460208901614dd6565b8451908301906159ed818360208901614dd6565b8451910190615a00818360208801614dd6565b0195945050505050565b601f8211156114a857600081815260208120601f850160051c81016020861015615a315750805b601f850160051c820191505b81811015615a5057828155600101615a3d565b505050505050565b81516001600160401b03811115615a7157615a71614ef8565b615a8581615a7f845461574a565b84615a0a565b602080601f831160018114615aba5760008415615aa25750858301515b600019600386901b1c1916600185901b178555615a50565b600085815260208120601f198616915b82811015615ae957888601518255948401946001909101908401615aca565b5085821015615b075787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000602080835260008454615b2b8161574a565b80848701526040600180841660008114615b4c5760018114615b6657615b94565b60ff1985168984015283151560051b890183019550615b94565b896000528660002060005b85811015615b8c5781548b8201860152908301908801615b71565b8a0184019650505b509398975050505050505050565b600060208284031215615bb457600080fd5b81516001600160401b03811115615bca57600080fd5b8201601f81018413615bdb57600080fd5b8051615be9614f8482614f3e565b818152856020838501011115615bfe57600080fd5b614147826020830160208601614dd6565b803564ffffffffff81168114614e8657600080fd5b803563ffffffff81168114614e8657600080fd5b80356001600160701b0381168114614e8657600080fd5b6040808252818101849052600090606080840187845b88811015615cf45764ffffffffff80615c7d84615c0f565b168452602081615c8e828601615c0f565b169085015250615c9f828601615c24565b63ffffffff8082168786015280615cb7878601615c24565b1686860152505060806001600160701b03615cd3828501615c38565b169084015260a0828101359084015260c09283019290910190600101615c65565b5050809350505050826020830152949350505050565b600060c08284031215615d1c57600080fd5b60405160c081018181106001600160401b0382111715615d3e57615d3e614ef8565b604052615d4a83615c0f565b8152615d5860208401615c0f565b6020820152615d6960408401615c24565b6040820152615d7a60608401615c24565b6060820152615d8b60808401615c38565b608082015260a083013560a08201528091505092915050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008251615e01818460208701614dd6565b9190910192915050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600082615e6c57615e6c61587c565b500690565b634e487b7160e01b600052602160045260246000fd5b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b815260008351615eb9816017850160208801614dd6565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615eea816028840160208801614dd6565b01602801949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061334590830184614dfa565b600060208284031215615f3b57600080fd5b8151611c3d81614da3565b600081615f5557615f556157d8565b50600019019056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564fd63b67fde00b77f1f54f050135a475665b815acd10a8e7fd785ba074846734aa2646970667358221220d5868bdbcfd41b386870f87bce8365c42280db6d6c2b4d61a2a11adc08bb1c6864736f6c63430008110033

Deployed ByteCode

0x6080604052600436106103435760003560e01c8063869d3bde116101b2578063b3cc59db116100ed578063d547741f11610090578063d547741f14610a5b578063d7818e2814610a7b578063dedd76e714610a9b578063e985e9c514610b27578063effcf2b714610b47578063f2fde38b14610b5c578063f53ddc3b14610b7c578063f86a352914610b9c57600080fd5b8063b3cc59db14610970578063b88d4fde14610985578063bdc769eb146109a5578063c0dad79b146109b8578063c204642c146109d2578063c87b56dd146109f2578063ce4c61aa14610a12578063d539139314610a2757600080fd5b806395d89b411161015557806395d89b411461087557806397f5cdcf1461088a578063a07c7ce4146108a0578063a217fddf146108c2578063a22cb465146108d7578063aa8a6754146108f7578063ac9650d81461091e578063b0ccc31e1461094b57600080fd5b8063869d3bde146107525780638c8ea8e6146107675780638cd90c32146107ad5780638da5cb5b146107e65780638e021c061461080557806390411aca1461082057806391d148541461083557806394b08a4b1461085557600080fd5b806342842e0e11610282578063659b8b2a11610225578063659b8b2a1461068957806370a08231146106a9578063715018a6146106c957806372c06f5a146106de578063743976a0146106f35780637f1fea591461070857806380420736146107285780638129fc1c1461073d57600080fd5b806342842e0e1461056857806342966c68146105885780634e0b9df2146105a857806351e85af6146105c8578063548e7682146105dd578063577199fd146105fd57806360659a921461061d5780636352211e1461066957600080fd5b8063248a9ca3116102ea578063248a9ca31461045b5780632955a21d1461048c5780632a55205a1461049f5780632f2ff15d146104de5780633540558a146104fe57806336568abe146105205780633ccfd60b146105405780633f52af3c1461054857600080fd5b806301ffc9a7146103485780630293741b1461037d57806304b8adb41461039f57806306fdde03146103c1578063081812fc146103d6578063095ea7b3146103f657806318160ddd1461041857806323b872dd1461043b575b600080fd5b34801561035457600080fd5b50610368610363366004614db9565b610bb3565b60405190151581526020015b60405180910390f35b34801561038957600080fd5b50610392610bc4565b6040516103749190614e26565b3480156103ab57600080fd5b506103b4610c57565b6040516103749190614e39565b3480156103cd57600080fd5b50610392610cd2565b3480156103e257600080fd5b506103b46103f1366004614e4d565b610ce1565b34801561040257600080fd5b50610416610411366004614e8b565b610d6e565b005b34801561042457600080fd5b5061042d610f3f565b604051908152602001610374565b34801561044757600080fd5b50610416610456366004614eb7565b610f56565b34801561046757600080fd5b5061042d610476366004614e4d565b6000908152610100602052604090206001015490565b61041661049a366004614fbb565b61108d565b3480156104ab57600080fd5b506104bf6104ba366004615029565b6113d4565b604080516001600160a01b039093168352602083019190915201610374565b3480156104ea57600080fd5b506104166104f936600461504b565b611482565b34801561050a57600080fd5b5061042d600080516020615f8583398151915281565b34801561052c57600080fd5b5061041661053b36600461504b565b6114ad565b61041661152b565b34801561055457600080fd5b50610416610563366004615092565b61170a565b34801561057457600080fd5b50610416610583366004614eb7565b61178a565b34801561059457600080fd5b5061042d6105a3366004614e4d565b611890565b3480156105b457600080fd5b506104166105c336600461510b565b611938565b3480156105d457600080fd5b50610416611978565b3480156105e957600080fd5b506104166105f836600461516d565b6119fe565b34801561060957600080fd5b50610416610618366004615196565b611a89565b34801561062957600080fd5b506101c854610649906001600160801b0380821691600160801b90041682565b604080516001600160801b03938416815292909116602083015201610374565b34801561067557600080fd5b506103b4610684366004614e4d565b611b84565b34801561069557600080fd5b506101cd5461036890610100900460ff1681565b3480156106b557600080fd5b5061042d6106c43660046151e1565b611c44565b3480156106d557600080fd5b50610416611cd4565b3480156106ea57600080fd5b50610368611ce8565b3480156106ff57600080fd5b50610392611d5c565b34801561071457600080fd5b506104166107233660046151e1565b611d6c565b34801561073457600080fd5b50610416611e08565b34801561074957600080fd5b50610416611e81565b34801561075e57600080fd5b5061042d611f7f565b34801561077357600080fd5b5061042d6107823660046151e1565b6001600160a01b0316600090815260d36020526040902054600160601b90046001600160601b031690565b3480156107b957600080fd5b5061042d6107c836600461504b565b6101d060209081526000928352604080842090915290825290205481565b3480156107f257600080fd5b50610196546001600160a01b03166103b4565b34801561081157600080fd5b506101cd546103689060ff1681565b34801561082c57600080fd5b5060cc5461042d565b34801561084157600080fd5b5061036861085036600461504b565b611ffd565b34801561086157600080fd5b506104166108703660046151fe565b612029565b34801561088157600080fd5b50610392612101565b34801561089657600080fd5b5061042d60cc5481565b3480156108ac57600080fd5b506101cd5461036890600160b01b900460ff1681565b3480156108ce57600080fd5b5061042d600081565b3480156108e357600080fd5b506104166108f236600461522e565b612110565b34801561090357600080fd5b506101cd546103b4906201000090046001600160a01b031681565b34801561092a57600080fd5b5061093e6109393660046152a0565b6121db565b60405161037491906152e1565b34801561095757600080fd5b506097546103b49061010090046001600160a01b031681565b34801561097c57600080fd5b506104166122cf565b34801561099157600080fd5b506104166109a0366004615343565b61236b565b6104166109b33660046153ae565b6124ab565b3480156109c457600080fd5b506097546103689060ff1681565b3480156109de57600080fd5b5061042d6109ed36600461549c565b612660565b3480156109fe57600080fd5b50610392610a0d366004614e4d565b61281c565b348015610a1e57600080fd5b5061042d6128af565b348015610a3357600080fd5b5061042d7ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc981565b348015610a6757600080fd5b50610416610a7636600461504b565b612904565b348015610a8757600080fd5b50610416610a963660046154e0565b61292a565b348015610aa757600080fd5b50610abb610ab6366004614e4d565b612a9a565b6040516103749190600060c08201905064ffffffffff80845116835280602085015116602084015250604083015163ffffffff808216604085015280606086015116606085015250506001600160701b03608084015116608083015260a083015160a083015292915050565b348015610b3357600080fd5b50610368610b42366004615567565b612b6e565b348015610b5357600080fd5b50610392612b9c565b348015610b6857600080fd5b50610416610b773660046151e1565b612c40565b348015610b8857600080fd5b50610416610b97366004615614565b612cb6565b348015610ba857600080fd5b5061042d6101d15481565b6000610bbe82612f90565b92915050565b60606101cb8054610bd49061574a565b80601f0160208091040260200160405190810160405280929190818152602001828054610c009061574a565b8015610c4d5780601f10610c2257610100808354040283529160200191610c4d565b820191906000526020600020905b815481529060010190602001808311610c3057829003601f168201915b5050505050905090565b6000806101cd60029054906101000a90046001600160a01b03166001600160a01b03166304b8adb46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bbe9190615784565b606060ca8054610bd49061574a565b6000610cec82612fb5565b610d525760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b50600090815260d160205260409020546001600160a01b031690565b609754829060ff16158015610d93575060975461010090046001600160a01b03163b15155b15610e2e57609754604051633185c44d60e21b81526101009091046001600160a01b03169063c617113490610dce90309085906004016157a1565b602060405180830381865afa158015610deb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0f91906157bb565b610e2e5780604051633b79c77360e21b8152600401610d499190614e39565b6000610e3983611b84565b9050806001600160a01b0316846001600160a01b031603610ea65760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610d49565b336001600160a01b0382161480610ec25750610ec28133612b6e565b610f2f5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b6064820152608401610d49565b610f398484612fe8565b50505050565b600060cd5460cc54610f5191906157ee565b905090565b609754839060ff16158015610f7b575060975461010090046001600160a01b03163b15155b1561105d57336001600160a01b03821603610fc757610f9b335b8361307a565b610fb75760405162461bcd60e51b8152600401610d4990615801565b610fc2848484613144565b610f39565b609754604051633185c44d60e21b81526101009091046001600160a01b03169063c617113490610ffd90309033906004016157a1565b602060405180830381865afa15801561101a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061103e91906157bb565b61105d5733604051633b79c77360e21b8152600401610d499190614e39565b61106633610f95565b6110825760405162461bcd60e51b8152600401610d4990615801565b610f39848484613144565b6000611097611f7f565b60008181526101cf60209081526040808320815160c081018352815464ffffffffff8082168352600160281b82041694820194909452600160501b840463ffffffff90811693820193909352600160701b84049092166060830152600160901b9092046001600160701b0316608082015260019091015460a082015291925086900361113657604051633ab3447f60e11b815260040160405180910390fd5b60cc54606082015163ffffffff1681106111625760405162491a1760e81b815260040160405180910390fd5b60a08201511561118557604051630268975d60e51b815260040160405180910390fd5b6101cd54610100900460ff166112605760006111a385888a896132cd565b9050737a6f5866f97034bb7153829bdaac1ffcb8facb716111c4828b61334f565b6001600160a01b0316146111eb576040516332c3ce2560e11b815260040160405180910390fd5b6001600160a01b038516600090815260d36020526040902054600160c01b90046001600160401b031688116112335760405163dc5a682560e01b815260040160405180910390fd5b61123e886028615852565b43111561125e57604051639e8c142f60e01b815260040160405180910390fd5b505b8582608001516001600160701b03166112799190615865565b341461129857604051632c1d501360e11b815260040160405180910390fd5b8560001080156112a9575060148611155b6112c6576040516332b4cb2160e21b815260040160405180910390fd5b60006112d685858985878b613373565b90506112e385828a613508565b8681101561137f5760808301516000906001600160701b0316611306838a6157ee565b6113109190615865565b604051909150600090339083908381818185875af1925050503d8060008114611355576040519150601f19603f3d011682016040523d82523d6000602084013e61135a565b606091505b505090508061137c57604051635579a42f60e11b815260040160405180910390fd5b50505b604080516001600160a01b0387168152602081018690529081018290527f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f9060600160405180910390a1505050505050505050565b60008281526066602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916114495750604080518082019091526065546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090611468906001600160601b031687615865565b6114729190615892565b91519350909150505b9250929050565b6000828152610100602052604090206001015461149e81613523565b6114a8838361352d565b505050565b6001600160a01b038116331461151d5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610d49565b61152782826135b4565b5050565b6002610164540361157e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610d49565b60026101645561158f600033611ffd565b806115b2575061159d610c57565b6001600160a01b0316336001600160a01b0316145b6115f75760405162461bcd60e51b81526020600482015260166024820152754e6f74206f776e6572206f7220466169722e78797a2160501b6044820152606401610d49565b476000611602610c57565b6001600160a01b03166032611618846003615865565b6116229190615892565b604051600081818185875af1925050503d806000811461165e576040519150601f19603f3d011682016040523d82523d6000602084013e611663565b606091505b505090508061168557604051635579a42f60e11b815260040160405180910390fd5b6101ce5460405147916000916001600160a01b039091169083908381818185875af1925050503d80600081146116d7576040519150601f19603f3d011682016040523d82523d6000602084013e6116dc565b606091505b50509050806116fe57604051635579a42f60e11b815260040160405180910390fd5b50506001610164555050565b611715600033611ffd565b61173257604051634e8df0bf60e01b815260040160405180910390fd5b61173c828261361c565b604080516001600160a01b03841681526001600160601b03831660208201527fef5955f7902e6696c028804c62be1c24a0f98d9d30de5c31c83fa7f8b5c15c6f910160405180910390a15050565b609754839060ff161580156117af575060975461010090046001600160a01b03163b15155b1561187557336001600160a01b038216036117df57610fc28484846040518060200160405280600081525061236b565b609754604051633185c44d60e21b81526101009091046001600160a01b03169063c61711349061181590309033906004016157a1565b602060405180830381865afa158015611832573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061185691906157bb565b6118755733604051633b79c77360e21b8152600401610d499190614e39565b610f398484846040518060200160405280600081525061236b565b6101cd54600090600160b01b900460ff166118be5760405163c7c39e4f60e01b815260040160405180910390fd5b6118d06118ca83611b84565b33612b6e565b806118f457506118df82611b84565b6001600160a01b0316336001600160a01b0316145b8061190f57503361190483610ce1565b6001600160a01b0316145b61192b5760405162ccfedb60e31b815260040160405180910390fd5b61193482613719565b5090565b611950600080516020615f8583398151915233611ffd565b61196d57604051634e8df0bf60e01b815260040160405180910390fd5b610f39838383613822565b611983600033611ffd565b6119a057604051634e8df0bf60e01b815260040160405180910390fd5b6101cd5460ff16156119c55760405163ddff29e960e01b815260040160405180910390fd5b6101cd805460ff191660011790556040517f31d1c0a3af6e15844ff9c1bf6201a5cf123137eb2fb3eeb96861a436d49cd25f90600090a1565b611a16600080516020615f8583398151915233611ffd565b611a3357604051634e8df0bf60e01b815260040160405180910390fd5b6101c880546001600160801b03908116600160801b918416918202179091556040519081527f8c8298dd23c82a4aa45d27f480c6ce0aa2588e13df0b2fe2c827ca4a6836a5f8906020015b60405180910390a150565b611a9233613ca3565b611aaf57604051634755657960e01b815260040160405180910390fd5b826001600160a01b0381163b600003611adb57604051630458607f60e41b815260040160405180910390fd5b60405163c3c5a54760e01b81526001600160a01b0382169063c3c5a54790611b07903090600401614e39565b6020604051808303816000875af1158015611b26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b4a91906157bb565b611b5957611b59818484613caf565b609780546001600160a01b0390921661010002610100600160a81b0319909216919091179055505050565b6000611b8f82612fb5565b611bec5760405162461bcd60e51b815260206004820152602860248201527f45524337323178797a3a20517565727920666f72206e6f6e206578697374656e6044820152677420746f6b656e2160c01b6064820152608401610d49565b600082815260ce602052604090205482906001600160a01b031680611c3d575b50600081815260cf60205260409020546001600160a01b03168015611c32579392505050565b816001019150611c0c565b9392505050565b60006001600160a01b038216611caf5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610d49565b506001600160a01b0316600090815260d360205260409020546001600160601b031690565b611cdc613e59565b611ce66000613eb4565b565b6000611cf333613ca3565b611d1057604051634755657960e01b815260040160405180910390fd5b6097805460ff81161560ff1990911681179091556040518181527fd8c469bcb7a4be6d69103a5fdb65991249a95423350dc583495ccf5e7c28a88d9060200160405180910390a1905090565b60606101c98054610bd49061574a565b611d77600033611ffd565b611d9457604051634e8df0bf60e01b815260040160405180910390fd5b6001600160a01b038116611dbb5760405163d92e233d60e01b815260040160405180910390fd5b6101ce80546001600160a01b0319166001600160a01b0383169081179091556040517fd45e158b56e768c1167267f8516bcf96348071775faded3c9216b60855d873de91611a7e91614e39565b611e13600033611ffd565b611e3057604051634e8df0bf60e01b815260040160405180910390fd5b6101cd54610100900460ff1615611e4657600080fd5b6101cd805461ff0019166101001790556040517ffbbcc58867e8fad1d9f72f1b991660f5ec5e4e068374aa442b8604eef182b63990600090a1565b600054610100900460ff1615808015611ea15750600054600160ff909116105b80611ebb5750303b158015611ebb575060005460ff166001145b611ed75760405162461bcd60e51b8152600401610d49906158a6565b6000805460ff191660011790558015611efa576000805461ff0019166101001790555b611f226040518060200160405280600081525060405180602001604052806000815250613f07565b611f2a613f38565b611f32613f38565b611f3a613f5f565b8015611f7c576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001611a7e565b50565b6101d1546000905b8015611fe3576000190160008181526101cf602052604090205464ffffffffff164210801590611fd4575060008181526101cf6020526040902054600160281b900464ffffffffff164211155b15611fde57919050565b611f87565b5060405163b7b2409760e01b815260040160405180910390fd5b6000918252610100602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61203233613ca3565b61204f57604051634755657960e01b815260040160405180910390fd5b60975461010090046001600160a01b0316803b60000361208257604051630458607f60e41b815260040160405180910390fd5b6001600160a01b0384166120f65760405163034a0dc160e41b815230600482015282151560248201526001600160a01b038216906334a0dc1090604401600060405180830381600087803b1580156120d957600080fd5b505af11580156120ed573d6000803e3d6000fd5b50505050610f39565b610f39818585613caf565b606060cb8054610bd49061574a565b609754829060ff16158015612135575060975461010090046001600160a01b03163b15155b156121d057609754604051633185c44d60e21b81526101009091046001600160a01b03169063c61711349061217090309085906004016157a1565b602060405180830381865afa15801561218d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121b191906157bb565b6121d05780604051633b79c77360e21b8152600401610d499190614e39565b6114a8338484613f8e565b6060816001600160401b038111156121f5576121f5614ef8565b60405190808252806020026020018201604052801561222857816020015b60608152602001906001900390816122135790505b50905060005b828110156122c8576122983085858481811061224c5761224c6158f4565b905060200281019061225e919061590a565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061405c92505050565b8282815181106122aa576122aa6158f4565b602002602001018190525080806122c090615950565b91505061222e565b5092915050565b6122e7600080516020615f8583398151915233611ffd565b61230457604051634e8df0bf60e01b815260040160405180910390fd5b6101cd805460ff600160b01b808304821615810260ff60b01b1990931692909217928390556040517f6ae3331a8bd1998bb8fd9d3d02b720f4862fb43e7586d302ba44e3923cea922d936123619390049091161515815260200190565b60405180910390a1565b609754849060ff16158015612390575060975461010090046001600160a01b03163b15155b1561247357336001600160a01b038216036123dd576123b0335b8461307a565b6123cc5760405162461bcd60e51b8152600401610d4990615801565b6123d885858585614150565b6124a4565b609754604051633185c44d60e21b81526101009091046001600160a01b03169063c61711349061241390309033906004016157a1565b602060405180830381865afa158015612430573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061245491906157bb565b6124735733604051633b79c77360e21b8152600401610d499190614e39565b61247c336123aa565b6124985760405162461bcd60e51b8152600401610d4990615801565b6124a485858585614150565b5050505050565b6101c85460cc546001600160801b03909116116124db5760405163edf7f6fb60e01b815260040160405180910390fd5b60006124e5611f7f565b60008181526101cf6020908152604091829020825160c081018452815464ffffffffff8082168352600160281b82041693820193909352600160501b830463ffffffff90811694820194909452600160701b83049093166060840152600160901b9091046001600160701b031660808301526001015460a082018190529192509061258357604051637904b60360e11b815260040160405180910390fd5b60cc54606082015163ffffffff1681106125af5760405162491a1760e81b815260040160405180910390fd5b6125c088888460a001518789614183565b6125dd576040516334ce9a3d60e11b815260040160405180910390fd5b8582608001516001600160701b03166125f69190615865565b341461261557604051632c1d501360e11b815260040160405180910390fd5b856000108015612626575060148611155b612643576040516332b4cb2160e21b815260040160405180910390fd5b600061265385858985878b613373565b90506112e3858243613508565b60006014821115612684576040516332b4cb2160e21b815260040160405180910390fd5b816000036126a5576040516332b4cb2160e21b815260040160405180910390fd5b6014835111156126c8576040516349a3ec1560e11b815260040160405180910390fd5b82516000036126ea576040516349a3ec1560e11b815260040160405180910390fd5b612702600080516020615f8583398151915233611ffd565b15801561273657506127347ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc933611ffd565b155b1561275457604051634e8df0bf60e01b815260040160405180910390fd5b60008284516127639190615865565b60cc546127709190615852565b6101c8549091506001600160801b03168111156127a05760405163a67c036160e01b815260040160405180910390fd5b60005b84518110156127d9576127d18582815181106127c1576127c16158f4565b6020026020010151856000613508565b6001016127a3565b507f74074e463a8efcb02859ade8892e3934bd28eb75c9d1e6085a40c474088e2bfe83828660405161280d93929190615969565b60405180910390a19392505050565b606061282782612fb5565b6128445760405163677510db60e11b815260040160405180910390fd5b600061284e612b9c565b9050600061285a611d5c565b90506000612866610bc4565b9050825160000361287957949350505050565b8282612884876141fa565b604051602001612896939291906159c7565b6040516020818303038152906040529350505050919050565b6101d1546000905b80156128fc576000190160008181526101cf6020526040902054600160281b900464ffffffffff164211156128f7576128f1816001615852565b91505090565b6128b7565b506000905090565b6000828152610100602052604090206001015461292081613523565b6114a883836135b4565b612942600080516020615f8583398151915233611ffd565b61295f57604051634e8df0bf60e01b815260040160405180910390fd5b6101cd5460ff16156129845760405163ddff29e960e01b815260040160405180910390fd5b60006129913384846142fa565b9050737a6f5866f97034bb7153829bdaac1ffcb8facb716129b2828661334f565b6001600160a01b0316146129d9576040516332c3ce2560e11b815260040160405180910390fd5b825115612a28576101ca6129ed8482615a58565b507ff5e721c51327df71720f204c71b46bc26bcafb44db5012739c85814c7862f6c06101ca604051612a1f9190615b17565b60405180910390a15b815115610f39576101cc612a3c8382615a58565b506040805160208101909152600081526101c990612a5a9082615a58565b507f8eca6ea708f9bc34439b72366aa672afc86bb8b1294f1ba9637945c5dab8ea746101cc604051612a8c9190615b17565b60405180910390a150505050565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a08101919091526101d1548210612aef576040516327e7ab7d60e11b815260040160405180910390fd5b5060009081526101cf6020908152604091829020825160c081018452815464ffffffffff8082168352600160281b82041693820193909352600160501b830463ffffffff90811694820194909452600160701b83049093166060840152600160901b9091046001600160701b031660808301526001015460a082015290565b6001600160a01b03918216600090815260d26020908152604080832093909416825291909152205460ff1690565b60606101cc8054612bac9061574a565b9050600003612c32576101cd5460405163511113e560e01b8152620100009091046001600160a01b03169063511113e590612bed906101ca90600401615b17565b600060405180830381865afa158015612c0a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f519190810190615ba2565b6101cc8054610bd49061574a565b612c48613e59565b6001600160a01b038116612cad5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d49565b611f7c81613eb4565b600054610100900460ff1615808015612cd65750600054600160ff909116105b80612cf05750303b158015612cf0575060005460ff166001145b612d0c5760405162461bcd60e51b8152600401610d49906158a6565b6000805460ff191660011790558015612d2f576000805461ff0019166101001790555b6001600160a01b038916612d565760405163d92e233d60e01b815260040160405180910390fd5b8751600314612d6457600080fd5b8451600214612d7257600080fd5b612d7c8b8b613f07565b612d84613f38565b612d8c613f38565b612d94613f5f565b612dc26daaeb6d7670e522a718067333cd4e733cc6cdda760b79bafa08df41ecfa224f810dceb66001614364565b612dcb84613eb4565b604080518082019091526001600160801b038d81168083529088166020909201829052600160801b909102176101c8556101cd805462010000600160b01b031916620100006001600160a01b038c160217905587518890600090612e3157612e316158f4565b60200260200101516101cb9081612e489190615a58565b5087600181518110612e5c57612e5c6158f4565b60200260200101516101c99081612e739190615a58565b5087600281518110612e8757612e876158f4565b60200260200101516101ca9081612e9e9190615a58565b5084600081518110612eb257612eb26158f4565b60200260200101516101ce60006101000a8154816001600160a01b0302191690836001600160a01b03160217905550612f0585600181518110612ef757612ef76158f4565b60200260200101518861361c565b612f1060008561352d565b612f28600080516020615f858339815191528561352d565b8115612f3c57612f3a83836000613822565b505b8015612f82576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050505050565b60006001600160e01b03198216637965db0b60e01b1480610bbe5750610bbe826143a7565b600081815260d0602052604081205460ff1615612fd457506000919050565b816000108015610bbe57505060cc54101590565b600081815260d160205260409020546001600160a01b0390811690831681146114a857600082815260d16020526040902080546001600160a01b0319166001600160a01b038516908117909155829061304082611b84565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b600061308582612fb5565b6130e65760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610d49565b60006130f183611b84565b9050806001600160a01b0316846001600160a01b0316148061312c5750836001600160a01b031661312184610ce1565b6001600160a01b0316145b8061313c575061313c8185612b6e565b949350505050565b826001600160a01b031661315782611b84565b6001600160a01b0316146131bb5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610d49565b6001600160a01b03821661321d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610d49565b613228600082612fe8565b6001600160a01b03838116600081815260d36020908152604080832080546001600160601b03198082166001600160601b039283166000190183161790925595881680855282852080549283169288166001019097169190911790955585835260ce90915280822080546001600160a01b0319168517905551849392917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b604080517f5b174e00b853ebb074ee5cb5d23ca67a264896e5670f923ac103fccad5232b5560208201526001600160a01b03861691810191909152606081018490526080810183905260a0810182905260009081906133459060c0015b60405160208183030381529060405280519060200120614402565b9695505050505050565b600080600061335e85856144dd565b9150915061336b8161451f565b509392505050565b6001600160a01b038616600081815260d360209081526040808320548984526101d083528184209484529390915280822054908501519192600160601b90046001600160601b03169163ffffffff161561341557846040015163ffffffff1681106133f157604051632f18066d60e01b815260040160405180910390fd5b846040015163ffffffff1687820111156134155780856040015163ffffffff160396505b6101c854600160801b90046001600160801b0316801561345f5780831061344f57604051632f18066d60e01b815260040160405180910390fd5b80888401111561345f5782810397505b856060015163ffffffff1688880111156134835786866060015163ffffffff160397505b60008511801561349c57506101cd54610100900460ff16155b156134d1578482106134c157604051632f18066d60e01b815260040160405180910390fd5b8488830111156134d15781850397505b5060008881526101d0602090815260408083206001600160a01b038d16845290915290209087019055508490509695505050505050565b6114a8838360405180602001604052806000815250846146d0565b611f7c81336146ea565b6135378282611ffd565b611527576000828152610100602090815260408083206001600160a01b03851684529091529020805460ff191660011790556135703390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6135be8282611ffd565b15611527576000828152610100602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6127106001600160601b038216111561368a5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610d49565b6001600160a01b0382166136e05760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610d49565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217606555565b61372281612fb5565b61377e5760405162461bcd60e51b815260206004820152602760248201527f45524337323178797a3a20517565727920666f72206e6f6e6578697374656e7460448201526620746f6b656e2160c81b6064820152608401610d49565b600061378982611b84565b9050613796600083612fe8565b6001600160a01b038116600081815260d36020908152604080832080546001600160601b031981166001600160601b039182166000190190911617905585835260d0909152808220805460ff1916600190811790915560cd80549091019055518492907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000828161382e6128af565b90506014821115613852576040516373c2b52560e11b815260040160405180910390fd5b6101d154801580159061386457508185105b15613882576040516344ca163560e11b815260040160405180910390fd5b808511156138a3576040516307cc4d8f60e01b815260040160405180910390fd5b6138ae601483615852565b6138b88487615852565b11156138d75760405163c1eae7bb60e01b815260040160405180910390fd5b60008581526101cf602052604081205464ffffffffff1690849003613964574281116139165760405163bf4a806960e01b815260040160405180910390fd5b6101d18690556040517f842cd1905522b3731a39e0d2fb9d3757bc29b4e57e9253b230d437bf10505e9b90613950908a908a908a90615c4f565b60405180910390a185945050505050611c3d565b600088886000818110613979576139796158f4565b905060c0020180360381019061398f9190615d0a565b905060cc54816060015163ffffffff1610156139be57604051630e93fda160e21b815260040160405180910390fd5b4282111580156139cd57508115155b15613a2a57805164ffffffffff1682146139fa57604051632ca4094f60e21b815260040160405180910390fd5b42816020015164ffffffffff1611613a255760405163804491f960e01b815260040160405180910390fd5b613a55565b42816000015164ffffffffff1611613a555760405163667e606760e11b815260040160405180910390fd5b868581015b888214613a8e578a8a8a8403818110613a7557613a756158f4565b905060c00201803603810190613a8b9190615d0a565b92505b6101c85460608401516001600160801b0390911663ffffffff9091161115613ac95760405163bccc7e2360e01b815260040160405180910390fd5b826000015164ffffffffff16836020015164ffffffffff1611613aff57604051631131dc6b60e11b815260040160405180910390fd5b8115613b8f57600019820160009081526101cf6020526040902054606084015164ffffffffff600160281b8304169163ffffffff600160701b909104811691161015613b6557428110613b65576040516357be1d0d60e01b815260040160405180910390fd5b835164ffffffffff168110613b8d5760405163064f2b0760e31b815260040160405180910390fd5b505b60008281526101cf60209081526040918290208551815492870151938701516060880151608089015164ffffffffff93841669ffffffffffffffffffff1990961695909517600160281b93909616929092029490941767ffffffffffffffff60501b1916600160501b63ffffffff9586160263ffffffff60701b191617600160701b9490911693909302929092176001600160901b0316600160901b6001600160701b039092169190910217815560a084015160019182015590910190808210613a5a576101d18190556040517f842cd1905522b3731a39e0d2fb9d3757bc29b4e57e9253b230d437bf10505e9b90613c8d908d908d908d90615c4f565b60405180910390a19a9950505050505050505050565b6000610bbe8183611ffd565b60405163c3c5a54760e01b81526001600160a01b0384169063c3c5a54790613cdb903090600401614e39565b6020604051808303816000875af1158015613cfa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d1e91906157bb565b15613dbc578015613d8e57604051632cc5350560e21b81526001600160a01b0384169063b314d41490613d5790309086906004016157a1565b600060405180830381600087803b158015613d7157600080fd5b505af1158015613d85573d6000803e3d6000fd5b50505050505050565b604051630781ad2d60e21b81526001600160a01b03841690631e06b4b490613d5790309086906004016157a1565b8015613df057604051633e9f1edf60e11b81526001600160a01b03841690637d3e3dbe90613d5790309086906004016157a1565b6001600160a01b03821615613e2d5760405163a0af290360e01b81526001600160a01b0384169063a0af290390613d5790309086906004016157a1565b604051632210724360e11b81526001600160a01b03841690634420e48690613d57903090600401614e39565b610196546001600160a01b03163314611ce65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d49565b61019680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16613f2e5760405162461bcd60e51b8152600401610d4990615da4565b611527828261474e565b600054610100900460ff16611ce65760405162461bcd60e51b8152600401610d4990615da4565b600054610100900460ff16613f865760405162461bcd60e51b8152600401610d4990615da4565b611ce661478e565b816001600160a01b0316836001600160a01b031603613fef5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610d49565b6001600160a01b03838116600081815260d26020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60606001600160a01b0383163b6140c45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610d49565b600080846001600160a01b0316846040516140df9190615def565b600060405180830381855af49150503d806000811461411a576040519150601f19603f3d011682016040523d82523d6000602084013e61411f565b606091505b50915091506141478282604051806060016040528060278152602001615f5e602791396147bd565b95945050505050565b61415b848484613144565b614167848484846147f6565b610f395760405162461bcd60e51b8152600401610d4990615e0b565b6000613345868680806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506040516001600160601b0319606089901b166020820152603481018790528892506054019050604051602081830303815290604052805190602001206148f4565b6060816000036142215750506040805180820190915260018152600360fc1b602082015290565b8160005b811561424b578061423581615950565b91506142449050600a83615892565b9150614225565b6000816001600160401b0381111561426557614265614ef8565b6040519080825280601f01601f19166020018201604052801561428f576020820181803683370190505b5090505b841561313c576142a46001836157ee565b91506142b1600a86615e5d565b6142bc906030615852565b60f81b8183815181106142d1576142d16158f4565b60200101906001600160f81b031916908160001a9053506142f3600a86615892565b9450614293565b6000806141477f35fa4dcabfcae3f1b6e0c4c1ac43df02ba9cb39e2dcdc3d3f1b92a38118e3354868680519060200120868051906020012060405160200161332a94939291909384526001600160a01b039290921660208401526040830152606082015260800190565b600054610100900460ff1661438b5760405162461bcd60e51b8152600401610d4990615da4565b6001600160a01b0383163b156114a85782611b59818484613caf565b60006001600160e01b0319821663152a902d60e11b14806143d857506001600160e01b031982166380ac58cd60e01b145b806143f357506001600160e01b03198216635b5e139f60e01b145b80610bbe5750610bbe8261490a565b604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6020808301919091527f36cb08f6aafe2399767bf40e9642429d7535f40e61bd81428cad09095c5d337d828401527f06c015bd22b4c69690933c1058878ebdfef31f9aaae40bbe86d8a09fe1b2972c60608301524660808301523060a0808401919091528351808403909101815260c08301845280519082012061190160f01b60e084015260e2830181905261010280840186905284518085039091018152610122909301909352815191012060009190611c3d565b60008082516041036145135760208301516040840151606085015160001a6145078782858561493f565b9450945050505061147b565b5060009050600261147b565b600081600481111561453357614533615e71565b0361453b5750565b600181600481111561454f5761454f615e71565b036145975760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610d49565b60028160048111156145ab576145ab615e71565b036145f85760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610d49565b600381600481111561460c5761460c615e71565b036146645760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610d49565b600481600481111561467857614678615e71565b03611f7c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610d49565b6146db848483614a22565b61416760008560cc54856147f6565b6146f48282611ffd565b6115275761470c816001600160a01b03166014614b94565b614717836020614b94565b604051602001614728929190615e87565b60408051601f198184030181529082905262461bcd60e51b8252610d4991600401614e26565b600054610100900460ff166147755760405162461bcd60e51b8152600401610d4990615da4565b60ca6147818382615a58565b5060cb6114a88282615a58565b600054610100900460ff166147b55760405162461bcd60e51b8152600401610d4990615da4565b600161016455565b606083156147cc575081611c3d565b8251156147dc5782518084602001fd5b8160405162461bcd60e51b8152600401610d499190614e26565b60006001600160a01b0384163b156148ec57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061483a903390899088908890600401615ef6565b6020604051808303816000875af1925050508015614875575060408051601f3d908101601f1916820190925261487291810190615f29565b60015b6148d2573d8080156148a3576040519150601f19603f3d011682016040523d82523d6000602084013e6148a8565b606091505b5080516000036148ca5760405162461bcd60e51b8152600401610d4990615e0b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061313c565b50600161313c565b6000826149018584614d2f565b14949350505050565b60006001600160e01b0319821663152a902d60e11b1480610bbe57506301ffc9a760e01b6001600160e01b0319831614610bbe565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b0383111561496c5750600090506003614a19565b8460ff16601b1415801561498457508460ff16601c14155b156149955750600090506004614a19565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156149e9573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116614a1257600060019250925050614a19565b9150600090505b94509492505050565b6001600160a01b038316614a785760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610d49565b60cc8054838101918290556001600160a01b038516600090815260d36020526040902080546001600160601b038082168701166001600160601b0319909116179055908215614b17576001600160a01b038516600090815260d36020526040902080546001600160601b03808216600160601b92839004821688019091169091026001600160c01b031617600160c01b6001600160401b038616021790555b600081815260cf6020526040902080546001600160a01b0319166001600160a01b03871617905560018281019082015b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4816001019150808210614b4757505050610f39565b60606000614ba3836002615865565b614bae906002615852565b6001600160401b03811115614bc557614bc5614ef8565b6040519080825280601f01601f191660200182016040528015614bef576020820181803683370190505b509050600360fc1b81600081518110614c0a57614c0a6158f4565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110614c3957614c396158f4565b60200101906001600160f81b031916908160001a9053506000614c5d846002615865565b614c68906001615852565b90505b6001811115614ce0576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110614c9c57614c9c6158f4565b1a60f81b828281518110614cb257614cb26158f4565b60200101906001600160f81b031916908160001a90535060049490941c93614cd981615f46565b9050614c6b565b508315611c3d5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610d49565b600081815b845181101561336b57614d6082868381518110614d5357614d536158f4565b6020026020010151614d74565b915080614d6c81615950565b915050614d34565b6000818310614d90576000828152602084905260409020611c3d565b6000838152602083905260409020611c3d565b6001600160e01b031981168114611f7c57600080fd5b600060208284031215614dcb57600080fd5b8135611c3d81614da3565b60005b83811015614df1578181015183820152602001614dd9565b50506000910152565b60008151808452614e12816020860160208601614dd6565b601f01601f19169290920160200192915050565b602081526000611c3d6020830184614dfa565b6001600160a01b0391909116815260200190565b600060208284031215614e5f57600080fd5b5035919050565b6001600160a01b0381168114611f7c57600080fd5b8035614e8681614e66565b919050565b60008060408385031215614e9e57600080fd5b8235614ea981614e66565b946020939093013593505050565b600080600060608486031215614ecc57600080fd5b8335614ed781614e66565b92506020840135614ee781614e66565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614f3657614f36614ef8565b604052919050565b60006001600160401b03821115614f5757614f57614ef8565b50601f01601f191660200190565b600082601f830112614f7657600080fd5b8135614f89614f8482614f3e565b614f0e565b818152846020838601011115614f9e57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215614fd357600080fd5b85356001600160401b03811115614fe957600080fd5b614ff588828901614f65565b955050602086013593506040860135925060608601359150608086013561501b81614e66565b809150509295509295909350565b6000806040838503121561503c57600080fd5b50508035926020909101359150565b6000806040838503121561505e57600080fd5b82359150602083013561507081614e66565b809150509250929050565b80356001600160601b0381168114614e8657600080fd5b600080604083850312156150a557600080fd5b82356150b081614e66565b91506150be6020840161507b565b90509250929050565b60008083601f8401126150d957600080fd5b5081356001600160401b038111156150f057600080fd5b60208301915083602060c08302850101111561147b57600080fd5b60008060006040848603121561512057600080fd5b83356001600160401b0381111561513657600080fd5b615142868287016150c7565b909790965060209590950135949350505050565b80356001600160801b0381168114614e8657600080fd5b60006020828403121561517f57600080fd5b611c3d82615156565b8015158114611f7c57600080fd5b6000806000606084860312156151ab57600080fd5b83356151b681614e66565b925060208401356151c681614e66565b915060408401356151d681615188565b809150509250925092565b6000602082840312156151f357600080fd5b8135611c3d81614e66565b60008060006060848603121561521357600080fd5b833561521e81614e66565b925060208401356151c681615188565b6000806040838503121561524157600080fd5b823561524c81614e66565b9150602083013561507081615188565b60008083601f84011261526e57600080fd5b5081356001600160401b0381111561528557600080fd5b6020830191508360208260051b850101111561147b57600080fd5b600080602083850312156152b357600080fd5b82356001600160401b038111156152c957600080fd5b6152d58582860161525c565b90969095509350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561533657603f19888603018452615324858351614dfa565b94509285019290850190600101615308565b5092979650505050505050565b6000806000806080858703121561535957600080fd5b843561536481614e66565b9350602085013561537481614e66565b92506040850135915060608501356001600160401b0381111561539657600080fd5b6153a287828801614f65565b91505092959194509250565b6000806000806000608086880312156153c657600080fd5b85356001600160401b038111156153dc57600080fd5b6153e88882890161525c565b9096509450506020860135925060408601359150606086013561501b81614e66565b60006001600160401b0382111561542357615423614ef8565b5060051b60200190565b600082601f83011261543e57600080fd5b8135602061544e614f848361540a565b82815260059290921b8401810191818101908684111561546d57600080fd5b8286015b8481101561549157803561548481614e66565b8352918301918301615471565b509695505050505050565b600080604083850312156154af57600080fd5b82356001600160401b038111156154c557600080fd5b6154d18582860161542d565b95602094909401359450505050565b6000806000606084860312156154f557600080fd5b83356001600160401b038082111561550c57600080fd5b61551887838801614f65565b9450602086013591508082111561552e57600080fd5b61553a87838801614f65565b9350604086013591508082111561555057600080fd5b5061555d86828701614f65565b9150509250925092565b6000806040838503121561557a57600080fd5b823561558581614e66565b9150602083013561507081614e66565b600082601f8301126155a657600080fd5b813560206155b6614f848361540a565b82815260059290921b840181019181810190868411156155d557600080fd5b8286015b848110156154915780356001600160401b038111156155f85760008081fd5b6156068986838b0101614f65565b8452509183019183016155d9565b60008060008060008060008060008060006101408c8e03121561563657600080fd5b61563f8c615156565b9a506001600160401b038060208e0135111561565a57600080fd5b61566a8e60208f01358f01614f65565b9a508060408e0135111561567d57600080fd5b61568d8e60408f01358f01614f65565b995061569b60608e01614e7b565b98508060808e013511156156ae57600080fd5b6156be8e60808f01358f01615595565b97506156cc60a08e0161507b565b96506156da60c08e01615156565b95508060e08e013511156156ed57600080fd5b6156fd8e60e08f01358f0161542d565b945061570c6101008e01614e7b565b9350806101208e0135111561572057600080fd5b506157328d6101208e01358e016150c7565b81935080925050509295989b509295989b9093969950565b600181811c9082168061575e57607f821691505b60208210810361577e57634e487b7160e01b600052602260045260246000fd5b50919050565b60006020828403121561579657600080fd5b8151611c3d81614e66565b6001600160a01b0392831681529116602082015260400190565b6000602082840312156157cd57600080fd5b8151611c3d81615188565b634e487b7160e01b600052601160045260246000fd5b81810381811115610bbe57610bbe6157d8565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b80820180821115610bbe57610bbe6157d8565b8082028115828204841417610bbe57610bbe6157d8565b634e487b7160e01b600052601260045260246000fd5b6000826158a1576158a161587c565b500490565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261592157600080fd5b8301803591506001600160401b0382111561593b57600080fd5b60200191503681900382131561147b57600080fd5b600060018201615962576159626157d8565b5060010190565b6000606082018583526020858185015260606040850152818551808452608086019150828701935060005b818110156159b95784516001600160a01b031683529383019391830191600101615994565b509098975050505050505050565b600084516159d9818460208901614dd6565b8451908301906159ed818360208901614dd6565b8451910190615a00818360208801614dd6565b0195945050505050565b601f8211156114a857600081815260208120601f850160051c81016020861015615a315750805b601f850160051c820191505b81811015615a5057828155600101615a3d565b505050505050565b81516001600160401b03811115615a7157615a71614ef8565b615a8581615a7f845461574a565b84615a0a565b602080601f831160018114615aba5760008415615aa25750858301515b600019600386901b1c1916600185901b178555615a50565b600085815260208120601f198616915b82811015615ae957888601518255948401946001909101908401615aca565b5085821015615b075787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000602080835260008454615b2b8161574a565b80848701526040600180841660008114615b4c5760018114615b6657615b94565b60ff1985168984015283151560051b890183019550615b94565b896000528660002060005b85811015615b8c5781548b8201860152908301908801615b71565b8a0184019650505b509398975050505050505050565b600060208284031215615bb457600080fd5b81516001600160401b03811115615bca57600080fd5b8201601f81018413615bdb57600080fd5b8051615be9614f8482614f3e565b818152856020838501011115615bfe57600080fd5b614147826020830160208601614dd6565b803564ffffffffff81168114614e8657600080fd5b803563ffffffff81168114614e8657600080fd5b80356001600160701b0381168114614e8657600080fd5b6040808252818101849052600090606080840187845b88811015615cf45764ffffffffff80615c7d84615c0f565b168452602081615c8e828601615c0f565b169085015250615c9f828601615c24565b63ffffffff8082168786015280615cb7878601615c24565b1686860152505060806001600160701b03615cd3828501615c38565b169084015260a0828101359084015260c09283019290910190600101615c65565b5050809350505050826020830152949350505050565b600060c08284031215615d1c57600080fd5b60405160c081018181106001600160401b0382111715615d3e57615d3e614ef8565b604052615d4a83615c0f565b8152615d5860208401615c0f565b6020820152615d6960408401615c24565b6040820152615d7a60608401615c24565b6060820152615d8b60808401615c38565b608082015260a083013560a08201528091505092915050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008251615e01818460208701614dd6565b9190910192915050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600082615e6c57615e6c61587c565b500690565b634e487b7160e01b600052602160045260246000fd5b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b815260008351615eb9816017850160208801614dd6565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615eea816028840160208801614dd6565b01602801949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061334590830184614dfa565b600060208284031215615f3b57600080fd5b8151611c3d81614da3565b600081615f5557615f556157d8565b50600019019056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564fd63b67fde00b77f1f54f050135a475665b815acd10a8e7fd785ba074846734aa2646970667358221220d5868bdbcfd41b386870f87bce8365c42280db6d6c2b4d61a2a11adc08bb1c6864736f6c63430008110033