ETH Price: $2,294.02 (-2.13%)
Gas: 1.69 Gwei

Contract

0xF3DA33D7cba648B07080bB753C0f0375921ff24F
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040149897172022-06-19 8:06:28811 days ago1655625988IN
 Create: CollectionA
0 ETH0.081540319

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CollectionA

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 32 : CollectionA.sol
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2022 Simplr
pragma solidity 0.8.11;

import "./modules/AffiliableA.sol";
import "../interface/ICollectionStruct.sol";
import "./ContractMetadata.sol";

/// @title CollectionA
/// @author Chain Labs
/// @notice Main contract that is made up of building blocks and is ready to be used that extends the affiliate functionality.
/// @dev Inherits all the modules and base collection
contract CollectionA is ICollectionStruct, AffiliableA, ContractMetadata {
    /// @notice setup collection
    /// @dev setup all the modules and base collection
    /// @param _baseCollection struct conatining setup parameters of base collection
    /// @param _presaleable struct conatining setup parameters of presale module
    /// @param _paymentSplitter struct conatining setup parameters of payment splitter module
    /// @param _projectURIProvenance provenance of revealed project URI
    /// @param _royalties struct conatining setup parameters of royalties module
    /// @param _reserveTokens number of tokens to be reserved
    function setup(
        BaseCollectionStruct memory _baseCollection,
        PresaleableStruct memory _presaleable,
        PaymentSplitterStruct memory _paymentSplitter,
        bytes32 _projectURIProvenance,
        RoyaltyInfo memory _royalties,
        uint256 _reserveTokens
    ) external {
        _setup(
            _baseCollection,
            _presaleable,
            _paymentSplitter,
            _projectURIProvenance,
            _royalties,
            _reserveTokens
        );
    }

    /// @notice setup collection with affiliate module
    /// @dev setup all the modules and base collection including affiliate module
    /// @param _baseCollection struct conatining setup parameters of base collection
    /// @param _presaleable struct conatining setup parameters of presale module
    /// @param _paymentSplitter struct conatining setup parameters of payment splitter module
    /// @param _projectURIProvenance provenance of revealed project URI
    /// @param _royalties struct conatining setup parameters of royalties module
    /// @param _reserveTokens number of tokens to be reserved
    /// @param _registry address of Simplr Affiliate registry
    /// @param _projectId project ID of Simplr Collection
    function setupWithAffiliate(
        BaseCollectionStruct memory _baseCollection,
        PresaleableStruct memory _presaleable,
        PaymentSplitterStruct memory _paymentSplitter,
        bytes32 _projectURIProvenance,
        RoyaltyInfo memory _royalties,
        uint256 _reserveTokens,
        IAffiliateRegistry _registry,
        bytes32 _projectId
    ) external {
        _setup(
            _baseCollection,
            _presaleable,
            _paymentSplitter,
            _projectURIProvenance,
            _royalties,
            _reserveTokens
        );
        _setAffiliateModule(_registry, _projectId);
    }

    /// @notice internal method to setup collection
    /// @dev internal method to setup all the modules and base collection
    /// @param _baseCollection struct conatining setup parameters of base collection
    /// @param _presaleable struct conatining setup parameters of presale module
    /// @param _paymentSplitter struct conatining setup parameters of payment splitter module
    /// @param _projectURIProvenance provenance of revealed project URI
    /// @param _royalties struct conatining setup parameters of royalties module
    /// @param _reserveTokens number of tokens to be reserved
    function _setup(
        BaseCollectionStruct memory _baseCollection,
        PresaleableStruct memory _presaleable,
        PaymentSplitterStruct memory _paymentSplitter,
        bytes32 _projectURIProvenance,
        RoyaltyInfo memory _royalties,
        uint256 _reserveTokens
    ) private initializer {
        setupBaseCollection(
            _baseCollection.name,
            _baseCollection.symbol,
            _baseCollection.admin,
            _baseCollection.maximumTokens,
            _baseCollection.maxPurchase,
            _baseCollection.maxHolding,
            _baseCollection.price,
            _baseCollection.publicSaleStartTime,
            _baseCollection.projectURI
        );
        setupPresale(
            _presaleable.presaleReservedTokens,
            _presaleable.presalePrice,
            _presaleable.presaleStartTime,
            _presaleable.presaleMaxHolding,
            _presaleable.presaleWhitelist
        );
        setupPaymentSplitter(
            _paymentSplitter.simplr,
            _paymentSplitter.simplrShares,
            _paymentSplitter.payees,
            _paymentSplitter.shares
        );
        setProvenance(_projectURIProvenance);
        _setReserveTokens(_reserveTokens);
        _setRoyalties(_royalties);
    }
}

File 2 of 32 : AffiliableA.sol
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2022 Simplr
pragma solidity 0.8.11;

import "./RoyaltiesA.sol";
import "../../../affiliate/Affiliate.sol";

/// @title AffiliableA
/// @author Chain Labs
/// @notice Module that adds functionality of affiliate.
/// @dev Uses Simplr Affiliate Infrastructure
contract AffiliableA is RoyaltiesA, Affiliate {
    //------------------------------------------------------//
    //
    //  Modifiers
    //
    //------------------------------------------------------//

    modifier affiliatePurchase(bytes memory _signature, address _affiliate) {
        _;
        _transferAffiliateShare(_signature, _affiliate, msg.value);
    }

    //------------------------------------------------------//
    //
    //  Public function
    //
    //------------------------------------------------------//

    /// @notice Buy using Affiliate shares
    /// @dev Transfers the affiliate share directly to affiliate address
    /// @param _receiver address of buyer
    /// @param _quantity number of tokens to be bought
    /// @param _signature unique signature of affiliate
    /// @param _affiliate address of affiliate
    function affiliateBuy(
        address _receiver,
        uint256 _quantity,
        bytes memory _signature,
        address _affiliate
    ) external payable virtual affiliatePurchase(_signature, _affiliate) {
        _buy(_receiver, _quantity);
    }

    /// @notice presale buy using Affiliate shares
    /// @dev Transfers the affiliate share directly to affiliate address
    /// @param _proofs merkle proof for whitelist
    /// @param _receiver address of buyer
    /// @param _quantity number of tokens to be bought
    /// @param _signature unique signature of affiliate
    /// @param _affiliate address of affiliate
    function affiliatePresaleBuy(
        bytes32[] calldata _proofs,
        address _receiver,
        uint256 _quantity,
        bytes memory _signature,
        address _affiliate
    ) external payable virtual affiliatePurchase(_signature, _affiliate) {
        _presaleBuy(_proofs, _receiver, _quantity);
    }

    /// @notice is affiliate module active or not
    /// @dev once set, it cannot be updated
    /// @return boolean checks if affiliate module is active or not
    function isAffiliateModuleInitialised() external view returns (bool) {
        return _isAffiliateModuleInitialised();
    }
}

File 3 of 32 : ICollectionStruct.sol
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2022 Simplr
pragma solidity 0.8.11;

/**
 * @title Collection Struct Interface
 * @dev   interface to for all the struct required for setup parameters.
 * @author Chain Labs Team
 */
/// @title Collection Struct Interface
/// @author Chain Labs
/// @notice interface for all the struct required for setup parameters.
interface ICollectionStruct {
    struct BaseCollectionStruct {
        string name;
        string symbol;
        address admin;
        uint256 maximumTokens;
        uint16 maxPurchase;
        uint16 maxHolding;
        uint256 price;
        uint256 publicSaleStartTime;
        string projectURI;
    }

    struct Whitelist {
        bytes32 root;
        string cid;
    }

    struct PresaleableStruct {
        uint256 presaleReservedTokens;
        uint256 presalePrice;
        uint256 presaleStartTime;
        uint256 presaleMaxHolding;
        Whitelist presaleWhitelist;
    }

    struct PaymentSplitterStruct {
        address simplr;
        uint256 simplrShares;
        address[] payees;
        uint256[] shares;
    }
}

File 4 of 32 : ContractMetadata.sol
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2022 Simplr
pragma solidity 0.8.11;

/// @title Contract Metadata
/// @author Chain Labs
/// @notice Stores important constant values of contract metadata
/// @dev constants that can help identify the collection type and version
contract ContractMetadata {
    /// @notice Contract Name
    /// @dev State used to identify the collection type
    /// @return CONTRACT_NAME name of contract type as string
    string public constant CONTRACT_NAME = "CollectionA";

    /// @notice Version
    /// @dev State used to identify the collection version
    /// @return VERSION version of contract as string
    string public constant VERSION = "0.1.0"; // contract version
}

File 5 of 32 : RoyaltiesA.sol
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2022 Simplr
pragma solidity ^0.8.11;

import "./ReserveableA.sol";
import "@openzeppelin/contracts-upgradeable/token/common/ERC2981Upgradeable.sol";

/// @title RoyaltiesA
/// @author Chain Labs
/// @notice Module that adds functionality of royalties as required by EIP-2981.
/// @dev Core functionality inherited from OpenZeppelin's ERC2981
contract RoyaltiesA is ReserveableA, ERC2981Upgradeable {
    /// @notice event that logs updated royalties info
    /// @dev emits updated royalty receiver and royalty share fraction
    /// @param receiver address that should receive royalty
    /// @param royaltyFraction fraction that should be sent to receiver
    event DefaultRoyaltyUpdated(address receiver, uint96 royaltyFraction);

    //------------------------------------------------------//
    //
    //  Setup
    //
    //------------------------------------------------------//

    /// @notice set royalties, only one address can receive the royalties, considers 10000 = 100%
    /// @dev only owner can set royalties
    /// @param _royalties a struct with royalties receiver and royalties share
    function setRoyalties(RoyaltyInfo memory _royalties) public onlyOwner {
        _setRoyalties(_royalties);
    }

    //------------------------------------------------------//
    //
    //  Public function
    //
    //------------------------------------------------------//

    /// @inheritdoc	ERC721AUpgradeable
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(ERC721AUpgradeable, ERC2981Upgradeable)
        returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }

    //------------------------------------------------------//
    //
    //  Internal function
    //
    //------------------------------------------------------//

    /// @notice set default royalties, considers 10000 = 100%
    /// @dev internl method to set royalties
    /// @param _royalties a struct with royalties receiver and royalties share
    function _setRoyalties(RoyaltyInfo memory _royalties) internal {
        _setDefaultRoyalty(_royalties.receiver, _royalties.royaltyFraction);
        emit DefaultRoyaltyUpdated(
            _royalties.receiver,
            _royalties.royaltyFraction
        );
    }
}

File 6 of 32 : Affiliate.sol
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2022 Simplr
pragma solidity 0.8.11;

import "./IAffiliateRegistry.sol";
import "@openzeppelin/contracts/utils/Address.sol";

/**
 * @title Affiliate
 * @dev   Contract that can be inherited to make any contract interact with AffiliateRegistry.
 * @author Chain Labs Team
 */
contract Affiliate {
    IAffiliateRegistry private _affiliateRegistry;
    bytes32 private _projectId;

    event AffiliateShareTransferred(
        address indexed affiliate,
        bytes32 indexed project,
        uint256 value
    );

    function getAffiliateRegistry() public view returns (IAffiliateRegistry) {
        return _affiliateRegistry;
    }

    function getProjectId() public view returns (bytes32) {
        return _projectId;
    }

    function _setAffiliateModule(
        IAffiliateRegistry newRegistry,
        bytes32 projectId
    ) internal {
        require(
            address(newRegistry) != address(0),
            "Affiliate: Registry cannot be null address"
        );
        require(projectId != bytes32(0), "Affiliate: zero project id");
        _affiliateRegistry = newRegistry;
        _projectId = projectId;
    }

    function _setProjectId(bytes32 projectId) internal {
        require(projectId != bytes32(0), "Affiliate: zero project id");
        _projectId = projectId;
    }

    function _transferAffiliateShare(
        bytes memory signature,
        address affiliate,
        uint256 value
    ) internal {
        require(_isAffiliateModuleInitialised(), "Affiliate: not initialised");
        bool isAffiliate;
        uint256 shareValue;
        (isAffiliate, shareValue) = _affiliateRegistry.getAffiliateShareValue(
            signature,
            affiliate,
            _projectId,
            value
        );
        if (isAffiliate) {
            Address.sendValue(payable(affiliate), shareValue);
            emit AffiliateShareTransferred(affiliate, _projectId, shareValue);
        }
    }

    function _isAffiliateModuleInitialised() internal view returns (bool) {
        return
            _projectId != bytes32(0) &&
            address(_affiliateRegistry) != address(0);
    }
}

File 7 of 32 : ReserveableA.sol
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2022 Simplr
pragma solidity 0.8.11;

import "./RevealableA.sol";

/// @title ReserveableA
/// @author Chain Labs
/// @notice Module that adds functionality of reserving tokens from sale. Reserved tokens cannot be bought.
/// @dev Reserves tokens from token ID 1, mints them on demand
contract ReserveableA is RevealableA {
    //------------------------------------------------------//
    //
    //  Owner only functions
    //
    //------------------------------------------------------//

    /// @notice mint tokens to be reserved
    /// @dev  mint tokens to owner account to be reserved
    /// @param _reserveTokens number of tokens to be reserved
    function reserveTokens(uint256 _reserveTokens) external onlyOwner {
        _setReserveTokens(_reserveTokens);
    }

    /// @notice mint tokens to be reserved
    /// @dev internal method to mint tokens to owner account to be reserved
    /// @param _reserveTokens number of tokens to be reserved
    function _setReserveTokens(uint256 _reserveTokens) internal {
        require(
            _reserveTokens + reservedTokens + presaleReservedTokens <=
                maximumTokens,
            "RS:002"
        );
        if (_reserveTokens > 0) {
            reservedTokens += _reserveTokens;
            _safeMint(owner(), _reserveTokens);
        }
    }
}

File 8 of 32 : ERC2981Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.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:
     *
     * - `tokenId` must be already minted.
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setTokenRoyalty(
        uint256 tokenId,
        address receiver,
        uint96 feeNumerator
    ) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: Invalid parameters");

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

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

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

File 9 of 32 : RevealableA.sol
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2022 Simplr
pragma solidity 0.8.11;

import "./PresaleableA.sol";

/// @title RevealableA
/// @author Chain Labs
/// @notice Module that adds functionality of revealing tokens.
/// @dev Handles revealing and structuring project URI
contract RevealableA is PresaleableA {
    using StringsUpgradeable for uint256;
    //------------------------------------------------------//
    //
    //  Storage
    //
    //------------------------------------------------------//
    /// @notice checks if collection is revealable or not
    /// @dev state that shows if Revealable module is active or not
    /// @return isRevealable checks if collection is revealable or not
    bool public isRevealable; // is the collection revealable

    /// @notice checks if collection is revealed or not
    /// @dev state that shows if collection is revealed
    /// @return isRevealed checks if collection is revealed or not
    bool public isRevealed; // is the collection revealed

    /// @notice provenance of final IPFS CID
    /// @dev keccak256 hash of final IPFS CID
    /// @return projectURIProvenance hash of revealed IPFS CID
    bytes32 public projectURIProvenance; // hash to make sure that Project URI dosen't change

    //------------------------------------------------------//
    //
    //  Owner only functions
    //
    //------------------------------------------------------//

    /// @notice set provenance of the collection
    /// @dev keccak hash of IPFS CID is done off chain and passed in as parameter
    /// @param _projectURIProvenance keccak256 hash of final IPFS CID
    function setProvenance(bytes32 _projectURIProvenance) internal {
        if (_projectURIProvenance != keccak256(abi.encode(projectURI))) {
            isRevealable = true;
            projectURIProvenance = _projectURIProvenance;
        } else {
            isRevealed = true;
        }
    }

    /// @notice Reveal and update Project URI
    /// @dev Reveal and update Project URI
    /// @param _projectURI new project URI
    function setProjectURIAndReveal(string memory _projectURI)
        external
        onlyOwner
    {
        require(isRevealable, "Revealable: non revealable");
        isRevealed = true;
        projectURI = _projectURI;
    }

    /// @notice set new project URI
    /// @dev set new project URI
    /// @param _projectURI new project URI
    function setProjectURI(string memory _projectURI) external onlyOwner {
        projectURI = _projectURI;
    }

    //------------------------------------------------------//
    //
    //  Public function
    //
    //------------------------------------------------------//

    /// @inheritdoc	ERC721AUpgradeable
    function tokenURI(uint256 tokenId)
        public
        view
        virtual
        override
        returns (string memory)
    {
        require(_exists(tokenId), "R:004");
        string memory baseURI = _baseURI();
        return
            isRevealable
                ? isRevealed
                    ? string(
                        abi.encodePacked(baseURI, tokenId.toString(), ".json")
                    )
                    : baseURI
                : string(
                    abi.encodePacked(baseURI, tokenId.toString(), ".json")
                );
    }
}

File 10 of 32 : PresaleableA.sol
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2022 Simplr
pragma solidity 0.8.11;

import "./PaymentSplitableA.sol";
import "../../interface/ICollectionStruct.sol";
import "@openzeppelin/contracts-upgradeable/utils/cryptography/MerkleProofUpgradeable.sol";

/// @title PresaleableA
/// @author Chain Labs
/// @notice Module that adds functionality of presale with an optional whitelist presale.
/// @dev Uses merkle proofs for whitelist
contract PresaleableA is PaymentSplitableA, ICollectionStruct {
    //------------------------------------------------------//
    //
    //  Storage
    //
    //------------------------------------------------------//
    /// @notice merkle root of tree generated from whitelisted addresses
    /// @dev list is stored on IPFS and CID is stored in the state
    /// @return merkleRoot merkle root
    bytes32 public merkleRoot;

    /// @notice CID of file containing list of whitelisted addresses
    /// @dev IPFS CID of JSON file with list of addresses
    /// @return whitelistCid IPFS CID
    string public whitelistCid;

    /// @notice tokens to be sold in presale
    /// @dev maximum tokens to be sold in presale, if not sold, will be rolled over to public sale
    /// @return presaleReservedTokens tokens to be sold in presale
    uint256 public presaleReservedTokens; // number of tokens reserved for presale

    /// @notice maximum tokens an account can buy/mint during presale
    /// @dev maximum tokens an account can buy/mint during presale
    /// @return presaleMaxHolding maximum tokens an account can hold during presale
    uint256 public presaleMaxHolding; // number of tokens a collector can hold during presale

    /// @notice price per token during presale
    /// @dev price per token during presale
    /// @return presalePrice price per token during presale
    uint256 public presalePrice; // price of token during presale

    /// @notice timestamp when presale starts
    /// @dev presale starts automatically at this time and ends when public sale starts
    /// @return presaleStartTime timestamp when presale starts
    uint256 public presaleStartTime; // presale start timestamp

    /// @notice logs updated whitelist details
    /// @dev emitted when whitelist updated, logs new merkle root and IPFS CID
    /// @param root updated merkle root generated from new list of whitelisted addresses
    /// @param cid IPFS CID containing updated list of whitelist addresses
    event WhitelistUpdated(bytes32 root, string cid); // emitted when whitelist is updated

    //------------------------------------------------------//
    //
    //  Modifiers
    //
    //------------------------------------------------------//

    modifier presaleAllowed() {
        require(isPresaleAllowed(), "PR:001");
        _;
    }

    //------------------------------------------------------//
    //
    //  Setup
    //
    //------------------------------------------------------//

    /// @notice setup presale details including whitelist
    /// @dev internal method and can only be invoked when Collection is being setup
    /// @param _presaleReservedTokens maximum number of tokens to be sold in presale
    /// @param _presalePrice price per token during presale
    /// @param _presaleStartTime timestamp when presale starts
    /// @param _presaleMaxHolding maximum tokens and account can hold during presale
    /// @param _presaleWhitelist struct containing whitelist details
    function setupPresale(
        uint256 _presaleReservedTokens,
        uint256 _presalePrice,
        uint256 _presaleStartTime,
        uint256 _presaleMaxHolding,
        Whitelist memory _presaleWhitelist
    ) internal {
        if (_presaleStartTime != 0) {
            require(_presaleReservedTokens != 0, "PR:002");
            require(_presaleStartTime > block.timestamp, "PR:003");
            require(_presaleMaxHolding != 0, "PR:004");
            presaleReservedTokens = _presaleReservedTokens;
            presalePrice = _presalePrice;
            presaleStartTime = _presaleStartTime;
            presaleMaxHolding = _presaleMaxHolding;
            if (!(_presaleWhitelist.root == bytes32(0))) {
                _setWhitelist(_presaleWhitelist);
            }
        }
    }

    //------------------------------------------------------//
    //
    //  Owner only functions
    //
    //------------------------------------------------------//

    /// @notice set new sale start time for presale and public sale
    /// @dev single method to set timestamp for public sale and presale
    /// @param _newSaleStartTime new timestamp
    /// @param saleType sale type, true - set for public sale, when saleType is false - set for presale
    function setSaleStartTime(uint256 _newSaleStartTime, bool saleType)
        external
        onlyOwner
    {
        if (saleType) {
            require(
                _newSaleStartTime > block.timestamp &&
                    _newSaleStartTime != publicSaleStartTime &&
                    _newSaleStartTime > presaleStartTime,
                "BC:006"
            );
            publicSaleStartTime = _newSaleStartTime;
        } else {
            require(
                _newSaleStartTime > block.timestamp &&
                    _newSaleStartTime != presaleStartTime &&
                    _newSaleStartTime < publicSaleStartTime,
                "PR:008"
            );
            presaleStartTime = _newSaleStartTime;
        }
    }

    /// @notice update whitelist
    /// @dev update whitelist merkle root and IPFS CID
    /// @param _whitelist struct containing new whitelist details
    function updateWhitelist(Whitelist memory _whitelist)
        external
        onlyOwner
        presaleAllowed
    {
        _setWhitelist(_whitelist);
    }

    //------------------------------------------------------//
    //
    //  Public function
    //
    //------------------------------------------------------//

    /// @notice buy tokens during presale
    /// @dev checks for whitelist and mints tokens to buyer
    /// @param _proofs array of merkle proofs to validate if user is whitelisted
    /// @param _buyer address of buyer
    /// @param _quantity amount of tokens to be bought
    function presaleBuy(
        bytes32[] calldata _proofs,
        address _buyer,
        uint256 _quantity
    ) external payable virtual {
        _presaleBuy(_proofs, _buyer, _quantity);
    }

    /// @notice get whitelist details
    /// @dev get whitelist merkle root and IPFS CID
    /// @return whitelist struct conatining whitelist details
    function getPresaleWhitelists()
        external
        view
        presaleAllowed
        returns (Whitelist memory whitelist)
    {
        return Whitelist(merkleRoot, whitelistCid);
    }

    /// @notice check if an address is whitelist or not
    /// @dev uses merkle proof to validate if account is whitelisted or not
    /// @param _proofs array of merkle proofs
    /// @param _account address which needs to be validated
    /// @return boolean is address whitelisted or not
    function isWhitelisted(bytes32[] calldata _proofs, address _account)
        public
        view
        returns (bool)
    {
        return _isWhitelisted(_proofs, _account);
    }

    /// @notice check if presale module is active or not
    /// @dev checks if presale module is active or not
    /// @return boolean is presale module active or not
    function isPresaleAllowed() public view returns (bool) {
        return presaleReservedTokens > 0;
    }

    /// @notice check if presale is whitelisted or not
    /// @dev if whitelisted, presale buy will check for whitelist else not
    /// @return boolean is presale whitelisted
    function isPresaleWhitelisted() public view returns (bool) {
        return isPresaleAllowed() && merkleRoot != bytes32(0);
    }

    /// @notice check if presale is live or not
    /// @dev only when presale active, tokens can be bought
    /// @return boolean is presale active or not
    function isPresaleActive() public view returns (bool) {
        return
            block.timestamp > presaleStartTime &&
            totalSupply() - reservedTokens < presaleReservedTokens &&
            block.timestamp < publicSaleStartTime;
    }

    //------------------------------------------------------//
    //
    //  Internal function
    //
    //------------------------------------------------------//

    /// @notice internal method to buy tokens during presale
    /// @dev invoked by presaleBuy and affiliatePresaleBuy
    /// @param _proofs array of merkle proofs to validate if user is whitelisted
    /// @param _buyer address of buyer
    /// @param _quantity amount of tokens to be bought
    function _presaleBuy(
        bytes32[] calldata _proofs,
        address _buyer,
        uint256 _quantity
    ) internal whenNotPaused presaleAllowed {
        require(isPresaleActive(), "PR:009");
        require(
            isPresaleWhitelisted() ? _isWhitelisted(_proofs, _buyer) : true,
            "PR:011"
        );
        require(
            totalSupply() - reservedTokens + _quantity <= presaleReservedTokens,
            "PR:013"
        );
        require(msg.value == (presalePrice * _quantity), "PR:010");
        require(_quantity <= maxPurchase, "PR:014");
        require(balanceOf(_buyer) + _quantity <= presaleMaxHolding, "PR:012");
        _manufacture(_buyer, _quantity);
    }

    /// @notice internal method to check if account if whitelisted or not
    /// @dev internally invoked by presale buy and isWhitelisted
    /// @param _proofs array of merkle proofs to validate if user is whitelisted
    /// @param _account address of buyer
    /// @return boolean is address whitelisted or not
    function _isWhitelisted(bytes32[] calldata _proofs, address _account)
        private
        view
        returns (bool)
    {
        bytes32 leaf = keccak256(abi.encodePacked(_account));
        return MerkleProofUpgradeable.verify(_proofs, merkleRoot, leaf);
    }

    /// @notice internal method to update whitelist details
    /// @dev invoked by updateWhitelist and setup
    /// @param _whitelist struct containing whitelist details
    function _setWhitelist(Whitelist memory _whitelist) private {
        merkleRoot = _whitelist.root;
        whitelistCid = _whitelist.cid;
        emit WhitelistUpdated(_whitelist.root, _whitelist.cid);
    }
}

File 11 of 32 : PaymentSplitableA.sol
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2022 Simplr
pragma solidity 0.8.11;

import "@openzeppelin/contracts-upgradeable/finance/PaymentSplitterUpgradeable.sol";
import "../base/BaseCollectionA.sol";

/// @title Payment SplitableA
/// @author Chain Labs
/// @notice Module that adds functionality of payment splitting
/// @dev Core functionality inherited from OpenZeppelin's Payment Splitter
contract PaymentSplitableA is BaseCollectionA, PaymentSplitterUpgradeable {
    //------------------------------------------------------//
    //
    //  Storage
    //
    //------------------------------------------------------//
    /// @notice Shares of Simplr in the sale
    /// @dev percentage (eg. 100% - 10^18) of simplr in the sale
    /// @return SIMPLR_SHARES shares of simplr currently set to 0.0000000000000001%
    uint256 public SIMPLR_SHARES; // share of Simplr

    /// @notice address of Simplr's Fee receiver
    /// @dev Gnosis Safe Simplr Fee Receiver
    /// @return SIMPLR_RECEIVER_ADDRESS address that will receive fee i.e. Simplr Shares
    address public SIMPLR_RECEIVER_ADDRESS; // address of SIMPLR to receive shares

    //------------------------------------------------------//
    //
    //  Setup
    //
    //------------------------------------------------------//

    /// @notice setup payment splitting details for collection
    /// @dev internal method and only be invoked once during setup
    /// @param _simplr address of simplr beneficicary address
    /// @param _simplrShares percentage share of simplr, eg. 15% = parseUnits(15,16) or toWei(0.15) or 15*10^16
    /// @param _payees array of payee address
    /// @param _shares array of payee shares, index for both arrays should match for a payee
    function setupPaymentSplitter(
        address _simplr,
        uint256 _simplrShares,
        address[] memory _payees,
        uint256[] memory _shares
    ) internal {
        require(_payees.length == _shares.length, "PS:001");
        SIMPLR_RECEIVER_ADDRESS = _simplr;
        SIMPLR_SHARES = _simplrShares;
        _payees[_payees.length - 1] = _simplr;
        _shares[_payees.length - 1] = _simplrShares;
        __PaymentSplitter_init(_payees, _shares);
    }
}

File 12 of 32 : MerkleProofUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Trees 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 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++) {
            bytes32 proofElement = proof[i];
            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = _efficientHash(computedHash, proofElement);
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = _efficientHash(proofElement, computedHash);
            }
        }
        return computedHash;
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

File 13 of 32 : PaymentSplitterUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (finance/PaymentSplitter.sol)

pragma solidity ^0.8.0;

import "../token/ERC20/utils/SafeERC20Upgradeable.sol";
import "../utils/AddressUpgradeable.sol";
import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

/**
 * @title PaymentSplitter
 * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware
 * that the Ether will be split in this way, since it is handled transparently by the contract.
 *
 * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each
 * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim
 * an amount proportional to the percentage of total shares they were assigned.
 *
 * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the
 * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release}
 * function.
 *
 * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and
 * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you
 * to run tests before sending real value to this contract.
 */
contract PaymentSplitterUpgradeable is Initializable, ContextUpgradeable {
    event PayeeAdded(address account, uint256 shares);
    event PaymentReleased(address to, uint256 amount);
    event ERC20PaymentReleased(IERC20Upgradeable indexed token, address to, uint256 amount);
    event PaymentReceived(address from, uint256 amount);

    uint256 private _totalShares;
    uint256 private _totalReleased;

    mapping(address => uint256) private _shares;
    mapping(address => uint256) private _released;
    address[] private _payees;

    mapping(IERC20Upgradeable => uint256) private _erc20TotalReleased;
    mapping(IERC20Upgradeable => mapping(address => uint256)) private _erc20Released;

    /**
     * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at
     * the matching position in the `shares` array.
     *
     * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no
     * duplicates in `payees`.
     */
    function __PaymentSplitter_init(address[] memory payees, uint256[] memory shares_) internal onlyInitializing {
        __PaymentSplitter_init_unchained(payees, shares_);
    }

    function __PaymentSplitter_init_unchained(address[] memory payees, uint256[] memory shares_) internal onlyInitializing {
        require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch");
        require(payees.length > 0, "PaymentSplitter: no payees");

        for (uint256 i = 0; i < payees.length; i++) {
            _addPayee(payees[i], shares_[i]);
        }
    }

    /**
     * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully
     * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the
     * reliability of the events, and not the actual splitting of Ether.
     *
     * To learn more about this see the Solidity documentation for
     * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback
     * functions].
     */
    receive() external payable virtual {
        emit PaymentReceived(_msgSender(), msg.value);
    }

    /**
     * @dev Getter for the total shares held by payees.
     */
    function totalShares() public view returns (uint256) {
        return _totalShares;
    }

    /**
     * @dev Getter for the total amount of Ether already released.
     */
    function totalReleased() public view returns (uint256) {
        return _totalReleased;
    }

    /**
     * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20
     * contract.
     */
    function totalReleased(IERC20Upgradeable token) public view returns (uint256) {
        return _erc20TotalReleased[token];
    }

    /**
     * @dev Getter for the amount of shares held by an account.
     */
    function shares(address account) public view returns (uint256) {
        return _shares[account];
    }

    /**
     * @dev Getter for the amount of Ether already released to a payee.
     */
    function released(address account) public view returns (uint256) {
        return _released[account];
    }

    /**
     * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an
     * IERC20 contract.
     */
    function released(IERC20Upgradeable token, address account) public view returns (uint256) {
        return _erc20Released[token][account];
    }

    /**
     * @dev Getter for the address of the payee number `index`.
     */
    function payee(uint256 index) public view returns (address) {
        return _payees[index];
    }

    /**
     * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the
     * total shares and their previous withdrawals.
     */
    function release(address payable account) public virtual {
        require(_shares[account] > 0, "PaymentSplitter: account has no shares");

        uint256 totalReceived = address(this).balance + totalReleased();
        uint256 payment = _pendingPayment(account, totalReceived, released(account));

        require(payment != 0, "PaymentSplitter: account is not due payment");

        _released[account] += payment;
        _totalReleased += payment;

        AddressUpgradeable.sendValue(account, payment);
        emit PaymentReleased(account, payment);
    }

    /**
     * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their
     * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20
     * contract.
     */
    function release(IERC20Upgradeable token, address account) public virtual {
        require(_shares[account] > 0, "PaymentSplitter: account has no shares");

        uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token);
        uint256 payment = _pendingPayment(account, totalReceived, released(token, account));

        require(payment != 0, "PaymentSplitter: account is not due payment");

        _erc20Released[token][account] += payment;
        _erc20TotalReleased[token] += payment;

        SafeERC20Upgradeable.safeTransfer(token, account, payment);
        emit ERC20PaymentReleased(token, account, payment);
    }

    /**
     * @dev internal logic for computing the pending payment of an `account` given the token historical balances and
     * already released amounts.
     */
    function _pendingPayment(
        address account,
        uint256 totalReceived,
        uint256 alreadyReleased
    ) private view returns (uint256) {
        return (totalReceived * _shares[account]) / _totalShares - alreadyReleased;
    }

    /**
     * @dev Add a new payee to the contract.
     * @param account The address of the payee to add.
     * @param shares_ The number of shares owned by the payee.
     */
    function _addPayee(address account, uint256 shares_) private {
        require(account != address(0), "PaymentSplitter: account is the zero address");
        require(shares_ > 0, "PaymentSplitter: shares are 0");
        require(_shares[account] == 0, "PaymentSplitter: account already has shares");

        _payees.push(account);
        _shares[account] = shares_;
        _totalShares = _totalShares + shares_;
        emit PayeeAdded(account, shares_);
    }

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

File 14 of 32 : BaseCollectionA.sol
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2022 Simplr
pragma solidity 0.8.11;

import "erc721a-upgradeable/contracts/ERC721AUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol";

/// @title Base CollectionA
/// @author Chain Labs
/// @notice Base contract for CollectionA
/// @dev Uses ERC721A (developed by azuki) as NFT standard
contract BaseCollectionA is
    OwnableUpgradeable,
    PausableUpgradeable,
    ERC721AUpgradeable
{
    //------------------------------------------------------//
    //
    //  Storage
    //
    //------------------------------------------------------//
    /// @notice Maximum tokens that can ever exist
    /// @dev maximum tokens that can be minted
    /// @return maximumTokens maximum number of tokens
    uint256 public maximumTokens;

    /// @notice Maximum tokens that can be bought per transaction in public sale
    /// @dev max mint/buy limit in public sale
    /// @return maxPurchase mint limit per transaction in public sale
    uint16 public maxPurchase;

    /// @notice Maximum tokens an account can buy/mint in public sale
    /// @dev maximum tokens an account can buy/mint in public sale
    /// @return maxHolding maximum tokens an account can hold in public sale
    uint16 public maxHolding;

    /// @notice Explain to an end user what this does
    /// @dev Explain to a developer any extra details
    /// @return price the return variables of a contract’s function state variable
    uint256 public price;

    /// @notice timestamp when public (main) sale starts
    /// @dev public sale starts automatically at this time
    /// @return publicSaleStartTime timestamp when public sale starts
    uint256 public publicSaleStartTime;

    /// @notice Base URI for assets
    /// @dev this state accounts for both placeholer media as well as revealed media
    /// @return projectURI base URI for assets
    string public projectURI;

    /// @notice IPFS CID of JSON file collection metadata
    /// @dev The JSON file is created when the Simplr Collection form is filled and is used by the interface
    /// @return metadata IPFS CID
    string public metadata;

    /// @notice number of reserved tokens
    /// @dev this value is set in Reserveable contract
    /// @return reservedTokens number of tokens reserved
    uint256 public reservedTokens;

    //------------------------------------------------------//
    //
    //  Setup
    //
    //------------------------------------------------------//

    /// @notice setup states of public sale and collection constants
    /// @dev internal method to setup base collection
    /// @param _name Collection Name
    /// @param _symbol Collection Symbol
    /// @param _admin admin address
    /// @param _maximumTokens maximum number of tokens
    /// @param _maxPurchase maximum number of tokens that can be bought per transaction in public sale
    /// @param _maxHolding maximum number of tokens an account can hold in public sale
    /// @param _price price per NFT token during public sale.
    /// @param _publicSaleStartTime public sale start timestamp
    /// @param _projectURI URI for collection media and assets
    function setupBaseCollection(
        string memory _name,
        string memory _symbol,
        address _admin,
        uint256 _maximumTokens,
        uint16 _maxPurchase,
        uint16 _maxHolding,
        uint256 _price,
        uint256 _publicSaleStartTime,
        string memory _projectURI
    ) internal {
        require(_admin != address(0), "BC:001");
        require(_maximumTokens != 0, "BC:002");
        require(
            _maximumTokens >= _maxHolding && _maxHolding >= _maxPurchase,
            "BC:003"
        );
        __ERC721A_init(_name, _symbol);
        _transferOwnership(_admin);
        maximumTokens = _maximumTokens;
        maxPurchase = _maxPurchase;
        maxHolding = _maxHolding;
        price = _price;
        publicSaleStartTime = _publicSaleStartTime;
        projectURI = _projectURI;
    }

    //------------------------------------------------------//
    //
    //  Owner only functions
    //
    //------------------------------------------------------//

    /// @notice updates the collection details (not collection assets)
    /// @dev updates the IPFS CID that points to new collection details
    /// @param _metadata new IPFS CID with updated collection details
    function setMetadata(string memory _metadata) external {
        // can only be invoked before setup or by owner after setup
        require(!isSetupComplete() || msg.sender == owner(), "BC:004");
        require(bytes(_metadata).length != 0, "BC:005");
        metadata = _metadata;
    }

    /// @notice Pause sale of tokens
    /// @dev pause all the open access methods like buy and presale buy
    function pause() external onlyOwner whenNotPaused {
        _pause();
    }

    /// @notice unpause sale of tokens
    /// @dev unpause all the open access methods like buy and presale buy
    function unpause() external onlyOwner whenPaused {
        _unpause();
    }

    //------------------------------------------------------//
    //
    //  Public function
    //
    //------------------------------------------------------//

    /// @notice buy during public sale
    /// @dev method to buy during public sale without affiliate
    /// @param _buyer address of buyer
    /// @param _quantity number of tokens to buy/mint
    function buy(address _buyer, uint256 _quantity) external payable virtual {
        _buy(_buyer, _quantity);
    }

    /// @notice check if public sale is active or not
    /// @dev it compares start time stamp with current time and check if sold or not
    /// @return isSaleActive a boolean, true - sale active, false - sale inactive
    function isSaleActive() public view returns (bool) {
        return
            block.timestamp >= publicSaleStartTime &&
            totalSupply() != maximumTokens;
    }

    /// @notice checks if setup is complete
    /// @dev if constants are set, setup is complete
    /// @return boolean checks if setup is complete
    function isSetupComplete() public view virtual returns (bool) {
        return maximumTokens != 0 && publicSaleStartTime != 0;
    }

    //------------------------------------------------------//
    //
    //  Internal function
    //
    //------------------------------------------------------//

    /// @notice internal method to buy during public sale
    /// @dev method to buy during public sale to be used with or without affiliate
    /// @param _buyer address of buyer
    /// @param _quantity number of tokens to buy/mint
    function _buy(address _buyer, uint256 _quantity) internal whenNotPaused {
        require(isSaleActive(), "BC:010");
        require(msg.value == (price * _quantity), "BC:011");
        require(_quantity <= maxPurchase, "BC:012");
        require(balanceOf(_buyer) + _quantity <= maxHolding, "BC:013");
        _manufacture(_buyer, _quantity);
    }

    /// @notice mints amount of tokens to an account
    /// @dev it mints tokens to an account doing sanity check of not crossing maximum tokens limit
    /// @param _receiver address of buyer
    /// @param _quantity amount of tokens to be minted
    function _manufacture(address _receiver, uint256 _quantity) internal {
        require(totalSupply() + _quantity <= maximumTokens, "BC:014");
        _safeMint(_receiver, _quantity);
    }

    /// @inheritdoc ERC721AUpgradeable
    function _baseURI() internal view virtual override returns (string memory) {
        return projectURI;
    }

    /// @inheritdoc	ERC721AUpgradeable
    function _startTokenId() internal view virtual override returns (uint256) {
        return 1;
    }
}

File 15 of 32 : SafeERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20Upgradeable.sol";
import "../../../utils/AddressUpgradeable.sol";

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

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

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

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

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

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

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

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

File 16 of 32 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.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

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

File 17 of 32 : 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;
}

File 18 of 32 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.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 = _setInitializedVersion(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) {
        bool isTopLevelCall = _setInitializedVersion(version);
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _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 {
        _setInitializedVersion(type(uint8).max);
    }

    function _setInitializedVersion(uint8 version) private returns (bool) {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, and for the lowest level
        // of initializers, because in other contexts the contract may have been reentered.
        if (_initializing) {
            require(
                version == 1 && !AddressUpgradeable.isContract(address(this)),
                "Initializable: contract is already initialized"
            );
            return false;
        } else {
            require(_initialized < version, "Initializable: contract is already initialized");
            _initialized = version;
            return true;
        }
    }
}

File 19 of 32 : IERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20Upgradeable {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

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

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

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

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

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

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

File 20 of 32 : ERC721AUpgradeable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v3.3.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import "./IERC721AUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.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/proxy/utils/Initializable.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension. Built to optimize for lower gas during batch mints.
 *
 * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..).
 *
 * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 *
 * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721AUpgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721AUpgradeable {
    using AddressUpgradeable for address;
    using StringsUpgradeable for uint256;

    // The tokenId of the next token to be minted.
    uint256 internal _currentIndex;

    // The number of tokens burned.
    uint256 internal _burnCounter;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to ownership details
    // An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details.
    mapping(uint256 => TokenOwnership) internal _ownerships;

    // Mapping owner address to address data
    mapping(address => AddressData) private _addressData;

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

    function __ERC721A_init(string memory name_, string memory symbol_) internal onlyInitializing {
        __ERC721A_init_unchained(name_, symbol_);
    }

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

    /**
     * To change the starting tokenId, please override this function.
     */
    function _startTokenId() internal view virtual returns (uint256) {
        return 0;
    }

    /**
     * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens.
     */
    function totalSupply() public view override returns (uint256) {
        // Counter underflow is impossible as _burnCounter cannot be incremented
        // more than _currentIndex - _startTokenId() times
        unchecked {
            return _currentIndex - _burnCounter - _startTokenId();
        }
    }

    /**
     * Returns the total amount of tokens minted in the contract.
     */
    function _totalMinted() internal view returns (uint256) {
        // Counter underflow is impossible as _currentIndex does not decrement,
        // and it is initialized to _startTokenId()
        unchecked {
            return _currentIndex - _startTokenId();
        }
    }

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

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view override returns (uint256) {
        if (owner == address(0)) revert BalanceQueryForZeroAddress();
        return uint256(_addressData[owner].balance);
    }

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return uint256(_addressData[owner].numberMinted);
    }

    /**
     * Returns the number of tokens burned by or on behalf of `owner`.
     */
    function _numberBurned(address owner) internal view returns (uint256) {
        return uint256(_addressData[owner].numberBurned);
    }

    /**
     * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
     */
    function _getAux(address owner) internal view returns (uint64) {
        return _addressData[owner].aux;
    }

    /**
     * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
     * If there are multiple variables, please pack them into a uint64.
     */
    function _setAux(address owner, uint64 aux) internal {
        _addressData[owner].aux = aux;
    }

    /**
     * Gas spent here starts off proportional to the maximum mint batch size.
     * It gradually moves to O(1) as tokens get transferred around in the collection over time.
     */
    function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
        uint256 curr = tokenId;

        unchecked {
            if (_startTokenId() <= curr) if (curr < _currentIndex) {
                TokenOwnership memory ownership = _ownerships[curr];
                if (!ownership.burned) {
                    if (ownership.addr != address(0)) {
                        return ownership;
                    }
                    // Invariant:
                    // There will always be an ownership that has an address and is not burned
                    // before an ownership that does not have an address and is not burned.
                    // Hence, curr will not underflow.
                    while (true) {
                        curr--;
                        ownership = _ownerships[curr];
                        if (ownership.addr != address(0)) {
                            return ownership;
                        }
                    }
                }
            }
        }
        revert OwnerQueryForNonexistentToken();
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view override returns (address) {
        return _ownershipOf(tokenId).addr;
    }

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

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

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

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

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

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public override {
        address owner = ERC721AUpgradeable.ownerOf(tokenId);
        if (to == owner) revert ApprovalToCurrentOwner();

        if (_msgSender() != owner) if(!isApprovedForAll(owner, _msgSender())) {
            revert ApprovalCallerNotOwnerNorApproved();
        }

        _approve(to, tokenId, owner);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view override returns (address) {
        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

        return _tokenApprovals[tokenId];
    }

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

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_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 {
        _transfer(from, to, tokenId);
    }

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

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        _transfer(from, to, tokenId);
        if (to.isContract()) if(!_checkContractOnERC721Received(from, to, tokenId, _data)) {
            revert TransferToNonERC721ReceiverImplementer();
        }
    }

    /**
     * @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`),
     */
    function _exists(uint256 tokenId) internal view returns (bool) {
        return _startTokenId() <= tokenId && tokenId < _currentIndex && !_ownerships[tokenId].burned;
    }

    /**
     * @dev Equivalent to `_safeMint(to, quantity, '')`.
     */
    function _safeMint(address to, uint256 quantity) internal {
        _safeMint(to, quantity, '');
    }

    /**
     * @dev Safely mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement
     *   {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            _addressData[to].balance += uint64(quantity);
            _addressData[to].numberMinted += uint64(quantity);

            _ownerships[startTokenId].addr = to;
            _ownerships[startTokenId].startTimestamp = uint64(block.timestamp);

            uint256 updatedIndex = startTokenId;
            uint256 end = updatedIndex + quantity;

            if (to.isContract()) {
                do {
                    emit Transfer(address(0), to, updatedIndex);
                    if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (updatedIndex < end);
                // Reentrancy protection
                if (_currentIndex != startTokenId) revert();
            } else {
                do {
                    emit Transfer(address(0), to, updatedIndex++);
                } while (updatedIndex < end);
            }
            _currentIndex = updatedIndex;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 quantity) internal {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            _addressData[to].balance += uint64(quantity);
            _addressData[to].numberMinted += uint64(quantity);

            _ownerships[startTokenId].addr = to;
            _ownerships[startTokenId].startTimestamp = uint64(block.timestamp);

            uint256 updatedIndex = startTokenId;
            uint256 end = updatedIndex + quantity;

            do {
                emit Transfer(address(0), to, updatedIndex++);
            } while (updatedIndex < end);

            _currentIndex = updatedIndex;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * 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
    ) private {
        TokenOwnership memory prevOwnership = _ownershipOf(tokenId);

        if (prevOwnership.addr != from) revert TransferFromIncorrectOwner();

        bool isApprovedOrOwner = (_msgSender() == from ||
            isApprovedForAll(from, _msgSender()) ||
            getApproved(tokenId) == _msgSender());

        if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        if (to == address(0)) revert TransferToZeroAddress();

        _beforeTokenTransfers(from, to, tokenId, 1);

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

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
        unchecked {
            _addressData[from].balance -= 1;
            _addressData[to].balance += 1;

            TokenOwnership storage currSlot = _ownerships[tokenId];
            currSlot.addr = to;
            currSlot.startTimestamp = uint64(block.timestamp);

            // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            TokenOwnership storage nextSlot = _ownerships[nextTokenId];
            if (nextSlot.addr == address(0)) {
                // This will suffice for checking _exists(nextTokenId),
                // as a burned slot cannot contain the zero address.
                if (nextTokenId != _currentIndex) {
                    nextSlot.addr = from;
                    nextSlot.startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

        emit Transfer(from, to, tokenId);
        _afterTokenTransfers(from, to, tokenId, 1);
    }

    /**
     * @dev Equivalent to `_burn(tokenId, false)`.
     */
    function _burn(uint256 tokenId) internal virtual {
        _burn(tokenId, false);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
        TokenOwnership memory prevOwnership = _ownershipOf(tokenId);

        address from = prevOwnership.addr;

        if (approvalCheck) {
            bool isApprovedOrOwner = (_msgSender() == from ||
                isApprovedForAll(from, _msgSender()) ||
                getApproved(tokenId) == _msgSender());

            if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        }

        _beforeTokenTransfers(from, address(0), tokenId, 1);

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

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
        unchecked {
            AddressData storage addressData = _addressData[from];
            addressData.balance -= 1;
            addressData.numberBurned += 1;

            // Keep track of who burned the token, and the timestamp of burning.
            TokenOwnership storage currSlot = _ownerships[tokenId];
            currSlot.addr = from;
            currSlot.startTimestamp = uint64(block.timestamp);
            currSlot.burned = true;

            // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            TokenOwnership storage nextSlot = _ownerships[nextTokenId];
            if (nextSlot.addr == address(0)) {
                // This will suffice for checking _exists(nextTokenId),
                // as a burned slot cannot contain the zero address.
                if (nextTokenId != _currentIndex) {
                    nextSlot.addr = from;
                    nextSlot.startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

        emit Transfer(from, address(0), tokenId);
        _afterTokenTransfers(from, address(0), tokenId, 1);

        // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.
        unchecked {
            _burnCounter++;
        }
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(
        address to,
        uint256 tokenId,
        address owner
    ) private {
        _tokenApprovals[tokenId] = to;
        emit Approval(owner, to, tokenId);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target 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 _checkContractOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
            return retval == IERC721ReceiverUpgradeable(to).onERC721Received.selector;
        } catch (bytes memory reason) {
            if (reason.length == 0) {
                revert TransferToNonERC721ReceiverImplementer();
            } else {
                assembly {
                    revert(add(32, reason), mload(reason))
                }
            }
        }
    }

    /**
     * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
     * And also called before burning one token.
     *
     * startTokenId - the first token id to be transferred
     * quantity - the amount to be transferred
     *
     * 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, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
     * minting.
     * And also called after one token has been burned.
     *
     * startTokenId - the first token id to be transferred
     * quantity - the amount to be transferred
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
     * transferred to `to`.
     * - When `from` is zero, `tokenId` has been minted for `to`.
     * - When `to` is zero, `tokenId` has been burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _afterTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) 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[42] private __gap;
}

File 21 of 32 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

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

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

File 22 of 32 : PausableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract PausableUpgradeable is Initializable, ContextUpgradeable {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    function __Pausable_init() internal onlyInitializing {
        __Pausable_init_unchained();
    }

    function __Pausable_init_unchained() internal onlyInitializing {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }

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

File 23 of 32 : StringsUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library StringsUpgradeable {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

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

File 24 of 32 : IERC721AUpgradeable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v3.3.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721MetadataUpgradeable.sol";

/**
 * @dev Interface of an ERC721A compliant contract.
 */
interface IERC721AUpgradeable is IERC721Upgradeable, IERC721MetadataUpgradeable {
    /**
     * The caller must own the token or be an approved operator.
     */
    error ApprovalCallerNotOwnerNorApproved();

    /**
     * The token does not exist.
     */
    error ApprovalQueryForNonexistentToken();

    /**
     * The caller cannot approve to their own address.
     */
    error ApproveToCaller();

    /**
     * The caller cannot approve to the current owner.
     */
    error ApprovalToCurrentOwner();

    /**
     * Cannot query the balance for the zero address.
     */
    error BalanceQueryForZeroAddress();

    /**
     * Cannot mint to the zero address.
     */
    error MintToZeroAddress();

    /**
     * The quantity of tokens minted must be more than zero.
     */
    error MintZeroQuantity();

    /**
     * The token does not exist.
     */
    error OwnerQueryForNonexistentToken();

    /**
     * The caller must own the token or be an approved operator.
     */
    error TransferCallerNotOwnerNorApproved();

    /**
     * The token must be owned by `from`.
     */
    error TransferFromIncorrectOwner();

    /**
     * Cannot safely transfer to a contract that does not implement the ERC721Receiver interface.
     */
    error TransferToNonERC721ReceiverImplementer();

    /**
     * Cannot transfer to the zero address.
     */
    error TransferToZeroAddress();

    /**
     * The token does not exist.
     */
    error URIQueryForNonexistentToken();

    // Compiler will pack this into a single 256bit word.
    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Keeps track of the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
    }

    // Compiler will pack this into a single 256bit word.
    struct AddressData {
        // Realistically, 2**64-1 is more than enough.
        uint64 balance;
        // Keeps track of mint count with minimal overhead for tokenomics.
        uint64 numberMinted;
        // Keeps track of burn count with minimal overhead for tokenomics.
        uint64 numberBurned;
        // For miscellaneous variable(s) pertaining to the address
        // (e.g. number of whitelist mint slots used).
        // If there are multiple variables, please pack them into a uint64.
        uint64 aux;
    }

    /**
     * @dev Returns the total amount of tokens stored by the contract.
     * 
     * Burned tokens are calculated here, use `_totalMinted()` if you want to count just minted tokens.
     */
    function totalSupply() external view returns (uint256);
}

File 25 of 32 : IERC721ReceiverUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

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

File 26 of 32 : 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;
}

File 27 of 32 : IERC721Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.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 be 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);
}

File 28 of 32 : IERC721MetadataUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721Upgradeable.sol";

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

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

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

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

pragma solidity ^0.8.0;

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

File 30 of 32 : 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);
}

File 31 of 32 : IAffiliateRegistry.sol
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2022 Simplr
pragma solidity 0.8.11;

/**
 * @title Affiliate Registry Interface
 * @dev   Interface with necessary functionalities of Affiliate Registry.
 * @author Chain Labs Team
 */
interface IAffiliateRegistry {
    function setAffiliateShares(uint256 _affiliateShares, bytes32 _projectId)
        external;

    function registerProject(string memory projectName, uint256 affiliateShares)
        external
        returns (bytes32 projectId);

    function getProjectId(string memory _projectName, address _projectOwner)
        external
        view
        returns (bytes32 projectId);

    function getAffiliateShareValue(
        bytes memory signature,
        address affiliate,
        bytes32 projectId,
        uint256 value
    ) external view returns (bool _isAffiliate, uint256 _shareValue);
}

File 32 of 32 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"affiliate","type":"address"},{"indexed":true,"internalType":"bytes32","name":"project","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"AffiliateShareTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint96","name":"royaltyFraction","type":"uint96"}],"name":"DefaultRoyaltyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20Upgradeable","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"PayeeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"root","type":"bytes32"},{"indexed":false,"internalType":"string","name":"cid","type":"string"}],"name":"WhitelistUpdated","type":"event"},{"inputs":[],"name":"CONTRACT_NAME","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SIMPLR_RECEIVER_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SIMPLR_SHARES","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"},{"internalType":"address","name":"_affiliate","type":"address"}],"name":"affiliateBuy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_proofs","type":"bytes32[]"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"},{"internalType":"address","name":"_affiliate","type":"address"}],"name":"affiliatePresaleBuy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_buyer","type":"address"},{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getAffiliateRegistry","outputs":[{"internalType":"contract IAffiliateRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPresaleWhitelists","outputs":[{"components":[{"internalType":"bytes32","name":"root","type":"bytes32"},{"internalType":"string","name":"cid","type":"string"}],"internalType":"struct ICollectionStruct.Whitelist","name":"whitelist","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getProjectId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isAffiliateModuleInitialised","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPresaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPresaleAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPresaleWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isRevealable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isRevealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSetupComplete","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_proofs","type":"bytes32[]"},{"internalType":"address","name":"_account","type":"address"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxHolding","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPurchase","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maximumTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadata","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"payee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_proofs","type":"bytes32[]"},{"internalType":"address","name":"_buyer","type":"address"},{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"presaleBuy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"presaleMaxHolding","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presalePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleReservedTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"projectURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"projectURIProvenance","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSaleStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20Upgradeable","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20Upgradeable","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_reserveTokens","type":"uint256"}],"name":"reserveTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reservedTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_metadata","type":"string"}],"name":"setMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_projectURI","type":"string"}],"name":"setProjectURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_projectURI","type":"string"}],"name":"setProjectURIAndReveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"royaltyFraction","type":"uint96"}],"internalType":"struct ERC2981Upgradeable.RoyaltyInfo","name":"_royalties","type":"tuple"}],"name":"setRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newSaleStartTime","type":"uint256"},{"internalType":"bool","name":"saleType","type":"bool"}],"name":"setSaleStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"uint256","name":"maximumTokens","type":"uint256"},{"internalType":"uint16","name":"maxPurchase","type":"uint16"},{"internalType":"uint16","name":"maxHolding","type":"uint16"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"publicSaleStartTime","type":"uint256"},{"internalType":"string","name":"projectURI","type":"string"}],"internalType":"struct ICollectionStruct.BaseCollectionStruct","name":"_baseCollection","type":"tuple"},{"components":[{"internalType":"uint256","name":"presaleReservedTokens","type":"uint256"},{"internalType":"uint256","name":"presalePrice","type":"uint256"},{"internalType":"uint256","name":"presaleStartTime","type":"uint256"},{"internalType":"uint256","name":"presaleMaxHolding","type":"uint256"},{"components":[{"internalType":"bytes32","name":"root","type":"bytes32"},{"internalType":"string","name":"cid","type":"string"}],"internalType":"struct ICollectionStruct.Whitelist","name":"presaleWhitelist","type":"tuple"}],"internalType":"struct ICollectionStruct.PresaleableStruct","name":"_presaleable","type":"tuple"},{"components":[{"internalType":"address","name":"simplr","type":"address"},{"internalType":"uint256","name":"simplrShares","type":"uint256"},{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"internalType":"struct ICollectionStruct.PaymentSplitterStruct","name":"_paymentSplitter","type":"tuple"},{"internalType":"bytes32","name":"_projectURIProvenance","type":"bytes32"},{"components":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"royaltyFraction","type":"uint96"}],"internalType":"struct ERC2981Upgradeable.RoyaltyInfo","name":"_royalties","type":"tuple"},{"internalType":"uint256","name":"_reserveTokens","type":"uint256"}],"name":"setup","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"uint256","name":"maximumTokens","type":"uint256"},{"internalType":"uint16","name":"maxPurchase","type":"uint16"},{"internalType":"uint16","name":"maxHolding","type":"uint16"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"publicSaleStartTime","type":"uint256"},{"internalType":"string","name":"projectURI","type":"string"}],"internalType":"struct ICollectionStruct.BaseCollectionStruct","name":"_baseCollection","type":"tuple"},{"components":[{"internalType":"uint256","name":"presaleReservedTokens","type":"uint256"},{"internalType":"uint256","name":"presalePrice","type":"uint256"},{"internalType":"uint256","name":"presaleStartTime","type":"uint256"},{"internalType":"uint256","name":"presaleMaxHolding","type":"uint256"},{"components":[{"internalType":"bytes32","name":"root","type":"bytes32"},{"internalType":"string","name":"cid","type":"string"}],"internalType":"struct ICollectionStruct.Whitelist","name":"presaleWhitelist","type":"tuple"}],"internalType":"struct ICollectionStruct.PresaleableStruct","name":"_presaleable","type":"tuple"},{"components":[{"internalType":"address","name":"simplr","type":"address"},{"internalType":"uint256","name":"simplrShares","type":"uint256"},{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"internalType":"struct ICollectionStruct.PaymentSplitterStruct","name":"_paymentSplitter","type":"tuple"},{"internalType":"bytes32","name":"_projectURIProvenance","type":"bytes32"},{"components":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"royaltyFraction","type":"uint96"}],"internalType":"struct ERC2981Upgradeable.RoyaltyInfo","name":"_royalties","type":"tuple"},{"internalType":"uint256","name":"_reserveTokens","type":"uint256"},{"internalType":"contract IAffiliateRegistry","name":"_registry","type":"address"},{"internalType":"bytes32","name":"_projectId","type":"bytes32"}],"name":"setupWithAffiliate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"shares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20Upgradeable","name":"token","type":"address"}],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"root","type":"bytes32"},{"internalType":"string","name":"cid","type":"string"}],"internalType":"struct ICollectionStruct.Whitelist","name":"_whitelist","type":"tuple"}],"name":"updateWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"whitelistCid","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b50614ca9806100206000396000f3fe6080604052600436106104345760003560e01c806370a0823111610229578063b106cbf31161012e578063d79779b2116100b6578063f2fde38b1161007a578063f2fde38b14610cf0578063f42d330114610d10578063f762066b14610d30578063ffa1ad7414610d47578063ffb6737b14610d7857600080fd5b8063d79779b214610c23578063debefaa614610c5a578063e33b7de314610c7a578063e606408314610c90578063e985e9c514610ca757600080fd5b8063c87b56dd116100fd578063c87b56dd14610b79578063cce7ec1314610b99578063ce7c2ac214610bac578063d031370b14610be3578063d6cb5bad14610c0357600080fd5b8063b106cbf314610b0e578063b88d4fde14610b2e578063bb878f7c14610b4e578063c3a9bd8b14610b6357600080fd5b8063977b055b116101b1578063a22cb46511610180578063a22cb46514610a8d578063a49a1e7d14610aad578063a5f9aaef14610acd578063a82524b214610ae4578063aed0fec714610afb57600080fd5b8063977b055b14610a0a5780639852595c14610a255780639a64a53d14610a5c578063a035b1fe14610a7757600080fd5b80638456cb59116101f85780638456cb59146109825780638b83209b146109975780638da5cb5b146109b757806392ccfc54146109d557806395d89b41146109f557600080fd5b806370a0823114610925578063715018a61461094557806378d639291461095a5780637ad9707d1461096f57600080fd5b8063394066ad1161033a57806355efaf5c116102c2578063614d08f811610286578063614d08f8146108815780636352211e146108b85780636bb7b1d9146108d85780636e6fb49f146108ee5780636f4b6b021461090357600080fd5b806355efaf5c14610815578063564566a814610828578063587e0c731461083d5780635c975abb1461085457806360d938dc1461086c57600080fd5b806342842e0e1161030957806342842e0e1461078057806348b75044146107a05780634aa2ed94146107c05780634fe99584146107d557806354214f69146107f557600080fd5b8063394066ad146106f95780633a98ef391461070e5780633f4ba83a14610724578063406072a91461073957600080fd5b806319165587116103bd5780632eb4a7ab1161038c5780632eb4a7ab14610659578063333e6f0614610670578063342ebbe0146106a4578063355959e0146106c5578063392f37e9146106e457600080fd5b806319165587146105ba57806323b872dd146105da578063284fd1f2146105fa5780632a55205a1461061a57600080fd5b8063095ea7b311610404578063095ea7b3146105365780630be4d2b8146105585780631270e10c1461057857806315a553471461058e57806318160ddd146105a557600080fd5b80620e7fa81461048257806301ffc9a7146104ac57806306fdde03146104dc578063081812fc146104fe57600080fd5b3661047d577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b34801561048e57600080fd5b5061049961013a5481565b6040519081526020015b60405180910390f35b3480156104b857600080fd5b506104cc6104c7366004613c63565b610d90565b60405190151581526020016104a3565b3480156104e857600080fd5b506104f1610da1565b6040516104a39190613cd8565b34801561050a57600080fd5b5061051e610519366004613ceb565b610e33565b6040516001600160a01b0390911681526020016104a3565b34801561054257600080fd5b50610556610551366004613d24565b610e77565b005b34801561056457600080fd5b50610556610573366004613e72565b610efe565b34801561058457600080fd5b5061017154610499565b34801561059a57600080fd5b506104996101015481565b3480156105b157600080fd5b50610499610f48565b3480156105c657600080fd5b506105566105d5366004613ea6565b610f56565b3480156105e657600080fd5b506105566105f5366004613ec3565b611089565b34801561060657600080fd5b50610556610615366004613f55565b611094565b34801561062657600080fd5b5061063a610635366004613f89565b6110ea565b604080516001600160a01b0390931683526020830191909152016104a3565b34801561066557600080fd5b506104996101365481565b34801561067c57600080fd5b5060fc546106919062010000900461ffff1681565b60405161ffff90911681526020016104a3565b3480156106b057600080fd5b506101355461051e906001600160a01b031681565b3480156106d157600080fd5b50610170546001600160a01b031661051e565b3480156106f057600080fd5b506104f161119a565b34801561070557600080fd5b506104cc611229565b34801561071a57600080fd5b5061010254610499565b34801561073057600080fd5b50610556611238565b34801561074557600080fd5b50610499610754366004613fab565b6001600160a01b0391821660009081526101086020908152604080832093909416825291909152205490565b34801561078c57600080fd5b5061055661079b366004613ec3565b6112b5565b3480156107ac57600080fd5b506105566107bb366004613fab565b6112d0565b3480156107cc57600080fd5b506104f16114ae565b3480156107e157600080fd5b506105566107f0366004613ff2565b6114bc565b34801561080157600080fd5b5061013c546104cc90610100900460ff1681565b61055661082336600461405b565b6115a1565b34801561083457600080fd5b506104cc6115c4565b34801561084957600080fd5b506104996101385481565b34801561086057600080fd5b5060655460ff166104cc565b34801561087857600080fd5b506104cc6115e5565b34801561088d57600080fd5b506104f16040518060400160405280600b81526020016a436f6c6c656374696f6e4160a81b81525081565b3480156108c457600080fd5b5061051e6108d3366004613ceb565b611620565b3480156108e457600080fd5b5061049960fe5481565b3480156108fa57600080fd5b506104f1611632565b34801561090f57600080fd5b5061091861163f565b6040516104a391906140f5565b34801561093157600080fd5b50610499610940366004613ea6565b61171c565b34801561095157600080fd5b5061055661176a565b34801561096657600080fd5b506104cc61179e565b61055661097d36600461411a565b6117b7565b34801561098e57600080fd5b506105566117c9565b3480156109a357600080fd5b5061051e6109b2366004613ceb565b61181e565b3480156109c357600080fd5b506033546001600160a01b031661051e565b3480156109e157600080fd5b506105566109f03660046144c1565b61184f565b348015610a0157600080fd5b506104f1611865565b348015610a1657600080fd5b5060fc546106919061ffff1681565b348015610a3157600080fd5b50610499610a40366004613ea6565b6001600160a01b03166000908152610105602052604090205490565b348015610a6857600080fd5b5061013c546104cc9060ff1681565b348015610a8357600080fd5b5061049960fd5481565b348015610a9957600080fd5b50610556610aa836600461456c565b611874565b348015610ab957600080fd5b50610556610ac8366004613e72565b61190a565b348015610ad957600080fd5b5061049961013d5481565b348015610af057600080fd5b5061049961013b5481565b610556610b0936600461459a565b6119a8565b348015610b1a57600080fd5b50610556610b29366004614605565b6119bf565b348015610b3a57600080fd5b50610556610b493660046146cd565b6119d7565b348015610b5a57600080fd5b506104cc611a1b565b348015610b6f57600080fd5b5061049960fb5481565b348015610b8557600080fd5b506104f1610b94366004613ceb565b611a3a565b610556610ba7366004613d24565b611b08565b348015610bb857600080fd5b50610499610bc7366004613ea6565b6001600160a01b03166000908152610104602052604090205490565b348015610bef57600080fd5b50610556610bfe366004613ceb565b611b12565b348015610c0f57600080fd5b50610556610c1e366004613e72565b611b45565b348015610c2f57600080fd5b50610499610c3e366004613ea6565b6001600160a01b03166000908152610107602052604090205490565b348015610c6657600080fd5b506104cc610c75366004614738565b611be5565b348015610c8657600080fd5b5061010354610499565b348015610c9c57600080fd5b506104996101395481565b348015610cb357600080fd5b506104cc610cc2366004613fab565b6001600160a01b03918216600090815260d06020908152604080832093909416825291909152205460ff1690565b348015610cfc57600080fd5b50610556610d0b366004613ea6565b611bfa565b348015610d1c57600080fd5b50610556610d2b36600461478e565b611c92565b348015610d3c57600080fd5b506104996101345481565b348015610d5357600080fd5b506104f1604051806040016040528060058152602001640302e312e360dc1b81525081565b348015610d8457600080fd5b506101385415156104cc565b6000610d9b82611cc5565b92915050565b606060cb8054610db0906147aa565b80601f0160208091040260200160405190810160405280929190818152602001828054610ddc906147aa565b8015610e295780601f10610dfe57610100808354040283529160200191610e29565b820191906000526020600020905b815481529060010190602001808311610e0c57829003601f168201915b5050505050905090565b6000610e3e82611cea565b610e5b576040516333d1c03960e21b815260040160405180910390fd5b50600090815260cf60205260409020546001600160a01b031690565b6000610e8282611620565b9050806001600160a01b0316836001600160a01b03161415610eb75760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614610eee57610ed18133610cc2565b610eee576040516367d9dca160e11b815260040160405180910390fd5b610ef9838383611d23565b505050565b6033546001600160a01b03163314610f315760405162461bcd60e51b8152600401610f28906147e5565b60405180910390fd5b8051610f449060ff906020840190613bb4565b5050565b60ca5460c954036000190190565b6001600160a01b03811660009081526101046020526040902054610f8c5760405162461bcd60e51b8152600401610f289061481a565b6000610f986101035490565b610fa29047614876565b90506000610fd08383610fcb866001600160a01b03166000908152610105602052604090205490565b611d7f565b905080610fef5760405162461bcd60e51b8152600401610f289061488e565b6001600160a01b0383166000908152610105602052604081208054839290611018908490614876565b925050819055508061010360008282546110329190614876565b9091555061104290508382611dbf565b604080516001600160a01b0385168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a1505050565b610ef9838383611ed8565b6033546001600160a01b031633146110be5760405162461bcd60e51b8152600401610f28906147e5565b610138546110de5760405162461bcd60e51b8152600401610f28906148d9565b6110e7816120c6565b50565b600082815261013f602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b031692820192909252829161116157506040805180820190915261013e546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090611180906001600160601b0316876148f9565b61118a919061492e565b91519350909150505b9250929050565b61010080546111a8906147aa565b80601f01602080910402602001604051908101604052809291908181526020018280546111d4906147aa565b80156112215780601f106111f657610100808354040283529160200191611221565b820191906000526020600020905b81548152906001019060200180831161120457829003601f168201915b505050505081565b6000611233612126565b905090565b6033546001600160a01b031633146112625760405162461bcd60e51b8152600401610f28906147e5565b60655460ff166112ab5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610f28565b6112b3612149565b565b610ef9838383604051806020016040528060008152506119d7565b6001600160a01b038116600090815261010460205260409020546113065760405162461bcd60e51b8152600401610f289061481a565b6001600160a01b038216600090815261010760205260408120546040516370a0823160e01b81523060048201526001600160a01b038516906370a0823190602401602060405180830381865afa158015611364573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113889190614942565b6113929190614876565b905060006113cc8383610fcb87876001600160a01b0391821660009081526101086020908152604080832093909416825291909152205490565b9050806113eb5760405162461bcd60e51b8152600401610f289061488e565b6001600160a01b0380851660009081526101086020908152604080832093871683529290529081208054839290611423908490614876565b90915550506001600160a01b0384166000908152610107602052604081208054839290611451908490614876565b9091555061146290508484836121dc565b604080516001600160a01b038581168252602082018490528616917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a250505050565b61013780546111a8906147aa565b6033546001600160a01b031633146114e65760405162461bcd60e51b8152600401610f28906147e5565b80156115465742821180156114fd575060fe548214155b801561150b575061013b5482115b6115405760405162461bcd60e51b815260206004820152600660248201526521219d18181b60d11b6044820152606401610f28565b5060fe55565b4282118015611558575061013b548214155b8015611565575060fe5482105b61159a5760405162461bcd60e51b81526020600482015260066024820152650a0a4746060760d31b6044820152606401610f28565b5061013b55565b81816115af8888888861222e565b6115ba82823461243b565b5050505050505050565b600060fe544210158015611233575060fb546115de610f48565b1415905090565b600061013b544211801561161057506101385461010154611604610f48565b61160e919061495b565b105b801561123357505060fe54421090565b600061162b82612570565b5192915050565b60ff80546111a8906147aa565b604080518082019091526000815260606020820152610138546116745760405162461bcd60e51b8152600401610f28906148d9565b60405180604001604052806101365481526020016101378054611696906147aa565b80601f01602080910402602001604051908101604052809291908181526020018280546116c2906147aa565b801561170f5780601f106116e45761010080835404028352916020019161170f565b820191906000526020600020905b8154815290600101906020018083116116f257829003601f168201915b5050505050815250905090565b60006001600160a01b038216611745576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b0316600090815260ce60205260409020546001600160401b031690565b6033546001600160a01b031633146117945760405162461bcd60e51b8152600401610f28906147e5565b6112b36000612692565b600060fb5460001415801561123357505060fe54151590565b6117c38484848461222e565b50505050565b6033546001600160a01b031633146117f35760405162461bcd60e51b8152600401610f28906147e5565b60655460ff16156118165760405162461bcd60e51b8152600401610f2890614972565b6112b36126e4565b600061010682815481106118345761183461499c565b6000918252602090912001546001600160a01b031692915050565b61185d86868686868661273c565b505050505050565b606060cc8054610db0906147aa565b6001600160a01b03821633141561189e5760405163b06307db60e01b815260040160405180910390fd5b33600081815260d0602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61191261179e565b158061192857506033546001600160a01b031633145b61195d5760405162461bcd60e51b81526020600482015260066024820152651090ce8c0c0d60d21b6044820152606401610f28565b80516119945760405162461bcd60e51b815260206004820152600660248201526542433a30303560d01b6044820152606401610f28565b8051610f4490610100906020840190613bb4565b81816119b4868661283d565b61185d82823461243b565b6119cd88888888888861273c565b6115ba8282612983565b6119e2848484611ed8565b6001600160a01b0383163b156117c3576119fe84848484612a61565b6117c3576040516368d2bf6b60e11b815260040160405180910390fd5b6000611a2961013854151590565b801561123357505061013654151590565b6060611a4582611cea565b611a795760405162461bcd60e51b8152602060048201526005602482015264148e8c0c0d60da1b6044820152606401610f28565b6000611a83612b49565b61013c5490915060ff16611ac05780611a9b84612b58565b604051602001611aac9291906149b2565b604051602081830303815290604052611b01565b61013c54610100900460ff16611ad65780611b01565b80611ae084612b58565b604051602001611af19291906149b2565b6040516020818303038152906040525b9392505050565b610f44828261283d565b6033546001600160a01b03163314611b3c5760405162461bcd60e51b8152600401610f28906147e5565b6110e781612c55565b6033546001600160a01b03163314611b6f5760405162461bcd60e51b8152600401610f28906147e5565b61013c5460ff16611bc25760405162461bcd60e51b815260206004820152601a60248201527f52657665616c61626c653a206e6f6e2072657665616c61626c650000000000006044820152606401610f28565b61013c805461ff0019166101001790558051610f449060ff906020840190613bb4565b6000611bf2848484612cdf565b949350505050565b6033546001600160a01b03163314611c245760405162461bcd60e51b8152600401610f28906147e5565b6001600160a01b038116611c895760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610f28565b6110e781612692565b6033546001600160a01b03163314611cbc5760405162461bcd60e51b8152600401610f28906147e5565b6110e781612d66565b60006001600160e01b0319821663152a902d60e11b1480610d9b5750610d9b82612dcc565b600081600111158015611cfe575060c95482105b8015610d9b575050600090815260cd6020526040902054600160e01b900460ff161590565b600082815260cf602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610102546001600160a01b0384166000908152610104602052604081205490918391611dab90866148f9565b611db5919061492e565b611bf2919061495b565b80471015611e0f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610f28565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611e5c576040519150601f19603f3d011682016040523d82523d6000602084013e611e61565b606091505b5050905080610ef95760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610f28565b6000611ee382612570565b9050836001600160a01b031681600001516001600160a01b031614611f1a5760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b0386161480611f385750611f388533610cc2565b80611f53575033611f4884610e33565b6001600160a01b0316145b905080611f7357604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038416611f9a57604051633a954ecd60e21b815260040160405180910390fd5b611fa660008487611d23565b6001600160a01b03858116600090815260ce60209081526040808320805467ffffffffffffffff198082166001600160401b039283166000190183161790925589861680865283862080549384169383166001908101841694909417905589865260cd90945282852080546001600160e01b031916909417600160a01b4290921691909102178355870180845292208054919390911661207a5760c954821461207a57805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b80516101365560208082015180516120e392610137920190613bb4565b50805160208201516040517f75078ba3468553e61a92ecd8e7ad522e4341db903a24a4d4e3cd266a5c9811ba9261211b9290916149f1565b60405180910390a150565b6101715460009015801590611233575050610170546001600160a01b0316151590565b60655460ff166121925760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610f28565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610ef9908490612e1c565b60655460ff16156122515760405162461bcd60e51b8152600401610f2890614972565b610138546122715760405162461bcd60e51b8152600401610f28906148d9565b6122796115e5565b6122ae5760405162461bcd60e51b815260206004820152600660248201526550523a30303960d01b6044820152606401610f28565b6122b6611a1b565b6122c15760016122cc565b6122cc848484612cdf565b6123015760405162461bcd60e51b815260206004820152600660248201526550523a30313160d01b6044820152606401610f28565b610138548161010154612312610f48565b61231c919061495b565b6123269190614876565b111561235d5760405162461bcd60e51b815260206004820152600660248201526550523a30313360d01b6044820152606401610f28565b8061013a5461236c91906148f9565b34146123a35760405162461bcd60e51b8152602060048201526006602482015265050523a3031360d41b6044820152606401610f28565b60fc5461ffff168111156123e25760405162461bcd60e51b815260206004820152600660248201526514148e8c0c4d60d21b6044820152606401610f28565b61013954816123f08461171c565b6123fa9190614876565b11156124315760405162461bcd60e51b815260206004820152600660248201526528291d18189960d11b6044820152606401610f28565b6117c38282612eee565b612443612126565b61248f5760405162461bcd60e51b815260206004820152601a60248201527f416666696c696174653a206e6f7420696e697469616c697365640000000000006044820152606401610f28565b610170546101715460405163a765d5a760e01b815260009283926001600160a01b039091169163a765d5a7916124cd91899189918990600401614a0a565b6040805180830381865afa1580156124e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061250d9190614a42565b909250905081156120bf576125228482611dbf565b61017154846001600160a01b03167f08eb2dd1a6ec23591aa38e6f2274b051fee374cefba4d15720e2c360648f1dbd8360405161256191815260200190565b60405180910390a35050505050565b604080516060810182526000808252602082018190529181019190915281806001116126795760c95481101561267957600081815260cd6020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161515918101829052906126775780516001600160a01b03161561260e579392505050565b5060001901600081815260cd6020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215612672579392505050565b61260e565b505b604051636f96cda160e11b815260040160405180910390fd5b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60655460ff16156127075760405162461bcd60e51b8152600401610f2890614972565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121bf3390565b60006127486001612f45565b90508015612760576000805461ff0019166101001790555b6127968760000151886020015189604001518a606001518b608001518c60a001518d60c001518e60e001518f6101000151612fd2565b6127b786600001518760200151886040015189606001518a608001516130f8565b6127d385600001518660200151876040015188606001516131ca565b6127dc8461329e565b6127e582612c55565b6127ee83612d66565b8015612834576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b60655460ff16156128605760405162461bcd60e51b8152600401610f2890614972565b6128686115c4565b61289d5760405162461bcd60e51b8152602060048201526006602482015265042433a3031360d41b6044820152606401610f28565b8060fd546128ab91906148f9565b34146128e25760405162461bcd60e51b815260206004820152600660248201526542433a30313160d01b6044820152606401610f28565b60fc5461ffff168111156129215760405162461bcd60e51b815260206004820152600660248201526521219d18189960d11b6044820152606401610f28565b60fc5462010000900461ffff16816129388461171c565b6129429190614876565b11156129795760405162461bcd60e51b815260206004820152600660248201526542433a30313360d01b6044820152606401610f28565b610f448282612eee565b6001600160a01b0382166129ec5760405162461bcd60e51b815260206004820152602a60248201527f416666696c696174653a2052656769737472792063616e6e6f74206265206e756044820152696c6c206164647265737360b01b6064820152608401610f28565b80612a395760405162461bcd60e51b815260206004820152601a60248201527f416666696c696174653a207a65726f2070726f6a6563742069640000000000006044820152606401610f28565b61017080546001600160a01b0319166001600160a01b03939093169290921790915561017155565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612a96903390899088908890600401614a70565b6020604051808303816000875af1925050508015612ad1575060408051601f3d908101601f19168201909252612ace91810190614aad565b60015b612b2c573d808015612aff576040519150601f19603f3d011682016040523d82523d6000602084013e612b04565b606091505b508051612b24576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b606060ff8054610db0906147aa565b606081612b7c5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612ba65780612b9081614aca565b9150612b9f9050600a8361492e565b9150612b80565b6000816001600160401b03811115612bc057612bc0613d50565b6040519080825280601f01601f191660200182016040528015612bea576020820181803683370190505b5090505b8415611bf257612bff60018361495b565b9150612c0c600a86614ae5565b612c17906030614876565b60f81b818381518110612c2c57612c2c61499c565b60200101906001600160f81b031916908160001a905350612c4e600a8661492e565b9450612bee565b60fb546101385461010154612c6a9084614876565b612c749190614876565b1115612cab5760405162461bcd60e51b815260206004820152600660248201526529299d18181960d11b6044820152606401610f28565b80156110e757806101016000828254612cc49190614876565b90915550506033546110e7906001600160a01b0316826132f3565b6040516bffffffffffffffffffffffff19606083901b1660208201526000908190603401604051602081830303815290604052805190602001209050612d5d8585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505061013654915084905061330d565b95945050505050565b612d7881600001518260200151613323565b805160208201516040517fe12d7d5bdb8218a22277dca8f854dd4573a1cea3d3e4808dc567df9eb1c14bf49261211b9290916001600160a01b039290921682526001600160601b0316602082015260400190565b60006001600160e01b031982166380ac58cd60e01b1480612dfd57506001600160e01b03198216635b5e139f60e01b145b80610d9b57506301ffc9a760e01b6001600160e01b0319831614610d9b565b6000612e71826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166134219092919063ffffffff16565b805190915015610ef95780806020019051810190612e8f9190614af9565b610ef95760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610f28565b60fb5481612efa610f48565b612f049190614876565b1115612f3b5760405162461bcd60e51b81526020600482015260066024820152651090ce8c0c4d60d21b6044820152606401610f28565b610f4482826132f3565b60008054610100900460ff1615612f8c578160ff166001148015612f685750303b155b612f845760405162461bcd60e51b8152600401610f2890614b16565b506000919050565b60005460ff808416911610612fb35760405162461bcd60e51b8152600401610f2890614b16565b506000805460ff191660ff92909216919091179055600190565b919050565b6001600160a01b0387166130115760405162461bcd60e51b815260206004820152600660248201526542433a30303160d01b6044820152606401610f28565b856130475760405162461bcd60e51b815260206004820152600660248201526521219d18181960d11b6044820152606401610f28565b8361ffff16861015801561306357508461ffff168461ffff1610155b6130985760405162461bcd60e51b815260206004820152600660248201526542433a30303360d01b6044820152606401610f28565b6130a28989613430565b6130ab87612692565b60fb86905560fc805461ffff868116620100000263ffffffff199092169088161717905560fd83905560fe82905580516130ec9060ff906020840190613bb4565b50505050505050505050565b82156120bf57846131345760405162461bcd60e51b815260206004820152600660248201526528291d18181960d11b6044820152606401610f28565b42831161316c5760405162461bcd60e51b815260206004820152600660248201526550523a30303360d01b6044820152606401610f28565b816131a25760405162461bcd60e51b815260206004820152600660248201526514148e8c0c0d60d21b6044820152606401610f28565b61013885905561013a84905561013b8390556101398290558051156120bf576120bf816120c6565b80518251146132045760405162461bcd60e51b815260206004820152600660248201526550533a30303160d01b6044820152606401610f28565b61013580546001600160a01b0319166001600160a01b0386161790556101348390558151849083906132389060019061495b565b815181106132485761324861499c565b60200260200101906001600160a01b031690816001600160a01b031681525050828160018451613278919061495b565b815181106132885761328861499c565b6020026020010181815250506117c38282613461565b60ff6040516020016132b09190614b64565b6040516020818303038152906040528051906020012081146132e05761013c805460ff1916600117905561013d55565b61013c805461ff00191661010017905550565b610f44828260405180602001604052806000815250613492565b60008261331a8584613655565b14949350505050565b6127106001600160601b03821611156133915760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610f28565b6001600160a01b0382166133e75760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610f28565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b9091021761013e55565b6060611bf284846000856136c9565b600054610100900460ff166134575760405162461bcd60e51b8152600401610f2890614c0c565b610f4482826137fa565b600054610100900460ff166134885760405162461bcd60e51b8152600401610f2890614c0c565b610f448282613852565b60c9546001600160a01b0384166134bb57604051622e076360e81b815260040160405180910390fd5b826134d95760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038416600081815260ce6020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168b0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168b0181169092021790915585845260cd90925290912080546001600160e01b0319168317600160a01b42909316929092029190911790558190818501903b15613601575b60405182906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46135ca6000878480600101955087612a61565b6135e7576040516368d2bf6b60e11b815260040160405180910390fd5b80821061357f578260c954146135fc57600080fd5b613646565b5b6040516001830192906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808210613602575b5060c9556117c3600085838684565b600081815b84518110156136c15760008582815181106136775761367761499c565b6020026020010151905080831161369d57600083815260208290526040902092506136ae565b600081815260208490526040902092505b50806136b981614aca565b91505061365a565b509392505050565b60608247101561372a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610f28565b6001600160a01b0385163b6137815760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610f28565b600080866001600160a01b0316858760405161379d9190614c57565b60006040518083038185875af1925050503d80600081146137da576040519150601f19603f3d011682016040523d82523d6000602084013e6137df565b606091505b50915091506137ef828286613990565b979650505050505050565b600054610100900460ff166138215760405162461bcd60e51b8152600401610f2890614c0c565b81516138349060cb906020850190613bb4565b5080516138489060cc906020840190613bb4565b50600160c9555050565b600054610100900460ff166138795760405162461bcd60e51b8152600401610f2890614c0c565b80518251146138e55760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b6064820152608401610f28565b60008251116139365760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f207061796565730000000000006044820152606401610f28565b60005b8251811015610ef95761397e8382815181106139575761395761499c565b60200260200101518383815181106139715761397161499c565b60200260200101516139c9565b8061398881614aca565b915050613939565b6060831561399f575081611b01565b8251156139af5782518084602001fd5b8160405162461bcd60e51b8152600401610f289190613cd8565b6001600160a01b038216613a345760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b6064820152608401610f28565b60008111613a845760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a207368617265732061726520300000006044820152606401610f28565b6001600160a01b0382166000908152610104602052604090205415613aff5760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b6064820152608401610f28565b6101068054600181019091557fc9ef9fceea91e87b2c84ea400a44fde78842aae8aa24cd4b502ce5fb4d91e63b0180546001600160a01b0319166001600160a01b03841690811790915560009081526101046020526040902081905561010254613b6a908290614876565b61010255604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b828054613bc0906147aa565b90600052602060002090601f016020900481019282613be25760008555613c28565b82601f10613bfb57805160ff1916838001178555613c28565b82800160010185558215613c28579182015b82811115613c28578251825591602001919060010190613c0d565b50613c34929150613c38565b5090565b5b80821115613c345760008155600101613c39565b6001600160e01b0319811681146110e757600080fd5b600060208284031215613c7557600080fd5b8135611b0181613c4d565b60005b83811015613c9b578181015183820152602001613c83565b838111156117c35750506000910152565b60008151808452613cc4816020860160208601613c80565b601f01601f19169290920160200192915050565b602081526000611b016020830184613cac565b600060208284031215613cfd57600080fd5b5035919050565b6001600160a01b03811681146110e757600080fd5b8035612fcd81613d04565b60008060408385031215613d3757600080fd5b8235613d4281613d04565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715613d8857613d88613d50565b60405290565b60405161012081016001600160401b0381118282101715613d8857613d88613d50565b604051608081016001600160401b0381118282101715613d8857613d88613d50565b604051601f8201601f191681016001600160401b0381118282101715613dfb57613dfb613d50565b604052919050565b600082601f830112613e1457600080fd5b81356001600160401b03811115613e2d57613e2d613d50565b613e40601f8201601f1916602001613dd3565b818152846020838601011115613e5557600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215613e8457600080fd5b81356001600160401b03811115613e9a57600080fd5b611bf284828501613e03565b600060208284031215613eb857600080fd5b8135611b0181613d04565b600080600060608486031215613ed857600080fd5b8335613ee381613d04565b92506020840135613ef381613d04565b929592945050506040919091013590565b600060408284031215613f1657600080fd5b613f1e613d66565b90508135815260208201356001600160401b03811115613f3d57600080fd5b613f4984828501613e03565b60208301525092915050565b600060208284031215613f6757600080fd5b81356001600160401b03811115613f7d57600080fd5b611bf284828501613f04565b60008060408385031215613f9c57600080fd5b50508035926020909101359150565b60008060408385031215613fbe57600080fd5b8235613fc981613d04565b91506020830135613fd981613d04565b809150509250929050565b80151581146110e757600080fd5b6000806040838503121561400557600080fd5b823591506020830135613fd981613fe4565b60008083601f84011261402957600080fd5b5081356001600160401b0381111561404057600080fd5b6020830191508360208260051b850101111561119357600080fd5b60008060008060008060a0878903121561407457600080fd5b86356001600160401b038082111561408b57600080fd5b6140978a838b01614017565b9098509650602089013591506140ac82613d04565b90945060408801359350606088013590808211156140c957600080fd5b506140d689828a01613e03565b92505060808701356140e781613d04565b809150509295509295509295565b602081528151602082015260006020830151604080840152611bf26060840182613cac565b6000806000806060858703121561413057600080fd5b84356001600160401b0381111561414657600080fd5b61415287828801614017565b909550935050602085013561416681613d04565b9396929550929360400135925050565b803561ffff81168114612fcd57600080fd5b6000610120828403121561419b57600080fd5b6141a3613d8e565b905081356001600160401b03808211156141bc57600080fd5b6141c885838601613e03565b835260208401359150808211156141de57600080fd5b6141ea85838601613e03565b60208401526141fb60408501613d19565b60408401526060840135606084015261421660808501614176565b608084015261422760a08501614176565b60a084015260c084013560c084015260e084013560e08401526101009150818401358181111561425657600080fd5b61426286828701613e03565b8385015250505092915050565b600060a0828403121561428157600080fd5b60405160a081016001600160401b0382821081831117156142a4576142a4613d50565b816040528293508435835260208501356020840152604085013560408401526060850135606084015260808501359150808211156142e157600080fd5b506142ee85828601613f04565b6080830152505092915050565b60006001600160401b0382111561431457614314613d50565b5060051b60200190565b600082601f83011261432f57600080fd5b8135602061434461433f836142fb565b613dd3565b82815260059290921b8401810191818101908684111561436357600080fd5b8286015b8481101561437e5780358352918301918301614367565b509695505050505050565b60006080828403121561439b57600080fd5b6143a3613db1565b905081356143b081613d04565b81526020828101358183015260408301356001600160401b03808211156143d657600080fd5b818501915085601f8301126143ea57600080fd5b81356143f861433f826142fb565b81815260059190911b8301840190848101908883111561441757600080fd5b938501935b8285101561443e57843561442f81613d04565b8252938501939085019061441c565b60408701525050606085013592508083111561445957600080fd5b50506144678482850161431e565b60608301525092915050565b60006040828403121561448557600080fd5b61448d613d66565b9050813561449a81613d04565b815260208201356001600160601b03811681146144b657600080fd5b602082015292915050565b60008060008060008060e087890312156144da57600080fd5b86356001600160401b03808211156144f157600080fd5b6144fd8a838b01614188565b9750602089013591508082111561451357600080fd5b61451f8a838b0161426f565b9650604089013591508082111561453557600080fd5b5061454289828a01614389565b945050606087013592506145598860808901614473565b915060c087013590509295509295509295565b6000806040838503121561457f57600080fd5b823561458a81613d04565b91506020830135613fd981613fe4565b600080600080608085870312156145b057600080fd5b84356145bb81613d04565b93506020850135925060408501356001600160401b038111156145dd57600080fd5b6145e987828801613e03565b92505060608501356145fa81613d04565b939692955090935050565b600080600080600080600080610120898b03121561462257600080fd5b88356001600160401b038082111561463957600080fd5b6146458c838d01614188565b995060208b013591508082111561465b57600080fd5b6146678c838d0161426f565b985060408b013591508082111561467d57600080fd5b5061468a8b828c01614389565b965050606089013594506146a18a60808b01614473565b935060c089013592506146b660e08a01613d19565b915061010089013590509295985092959890939650565b600080600080608085870312156146e357600080fd5b84356146ee81613d04565b935060208501356146fe81613d04565b92506040850135915060608501356001600160401b0381111561472057600080fd5b61472c87828801613e03565b91505092959194509250565b60008060006040848603121561474d57600080fd5b83356001600160401b0381111561476357600080fd5b61476f86828701614017565b909450925050602084013561478381613d04565b809150509250925092565b6000604082840312156147a057600080fd5b611b018383614473565b600181811c908216806147be57607f821691505b602082108114156147df57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b6000821982111561488957614889614860565b500190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b60208082526006908201526550523a30303160d01b604082015260600190565b600081600019048311821515161561491357614913614860565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261493d5761493d614918565b500490565b60006020828403121561495457600080fd5b5051919050565b60008282101561496d5761496d614860565b500390565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600083516149c4818460208801613c80565b8351908301906149d8818360208801613c80565b64173539b7b760d91b9101908152600501949350505050565b828152604060208201526000611bf26040830184613cac565b608081526000614a1d6080830187613cac565b6001600160a01b03959095166020830152506040810192909252606090910152919050565b60008060408385031215614a5557600080fd5b8251614a6081613fe4565b6020939093015192949293505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614aa390830184613cac565b9695505050505050565b600060208284031215614abf57600080fd5b8151611b0181613c4d565b6000600019821415614ade57614ade614860565b5060010190565b600082614af457614af4614918565b500690565b600060208284031215614b0b57600080fd5b8151611b0181613fe4565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b600060208083526000845481600182811c915080831680614b8657607f831692505b858310811415614ba457634e487b7160e01b85526022600452602485fd5b878601838152602001818015614bc15760018114614bd257614bfd565b60ff19861682528782019650614bfd565b60008b81526020902060005b86811015614bf757815484820152908501908901614bde565b83019750505b50949998505050505050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008251614c69818460208701613c80565b919091019291505056fea2646970667358221220fa1a5c8d529d428e53ea2713eac0e3860d74830a0507ba62533f5851d10a80e364736f6c634300080b0033

Deployed Bytecode

0x6080604052600436106104345760003560e01c806370a0823111610229578063b106cbf31161012e578063d79779b2116100b6578063f2fde38b1161007a578063f2fde38b14610cf0578063f42d330114610d10578063f762066b14610d30578063ffa1ad7414610d47578063ffb6737b14610d7857600080fd5b8063d79779b214610c23578063debefaa614610c5a578063e33b7de314610c7a578063e606408314610c90578063e985e9c514610ca757600080fd5b8063c87b56dd116100fd578063c87b56dd14610b79578063cce7ec1314610b99578063ce7c2ac214610bac578063d031370b14610be3578063d6cb5bad14610c0357600080fd5b8063b106cbf314610b0e578063b88d4fde14610b2e578063bb878f7c14610b4e578063c3a9bd8b14610b6357600080fd5b8063977b055b116101b1578063a22cb46511610180578063a22cb46514610a8d578063a49a1e7d14610aad578063a5f9aaef14610acd578063a82524b214610ae4578063aed0fec714610afb57600080fd5b8063977b055b14610a0a5780639852595c14610a255780639a64a53d14610a5c578063a035b1fe14610a7757600080fd5b80638456cb59116101f85780638456cb59146109825780638b83209b146109975780638da5cb5b146109b757806392ccfc54146109d557806395d89b41146109f557600080fd5b806370a0823114610925578063715018a61461094557806378d639291461095a5780637ad9707d1461096f57600080fd5b8063394066ad1161033a57806355efaf5c116102c2578063614d08f811610286578063614d08f8146108815780636352211e146108b85780636bb7b1d9146108d85780636e6fb49f146108ee5780636f4b6b021461090357600080fd5b806355efaf5c14610815578063564566a814610828578063587e0c731461083d5780635c975abb1461085457806360d938dc1461086c57600080fd5b806342842e0e1161030957806342842e0e1461078057806348b75044146107a05780634aa2ed94146107c05780634fe99584146107d557806354214f69146107f557600080fd5b8063394066ad146106f95780633a98ef391461070e5780633f4ba83a14610724578063406072a91461073957600080fd5b806319165587116103bd5780632eb4a7ab1161038c5780632eb4a7ab14610659578063333e6f0614610670578063342ebbe0146106a4578063355959e0146106c5578063392f37e9146106e457600080fd5b806319165587146105ba57806323b872dd146105da578063284fd1f2146105fa5780632a55205a1461061a57600080fd5b8063095ea7b311610404578063095ea7b3146105365780630be4d2b8146105585780631270e10c1461057857806315a553471461058e57806318160ddd146105a557600080fd5b80620e7fa81461048257806301ffc9a7146104ac57806306fdde03146104dc578063081812fc146104fe57600080fd5b3661047d577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b34801561048e57600080fd5b5061049961013a5481565b6040519081526020015b60405180910390f35b3480156104b857600080fd5b506104cc6104c7366004613c63565b610d90565b60405190151581526020016104a3565b3480156104e857600080fd5b506104f1610da1565b6040516104a39190613cd8565b34801561050a57600080fd5b5061051e610519366004613ceb565b610e33565b6040516001600160a01b0390911681526020016104a3565b34801561054257600080fd5b50610556610551366004613d24565b610e77565b005b34801561056457600080fd5b50610556610573366004613e72565b610efe565b34801561058457600080fd5b5061017154610499565b34801561059a57600080fd5b506104996101015481565b3480156105b157600080fd5b50610499610f48565b3480156105c657600080fd5b506105566105d5366004613ea6565b610f56565b3480156105e657600080fd5b506105566105f5366004613ec3565b611089565b34801561060657600080fd5b50610556610615366004613f55565b611094565b34801561062657600080fd5b5061063a610635366004613f89565b6110ea565b604080516001600160a01b0390931683526020830191909152016104a3565b34801561066557600080fd5b506104996101365481565b34801561067c57600080fd5b5060fc546106919062010000900461ffff1681565b60405161ffff90911681526020016104a3565b3480156106b057600080fd5b506101355461051e906001600160a01b031681565b3480156106d157600080fd5b50610170546001600160a01b031661051e565b3480156106f057600080fd5b506104f161119a565b34801561070557600080fd5b506104cc611229565b34801561071a57600080fd5b5061010254610499565b34801561073057600080fd5b50610556611238565b34801561074557600080fd5b50610499610754366004613fab565b6001600160a01b0391821660009081526101086020908152604080832093909416825291909152205490565b34801561078c57600080fd5b5061055661079b366004613ec3565b6112b5565b3480156107ac57600080fd5b506105566107bb366004613fab565b6112d0565b3480156107cc57600080fd5b506104f16114ae565b3480156107e157600080fd5b506105566107f0366004613ff2565b6114bc565b34801561080157600080fd5b5061013c546104cc90610100900460ff1681565b61055661082336600461405b565b6115a1565b34801561083457600080fd5b506104cc6115c4565b34801561084957600080fd5b506104996101385481565b34801561086057600080fd5b5060655460ff166104cc565b34801561087857600080fd5b506104cc6115e5565b34801561088d57600080fd5b506104f16040518060400160405280600b81526020016a436f6c6c656374696f6e4160a81b81525081565b3480156108c457600080fd5b5061051e6108d3366004613ceb565b611620565b3480156108e457600080fd5b5061049960fe5481565b3480156108fa57600080fd5b506104f1611632565b34801561090f57600080fd5b5061091861163f565b6040516104a391906140f5565b34801561093157600080fd5b50610499610940366004613ea6565b61171c565b34801561095157600080fd5b5061055661176a565b34801561096657600080fd5b506104cc61179e565b61055661097d36600461411a565b6117b7565b34801561098e57600080fd5b506105566117c9565b3480156109a357600080fd5b5061051e6109b2366004613ceb565b61181e565b3480156109c357600080fd5b506033546001600160a01b031661051e565b3480156109e157600080fd5b506105566109f03660046144c1565b61184f565b348015610a0157600080fd5b506104f1611865565b348015610a1657600080fd5b5060fc546106919061ffff1681565b348015610a3157600080fd5b50610499610a40366004613ea6565b6001600160a01b03166000908152610105602052604090205490565b348015610a6857600080fd5b5061013c546104cc9060ff1681565b348015610a8357600080fd5b5061049960fd5481565b348015610a9957600080fd5b50610556610aa836600461456c565b611874565b348015610ab957600080fd5b50610556610ac8366004613e72565b61190a565b348015610ad957600080fd5b5061049961013d5481565b348015610af057600080fd5b5061049961013b5481565b610556610b0936600461459a565b6119a8565b348015610b1a57600080fd5b50610556610b29366004614605565b6119bf565b348015610b3a57600080fd5b50610556610b493660046146cd565b6119d7565b348015610b5a57600080fd5b506104cc611a1b565b348015610b6f57600080fd5b5061049960fb5481565b348015610b8557600080fd5b506104f1610b94366004613ceb565b611a3a565b610556610ba7366004613d24565b611b08565b348015610bb857600080fd5b50610499610bc7366004613ea6565b6001600160a01b03166000908152610104602052604090205490565b348015610bef57600080fd5b50610556610bfe366004613ceb565b611b12565b348015610c0f57600080fd5b50610556610c1e366004613e72565b611b45565b348015610c2f57600080fd5b50610499610c3e366004613ea6565b6001600160a01b03166000908152610107602052604090205490565b348015610c6657600080fd5b506104cc610c75366004614738565b611be5565b348015610c8657600080fd5b5061010354610499565b348015610c9c57600080fd5b506104996101395481565b348015610cb357600080fd5b506104cc610cc2366004613fab565b6001600160a01b03918216600090815260d06020908152604080832093909416825291909152205460ff1690565b348015610cfc57600080fd5b50610556610d0b366004613ea6565b611bfa565b348015610d1c57600080fd5b50610556610d2b36600461478e565b611c92565b348015610d3c57600080fd5b506104996101345481565b348015610d5357600080fd5b506104f1604051806040016040528060058152602001640302e312e360dc1b81525081565b348015610d8457600080fd5b506101385415156104cc565b6000610d9b82611cc5565b92915050565b606060cb8054610db0906147aa565b80601f0160208091040260200160405190810160405280929190818152602001828054610ddc906147aa565b8015610e295780601f10610dfe57610100808354040283529160200191610e29565b820191906000526020600020905b815481529060010190602001808311610e0c57829003601f168201915b5050505050905090565b6000610e3e82611cea565b610e5b576040516333d1c03960e21b815260040160405180910390fd5b50600090815260cf60205260409020546001600160a01b031690565b6000610e8282611620565b9050806001600160a01b0316836001600160a01b03161415610eb75760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614610eee57610ed18133610cc2565b610eee576040516367d9dca160e11b815260040160405180910390fd5b610ef9838383611d23565b505050565b6033546001600160a01b03163314610f315760405162461bcd60e51b8152600401610f28906147e5565b60405180910390fd5b8051610f449060ff906020840190613bb4565b5050565b60ca5460c954036000190190565b6001600160a01b03811660009081526101046020526040902054610f8c5760405162461bcd60e51b8152600401610f289061481a565b6000610f986101035490565b610fa29047614876565b90506000610fd08383610fcb866001600160a01b03166000908152610105602052604090205490565b611d7f565b905080610fef5760405162461bcd60e51b8152600401610f289061488e565b6001600160a01b0383166000908152610105602052604081208054839290611018908490614876565b925050819055508061010360008282546110329190614876565b9091555061104290508382611dbf565b604080516001600160a01b0385168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a1505050565b610ef9838383611ed8565b6033546001600160a01b031633146110be5760405162461bcd60e51b8152600401610f28906147e5565b610138546110de5760405162461bcd60e51b8152600401610f28906148d9565b6110e7816120c6565b50565b600082815261013f602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b031692820192909252829161116157506040805180820190915261013e546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090611180906001600160601b0316876148f9565b61118a919061492e565b91519350909150505b9250929050565b61010080546111a8906147aa565b80601f01602080910402602001604051908101604052809291908181526020018280546111d4906147aa565b80156112215780601f106111f657610100808354040283529160200191611221565b820191906000526020600020905b81548152906001019060200180831161120457829003601f168201915b505050505081565b6000611233612126565b905090565b6033546001600160a01b031633146112625760405162461bcd60e51b8152600401610f28906147e5565b60655460ff166112ab5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610f28565b6112b3612149565b565b610ef9838383604051806020016040528060008152506119d7565b6001600160a01b038116600090815261010460205260409020546113065760405162461bcd60e51b8152600401610f289061481a565b6001600160a01b038216600090815261010760205260408120546040516370a0823160e01b81523060048201526001600160a01b038516906370a0823190602401602060405180830381865afa158015611364573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113889190614942565b6113929190614876565b905060006113cc8383610fcb87876001600160a01b0391821660009081526101086020908152604080832093909416825291909152205490565b9050806113eb5760405162461bcd60e51b8152600401610f289061488e565b6001600160a01b0380851660009081526101086020908152604080832093871683529290529081208054839290611423908490614876565b90915550506001600160a01b0384166000908152610107602052604081208054839290611451908490614876565b9091555061146290508484836121dc565b604080516001600160a01b038581168252602082018490528616917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a250505050565b61013780546111a8906147aa565b6033546001600160a01b031633146114e65760405162461bcd60e51b8152600401610f28906147e5565b80156115465742821180156114fd575060fe548214155b801561150b575061013b5482115b6115405760405162461bcd60e51b815260206004820152600660248201526521219d18181b60d11b6044820152606401610f28565b5060fe55565b4282118015611558575061013b548214155b8015611565575060fe5482105b61159a5760405162461bcd60e51b81526020600482015260066024820152650a0a4746060760d31b6044820152606401610f28565b5061013b55565b81816115af8888888861222e565b6115ba82823461243b565b5050505050505050565b600060fe544210158015611233575060fb546115de610f48565b1415905090565b600061013b544211801561161057506101385461010154611604610f48565b61160e919061495b565b105b801561123357505060fe54421090565b600061162b82612570565b5192915050565b60ff80546111a8906147aa565b604080518082019091526000815260606020820152610138546116745760405162461bcd60e51b8152600401610f28906148d9565b60405180604001604052806101365481526020016101378054611696906147aa565b80601f01602080910402602001604051908101604052809291908181526020018280546116c2906147aa565b801561170f5780601f106116e45761010080835404028352916020019161170f565b820191906000526020600020905b8154815290600101906020018083116116f257829003601f168201915b5050505050815250905090565b60006001600160a01b038216611745576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b0316600090815260ce60205260409020546001600160401b031690565b6033546001600160a01b031633146117945760405162461bcd60e51b8152600401610f28906147e5565b6112b36000612692565b600060fb5460001415801561123357505060fe54151590565b6117c38484848461222e565b50505050565b6033546001600160a01b031633146117f35760405162461bcd60e51b8152600401610f28906147e5565b60655460ff16156118165760405162461bcd60e51b8152600401610f2890614972565b6112b36126e4565b600061010682815481106118345761183461499c565b6000918252602090912001546001600160a01b031692915050565b61185d86868686868661273c565b505050505050565b606060cc8054610db0906147aa565b6001600160a01b03821633141561189e5760405163b06307db60e01b815260040160405180910390fd5b33600081815260d0602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61191261179e565b158061192857506033546001600160a01b031633145b61195d5760405162461bcd60e51b81526020600482015260066024820152651090ce8c0c0d60d21b6044820152606401610f28565b80516119945760405162461bcd60e51b815260206004820152600660248201526542433a30303560d01b6044820152606401610f28565b8051610f4490610100906020840190613bb4565b81816119b4868661283d565b61185d82823461243b565b6119cd88888888888861273c565b6115ba8282612983565b6119e2848484611ed8565b6001600160a01b0383163b156117c3576119fe84848484612a61565b6117c3576040516368d2bf6b60e11b815260040160405180910390fd5b6000611a2961013854151590565b801561123357505061013654151590565b6060611a4582611cea565b611a795760405162461bcd60e51b8152602060048201526005602482015264148e8c0c0d60da1b6044820152606401610f28565b6000611a83612b49565b61013c5490915060ff16611ac05780611a9b84612b58565b604051602001611aac9291906149b2565b604051602081830303815290604052611b01565b61013c54610100900460ff16611ad65780611b01565b80611ae084612b58565b604051602001611af19291906149b2565b6040516020818303038152906040525b9392505050565b610f44828261283d565b6033546001600160a01b03163314611b3c5760405162461bcd60e51b8152600401610f28906147e5565b6110e781612c55565b6033546001600160a01b03163314611b6f5760405162461bcd60e51b8152600401610f28906147e5565b61013c5460ff16611bc25760405162461bcd60e51b815260206004820152601a60248201527f52657665616c61626c653a206e6f6e2072657665616c61626c650000000000006044820152606401610f28565b61013c805461ff0019166101001790558051610f449060ff906020840190613bb4565b6000611bf2848484612cdf565b949350505050565b6033546001600160a01b03163314611c245760405162461bcd60e51b8152600401610f28906147e5565b6001600160a01b038116611c895760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610f28565b6110e781612692565b6033546001600160a01b03163314611cbc5760405162461bcd60e51b8152600401610f28906147e5565b6110e781612d66565b60006001600160e01b0319821663152a902d60e11b1480610d9b5750610d9b82612dcc565b600081600111158015611cfe575060c95482105b8015610d9b575050600090815260cd6020526040902054600160e01b900460ff161590565b600082815260cf602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610102546001600160a01b0384166000908152610104602052604081205490918391611dab90866148f9565b611db5919061492e565b611bf2919061495b565b80471015611e0f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610f28565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611e5c576040519150601f19603f3d011682016040523d82523d6000602084013e611e61565b606091505b5050905080610ef95760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610f28565b6000611ee382612570565b9050836001600160a01b031681600001516001600160a01b031614611f1a5760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b0386161480611f385750611f388533610cc2565b80611f53575033611f4884610e33565b6001600160a01b0316145b905080611f7357604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038416611f9a57604051633a954ecd60e21b815260040160405180910390fd5b611fa660008487611d23565b6001600160a01b03858116600090815260ce60209081526040808320805467ffffffffffffffff198082166001600160401b039283166000190183161790925589861680865283862080549384169383166001908101841694909417905589865260cd90945282852080546001600160e01b031916909417600160a01b4290921691909102178355870180845292208054919390911661207a5760c954821461207a57805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b80516101365560208082015180516120e392610137920190613bb4565b50805160208201516040517f75078ba3468553e61a92ecd8e7ad522e4341db903a24a4d4e3cd266a5c9811ba9261211b9290916149f1565b60405180910390a150565b6101715460009015801590611233575050610170546001600160a01b0316151590565b60655460ff166121925760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610f28565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610ef9908490612e1c565b60655460ff16156122515760405162461bcd60e51b8152600401610f2890614972565b610138546122715760405162461bcd60e51b8152600401610f28906148d9565b6122796115e5565b6122ae5760405162461bcd60e51b815260206004820152600660248201526550523a30303960d01b6044820152606401610f28565b6122b6611a1b565b6122c15760016122cc565b6122cc848484612cdf565b6123015760405162461bcd60e51b815260206004820152600660248201526550523a30313160d01b6044820152606401610f28565b610138548161010154612312610f48565b61231c919061495b565b6123269190614876565b111561235d5760405162461bcd60e51b815260206004820152600660248201526550523a30313360d01b6044820152606401610f28565b8061013a5461236c91906148f9565b34146123a35760405162461bcd60e51b8152602060048201526006602482015265050523a3031360d41b6044820152606401610f28565b60fc5461ffff168111156123e25760405162461bcd60e51b815260206004820152600660248201526514148e8c0c4d60d21b6044820152606401610f28565b61013954816123f08461171c565b6123fa9190614876565b11156124315760405162461bcd60e51b815260206004820152600660248201526528291d18189960d11b6044820152606401610f28565b6117c38282612eee565b612443612126565b61248f5760405162461bcd60e51b815260206004820152601a60248201527f416666696c696174653a206e6f7420696e697469616c697365640000000000006044820152606401610f28565b610170546101715460405163a765d5a760e01b815260009283926001600160a01b039091169163a765d5a7916124cd91899189918990600401614a0a565b6040805180830381865afa1580156124e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061250d9190614a42565b909250905081156120bf576125228482611dbf565b61017154846001600160a01b03167f08eb2dd1a6ec23591aa38e6f2274b051fee374cefba4d15720e2c360648f1dbd8360405161256191815260200190565b60405180910390a35050505050565b604080516060810182526000808252602082018190529181019190915281806001116126795760c95481101561267957600081815260cd6020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161515918101829052906126775780516001600160a01b03161561260e579392505050565b5060001901600081815260cd6020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215612672579392505050565b61260e565b505b604051636f96cda160e11b815260040160405180910390fd5b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60655460ff16156127075760405162461bcd60e51b8152600401610f2890614972565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121bf3390565b60006127486001612f45565b90508015612760576000805461ff0019166101001790555b6127968760000151886020015189604001518a606001518b608001518c60a001518d60c001518e60e001518f6101000151612fd2565b6127b786600001518760200151886040015189606001518a608001516130f8565b6127d385600001518660200151876040015188606001516131ca565b6127dc8461329e565b6127e582612c55565b6127ee83612d66565b8015612834576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b60655460ff16156128605760405162461bcd60e51b8152600401610f2890614972565b6128686115c4565b61289d5760405162461bcd60e51b8152602060048201526006602482015265042433a3031360d41b6044820152606401610f28565b8060fd546128ab91906148f9565b34146128e25760405162461bcd60e51b815260206004820152600660248201526542433a30313160d01b6044820152606401610f28565b60fc5461ffff168111156129215760405162461bcd60e51b815260206004820152600660248201526521219d18189960d11b6044820152606401610f28565b60fc5462010000900461ffff16816129388461171c565b6129429190614876565b11156129795760405162461bcd60e51b815260206004820152600660248201526542433a30313360d01b6044820152606401610f28565b610f448282612eee565b6001600160a01b0382166129ec5760405162461bcd60e51b815260206004820152602a60248201527f416666696c696174653a2052656769737472792063616e6e6f74206265206e756044820152696c6c206164647265737360b01b6064820152608401610f28565b80612a395760405162461bcd60e51b815260206004820152601a60248201527f416666696c696174653a207a65726f2070726f6a6563742069640000000000006044820152606401610f28565b61017080546001600160a01b0319166001600160a01b03939093169290921790915561017155565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612a96903390899088908890600401614a70565b6020604051808303816000875af1925050508015612ad1575060408051601f3d908101601f19168201909252612ace91810190614aad565b60015b612b2c573d808015612aff576040519150601f19603f3d011682016040523d82523d6000602084013e612b04565b606091505b508051612b24576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b606060ff8054610db0906147aa565b606081612b7c5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612ba65780612b9081614aca565b9150612b9f9050600a8361492e565b9150612b80565b6000816001600160401b03811115612bc057612bc0613d50565b6040519080825280601f01601f191660200182016040528015612bea576020820181803683370190505b5090505b8415611bf257612bff60018361495b565b9150612c0c600a86614ae5565b612c17906030614876565b60f81b818381518110612c2c57612c2c61499c565b60200101906001600160f81b031916908160001a905350612c4e600a8661492e565b9450612bee565b60fb546101385461010154612c6a9084614876565b612c749190614876565b1115612cab5760405162461bcd60e51b815260206004820152600660248201526529299d18181960d11b6044820152606401610f28565b80156110e757806101016000828254612cc49190614876565b90915550506033546110e7906001600160a01b0316826132f3565b6040516bffffffffffffffffffffffff19606083901b1660208201526000908190603401604051602081830303815290604052805190602001209050612d5d8585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505061013654915084905061330d565b95945050505050565b612d7881600001518260200151613323565b805160208201516040517fe12d7d5bdb8218a22277dca8f854dd4573a1cea3d3e4808dc567df9eb1c14bf49261211b9290916001600160a01b039290921682526001600160601b0316602082015260400190565b60006001600160e01b031982166380ac58cd60e01b1480612dfd57506001600160e01b03198216635b5e139f60e01b145b80610d9b57506301ffc9a760e01b6001600160e01b0319831614610d9b565b6000612e71826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166134219092919063ffffffff16565b805190915015610ef95780806020019051810190612e8f9190614af9565b610ef95760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610f28565b60fb5481612efa610f48565b612f049190614876565b1115612f3b5760405162461bcd60e51b81526020600482015260066024820152651090ce8c0c4d60d21b6044820152606401610f28565b610f4482826132f3565b60008054610100900460ff1615612f8c578160ff166001148015612f685750303b155b612f845760405162461bcd60e51b8152600401610f2890614b16565b506000919050565b60005460ff808416911610612fb35760405162461bcd60e51b8152600401610f2890614b16565b506000805460ff191660ff92909216919091179055600190565b919050565b6001600160a01b0387166130115760405162461bcd60e51b815260206004820152600660248201526542433a30303160d01b6044820152606401610f28565b856130475760405162461bcd60e51b815260206004820152600660248201526521219d18181960d11b6044820152606401610f28565b8361ffff16861015801561306357508461ffff168461ffff1610155b6130985760405162461bcd60e51b815260206004820152600660248201526542433a30303360d01b6044820152606401610f28565b6130a28989613430565b6130ab87612692565b60fb86905560fc805461ffff868116620100000263ffffffff199092169088161717905560fd83905560fe82905580516130ec9060ff906020840190613bb4565b50505050505050505050565b82156120bf57846131345760405162461bcd60e51b815260206004820152600660248201526528291d18181960d11b6044820152606401610f28565b42831161316c5760405162461bcd60e51b815260206004820152600660248201526550523a30303360d01b6044820152606401610f28565b816131a25760405162461bcd60e51b815260206004820152600660248201526514148e8c0c0d60d21b6044820152606401610f28565b61013885905561013a84905561013b8390556101398290558051156120bf576120bf816120c6565b80518251146132045760405162461bcd60e51b815260206004820152600660248201526550533a30303160d01b6044820152606401610f28565b61013580546001600160a01b0319166001600160a01b0386161790556101348390558151849083906132389060019061495b565b815181106132485761324861499c565b60200260200101906001600160a01b031690816001600160a01b031681525050828160018451613278919061495b565b815181106132885761328861499c565b6020026020010181815250506117c38282613461565b60ff6040516020016132b09190614b64565b6040516020818303038152906040528051906020012081146132e05761013c805460ff1916600117905561013d55565b61013c805461ff00191661010017905550565b610f44828260405180602001604052806000815250613492565b60008261331a8584613655565b14949350505050565b6127106001600160601b03821611156133915760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610f28565b6001600160a01b0382166133e75760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610f28565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b9091021761013e55565b6060611bf284846000856136c9565b600054610100900460ff166134575760405162461bcd60e51b8152600401610f2890614c0c565b610f4482826137fa565b600054610100900460ff166134885760405162461bcd60e51b8152600401610f2890614c0c565b610f448282613852565b60c9546001600160a01b0384166134bb57604051622e076360e81b815260040160405180910390fd5b826134d95760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038416600081815260ce6020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168b0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168b0181169092021790915585845260cd90925290912080546001600160e01b0319168317600160a01b42909316929092029190911790558190818501903b15613601575b60405182906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46135ca6000878480600101955087612a61565b6135e7576040516368d2bf6b60e11b815260040160405180910390fd5b80821061357f578260c954146135fc57600080fd5b613646565b5b6040516001830192906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808210613602575b5060c9556117c3600085838684565b600081815b84518110156136c15760008582815181106136775761367761499c565b6020026020010151905080831161369d57600083815260208290526040902092506136ae565b600081815260208490526040902092505b50806136b981614aca565b91505061365a565b509392505050565b60608247101561372a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610f28565b6001600160a01b0385163b6137815760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610f28565b600080866001600160a01b0316858760405161379d9190614c57565b60006040518083038185875af1925050503d80600081146137da576040519150601f19603f3d011682016040523d82523d6000602084013e6137df565b606091505b50915091506137ef828286613990565b979650505050505050565b600054610100900460ff166138215760405162461bcd60e51b8152600401610f2890614c0c565b81516138349060cb906020850190613bb4565b5080516138489060cc906020840190613bb4565b50600160c9555050565b600054610100900460ff166138795760405162461bcd60e51b8152600401610f2890614c0c565b80518251146138e55760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b6064820152608401610f28565b60008251116139365760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f207061796565730000000000006044820152606401610f28565b60005b8251811015610ef95761397e8382815181106139575761395761499c565b60200260200101518383815181106139715761397161499c565b60200260200101516139c9565b8061398881614aca565b915050613939565b6060831561399f575081611b01565b8251156139af5782518084602001fd5b8160405162461bcd60e51b8152600401610f289190613cd8565b6001600160a01b038216613a345760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b6064820152608401610f28565b60008111613a845760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a207368617265732061726520300000006044820152606401610f28565b6001600160a01b0382166000908152610104602052604090205415613aff5760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b6064820152608401610f28565b6101068054600181019091557fc9ef9fceea91e87b2c84ea400a44fde78842aae8aa24cd4b502ce5fb4d91e63b0180546001600160a01b0319166001600160a01b03841690811790915560009081526101046020526040902081905561010254613b6a908290614876565b61010255604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b828054613bc0906147aa565b90600052602060002090601f016020900481019282613be25760008555613c28565b82601f10613bfb57805160ff1916838001178555613c28565b82800160010185558215613c28579182015b82811115613c28578251825591602001919060010190613c0d565b50613c34929150613c38565b5090565b5b80821115613c345760008155600101613c39565b6001600160e01b0319811681146110e757600080fd5b600060208284031215613c7557600080fd5b8135611b0181613c4d565b60005b83811015613c9b578181015183820152602001613c83565b838111156117c35750506000910152565b60008151808452613cc4816020860160208601613c80565b601f01601f19169290920160200192915050565b602081526000611b016020830184613cac565b600060208284031215613cfd57600080fd5b5035919050565b6001600160a01b03811681146110e757600080fd5b8035612fcd81613d04565b60008060408385031215613d3757600080fd5b8235613d4281613d04565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715613d8857613d88613d50565b60405290565b60405161012081016001600160401b0381118282101715613d8857613d88613d50565b604051608081016001600160401b0381118282101715613d8857613d88613d50565b604051601f8201601f191681016001600160401b0381118282101715613dfb57613dfb613d50565b604052919050565b600082601f830112613e1457600080fd5b81356001600160401b03811115613e2d57613e2d613d50565b613e40601f8201601f1916602001613dd3565b818152846020838601011115613e5557600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215613e8457600080fd5b81356001600160401b03811115613e9a57600080fd5b611bf284828501613e03565b600060208284031215613eb857600080fd5b8135611b0181613d04565b600080600060608486031215613ed857600080fd5b8335613ee381613d04565b92506020840135613ef381613d04565b929592945050506040919091013590565b600060408284031215613f1657600080fd5b613f1e613d66565b90508135815260208201356001600160401b03811115613f3d57600080fd5b613f4984828501613e03565b60208301525092915050565b600060208284031215613f6757600080fd5b81356001600160401b03811115613f7d57600080fd5b611bf284828501613f04565b60008060408385031215613f9c57600080fd5b50508035926020909101359150565b60008060408385031215613fbe57600080fd5b8235613fc981613d04565b91506020830135613fd981613d04565b809150509250929050565b80151581146110e757600080fd5b6000806040838503121561400557600080fd5b823591506020830135613fd981613fe4565b60008083601f84011261402957600080fd5b5081356001600160401b0381111561404057600080fd5b6020830191508360208260051b850101111561119357600080fd5b60008060008060008060a0878903121561407457600080fd5b86356001600160401b038082111561408b57600080fd5b6140978a838b01614017565b9098509650602089013591506140ac82613d04565b90945060408801359350606088013590808211156140c957600080fd5b506140d689828a01613e03565b92505060808701356140e781613d04565b809150509295509295509295565b602081528151602082015260006020830151604080840152611bf26060840182613cac565b6000806000806060858703121561413057600080fd5b84356001600160401b0381111561414657600080fd5b61415287828801614017565b909550935050602085013561416681613d04565b9396929550929360400135925050565b803561ffff81168114612fcd57600080fd5b6000610120828403121561419b57600080fd5b6141a3613d8e565b905081356001600160401b03808211156141bc57600080fd5b6141c885838601613e03565b835260208401359150808211156141de57600080fd5b6141ea85838601613e03565b60208401526141fb60408501613d19565b60408401526060840135606084015261421660808501614176565b608084015261422760a08501614176565b60a084015260c084013560c084015260e084013560e08401526101009150818401358181111561425657600080fd5b61426286828701613e03565b8385015250505092915050565b600060a0828403121561428157600080fd5b60405160a081016001600160401b0382821081831117156142a4576142a4613d50565b816040528293508435835260208501356020840152604085013560408401526060850135606084015260808501359150808211156142e157600080fd5b506142ee85828601613f04565b6080830152505092915050565b60006001600160401b0382111561431457614314613d50565b5060051b60200190565b600082601f83011261432f57600080fd5b8135602061434461433f836142fb565b613dd3565b82815260059290921b8401810191818101908684111561436357600080fd5b8286015b8481101561437e5780358352918301918301614367565b509695505050505050565b60006080828403121561439b57600080fd5b6143a3613db1565b905081356143b081613d04565b81526020828101358183015260408301356001600160401b03808211156143d657600080fd5b818501915085601f8301126143ea57600080fd5b81356143f861433f826142fb565b81815260059190911b8301840190848101908883111561441757600080fd5b938501935b8285101561443e57843561442f81613d04565b8252938501939085019061441c565b60408701525050606085013592508083111561445957600080fd5b50506144678482850161431e565b60608301525092915050565b60006040828403121561448557600080fd5b61448d613d66565b9050813561449a81613d04565b815260208201356001600160601b03811681146144b657600080fd5b602082015292915050565b60008060008060008060e087890312156144da57600080fd5b86356001600160401b03808211156144f157600080fd5b6144fd8a838b01614188565b9750602089013591508082111561451357600080fd5b61451f8a838b0161426f565b9650604089013591508082111561453557600080fd5b5061454289828a01614389565b945050606087013592506145598860808901614473565b915060c087013590509295509295509295565b6000806040838503121561457f57600080fd5b823561458a81613d04565b91506020830135613fd981613fe4565b600080600080608085870312156145b057600080fd5b84356145bb81613d04565b93506020850135925060408501356001600160401b038111156145dd57600080fd5b6145e987828801613e03565b92505060608501356145fa81613d04565b939692955090935050565b600080600080600080600080610120898b03121561462257600080fd5b88356001600160401b038082111561463957600080fd5b6146458c838d01614188565b995060208b013591508082111561465b57600080fd5b6146678c838d0161426f565b985060408b013591508082111561467d57600080fd5b5061468a8b828c01614389565b965050606089013594506146a18a60808b01614473565b935060c089013592506146b660e08a01613d19565b915061010089013590509295985092959890939650565b600080600080608085870312156146e357600080fd5b84356146ee81613d04565b935060208501356146fe81613d04565b92506040850135915060608501356001600160401b0381111561472057600080fd5b61472c87828801613e03565b91505092959194509250565b60008060006040848603121561474d57600080fd5b83356001600160401b0381111561476357600080fd5b61476f86828701614017565b909450925050602084013561478381613d04565b809150509250925092565b6000604082840312156147a057600080fd5b611b018383614473565b600181811c908216806147be57607f821691505b602082108114156147df57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b6000821982111561488957614889614860565b500190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b60208082526006908201526550523a30303160d01b604082015260600190565b600081600019048311821515161561491357614913614860565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261493d5761493d614918565b500490565b60006020828403121561495457600080fd5b5051919050565b60008282101561496d5761496d614860565b500390565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600083516149c4818460208801613c80565b8351908301906149d8818360208801613c80565b64173539b7b760d91b9101908152600501949350505050565b828152604060208201526000611bf26040830184613cac565b608081526000614a1d6080830187613cac565b6001600160a01b03959095166020830152506040810192909252606090910152919050565b60008060408385031215614a5557600080fd5b8251614a6081613fe4565b6020939093015192949293505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614aa390830184613cac565b9695505050505050565b600060208284031215614abf57600080fd5b8151611b0181613c4d565b6000600019821415614ade57614ade614860565b5060010190565b600082614af457614af4614918565b500690565b600060208284031215614b0b57600080fd5b8151611b0181613fe4565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b600060208083526000845481600182811c915080831680614b8657607f831692505b858310811415614ba457634e487b7160e01b85526022600452602485fd5b878601838152602001818015614bc15760018114614bd257614bfd565b60ff19861682528782019650614bfd565b60008b81526020902060005b86811015614bf757815484820152908501908901614bde565b83019750505b50949998505050505050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008251614c69818460208701613c80565b919091019291505056fea2646970667358221220fa1a5c8d529d428e53ea2713eac0e3860d74830a0507ba62533f5851d10a80e364736f6c634300080b0033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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