creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "lib/ERC721A/contracts/IERC721A.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// ERC721A Contracts v4.2.2\n// Creator: Chiru Labs\n\npragma solidity ^0.8.4;\n\n/**\n * @dev Interface of ERC721A.\n */\ninterface IERC721A {\n    /**\n     * The caller must own the token or be an approved operator.\n     */\n    error ApprovalCallerNotOwnerNorApproved();\n\n    /**\n     * The token does not exist.\n     */\n    error ApprovalQueryForNonexistentToken();\n\n    /**\n     * Cannot query the balance for the zero address.\n     */\n    error BalanceQueryForZeroAddress();\n\n    /**\n     * Cannot mint to the zero address.\n     */\n    error MintToZeroAddress();\n\n    /**\n     * The quantity of tokens minted must be more than zero.\n     */\n    error MintZeroQuantity();\n\n    /**\n     * The token does not exist.\n     */\n    error OwnerQueryForNonexistentToken();\n\n    /**\n     * The caller must own the token or be an approved operator.\n     */\n    error TransferCallerNotOwnerNorApproved();\n\n    /**\n     * The token must be owned by `from`.\n     */\n    error TransferFromIncorrectOwner();\n\n    /**\n     * Cannot safely transfer to a contract that does not implement the\n     * ERC721Receiver interface.\n     */\n    error TransferToNonERC721ReceiverImplementer();\n\n    /**\n     * Cannot transfer to the zero address.\n     */\n    error TransferToZeroAddress();\n\n    /**\n     * The token does not exist.\n     */\n    error URIQueryForNonexistentToken();\n\n    /**\n     * The `quantity` minted with ERC2309 exceeds the safety limit.\n     */\n    error MintERC2309QuantityExceedsLimit();\n\n    /**\n     * The `extraData` cannot be set on an unintialized ownership slot.\n     */\n    error OwnershipNotInitializedForExtraData();\n\n    // =============================================================\n    //                            STRUCTS\n    // =============================================================\n\n    struct TokenOwnership {\n        // The address of the owner.\n        address addr;\n        // Stores the start time of ownership with minimal overhead for tokenomics.\n        uint64 startTimestamp;\n        // Whether the token has been burned.\n        bool burned;\n        // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}.\n        uint24 extraData;\n    }\n\n    // =============================================================\n    //                         TOKEN COUNTERS\n    // =============================================================\n\n    /**\n     * @dev Returns the total number of tokens in existence.\n     * Burned tokens will reduce the count.\n     * To get the total number of tokens minted, please see {_totalMinted}.\n     */\n    function totalSupply() external view returns (uint256);\n\n    // =============================================================\n    //                            IERC165\n    // =============================================================\n\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n\n    // =============================================================\n    //                            IERC721\n    // =============================================================\n\n    /**\n     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n    /**\n     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n     */\n    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n    /**\n     * @dev Emitted when `owner` enables or disables\n     * (`approved`) `operator` to manage all of its assets.\n     */\n    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n    /**\n     * @dev Returns the number of tokens in `owner`'s account.\n     */\n    function balanceOf(address owner) external view returns (uint256 balance);\n\n    /**\n     * @dev Returns the owner of the `tokenId` token.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function ownerOf(uint256 tokenId) external view returns (address owner);\n\n    /**\n     * @dev Safely transfers `tokenId` token from `from` to `to`,\n     * checking first that contract recipients are aware of the ERC721 protocol\n     * to prevent tokens from being forever locked.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must exist and be owned by `from`.\n     * - If the caller is not `from`, it must be have been allowed to move\n     * this token by either {approve} or {setApprovalForAll}.\n     * - If `to` refers to a smart contract, it must implement\n     * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId,\n        bytes calldata data\n    ) external;\n\n    /**\n     * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) external;\n\n    /**\n     * @dev Transfers `tokenId` from `from` to `to`.\n     *\n     * WARNING: Usage of this method is discouraged, use {safeTransferFrom}\n     * whenever possible.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must be owned by `from`.\n     * - If the caller is not `from`, it must be approved to move this token\n     * by either {approve} or {setApprovalForAll}.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) external;\n\n    /**\n     * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n     * The approval is cleared when the token is transferred.\n     *\n     * Only a single account can be approved at a time, so approving the\n     * zero address clears previous approvals.\n     *\n     * Requirements:\n     *\n     * - The caller must own the token or be an approved operator.\n     * - `tokenId` must exist.\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address to, uint256 tokenId) external;\n\n    /**\n     * @dev Approve or remove `operator` as an operator for the caller.\n     * Operators can call {transferFrom} or {safeTransferFrom}\n     * for any token owned by the caller.\n     *\n     * Requirements:\n     *\n     * - The `operator` cannot be the caller.\n     *\n     * Emits an {ApprovalForAll} event.\n     */\n    function setApprovalForAll(address operator, bool _approved) external;\n\n    /**\n     * @dev Returns the account approved for `tokenId` token.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function getApproved(uint256 tokenId) external view returns (address operator);\n\n    /**\n     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n     *\n     * See {setApprovalForAll}.\n     */\n    function isApprovedForAll(address owner, address operator) external view returns (bool);\n\n    // =============================================================\n    //                        IERC721Metadata\n    // =============================================================\n\n    /**\n     * @dev Returns the token collection name.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the token collection symbol.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\n     */\n    function tokenURI(uint256 tokenId) external view returns (string memory);\n\n    // =============================================================\n    //                           IERC2309\n    // =============================================================\n\n    /**\n     * @dev Emitted when tokens in `fromTokenId` to `toTokenId`\n     * (inclusive) is transferred from `from` to `to`, as defined in the\n     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard.\n     *\n     * See {_mintERC2309} for more details.\n     */\n    event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);\n}\n"
      },
      "lib/openzeppelin-contracts/contracts/interfaces/IERC2981.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Interface for the NFT Royalty Standard.\n *\n * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal\n * support for royalty payments across all NFT marketplaces and ecosystem participants.\n *\n * _Available since v4.5._\n */\ninterface IERC2981 is IERC165 {\n    /**\n     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of\n     * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.\n     */\n    function royaltyInfo(uint256 tokenId, uint256 salePrice)\n        external\n        view\n        returns (address receiver, uint256 royaltyAmount);\n}\n"
      },
      "lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30 000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"
      },
      "lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * contract MyToken is ERC20Upgradeable {\n *     function initialize() initializer public {\n *         __ERC20_init(\"MyToken\", \"MTK\");\n *     }\n * }\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n *     function initializeV2() reinitializer(2) public {\n *         __ERC20Permit_init(\"MyToken\");\n *     }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n *     _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n    /**\n     * @dev Indicates that the contract has been initialized.\n     * @custom:oz-retyped-from bool\n     */\n    uint8 private _initialized;\n\n    /**\n     * @dev Indicates that the contract is in the process of being initialized.\n     */\n    bool private _initializing;\n\n    /**\n     * @dev Triggered when the contract has been initialized or reinitialized.\n     */\n    event Initialized(uint8 version);\n\n    /**\n     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n     * `onlyInitializing` functions can be used to initialize parent contracts.\n     *\n     * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n     * constructor.\n     *\n     * Emits an {Initialized} event.\n     */\n    modifier initializer() {\n        bool isTopLevelCall = !_initializing;\n        require(\n            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n            \"Initializable: contract is already initialized\"\n        );\n        _initialized = 1;\n        if (isTopLevelCall) {\n            _initializing = true;\n        }\n        _;\n        if (isTopLevelCall) {\n            _initializing = false;\n            emit Initialized(1);\n        }\n    }\n\n    /**\n     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n     * used to initialize parent contracts.\n     *\n     * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n     * are added through upgrades and that require initialization.\n     *\n     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n     * cannot be nested. If one is invoked in the context of another, execution will revert.\n     *\n     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n     * a contract, executing them in the right order is up to the developer or operator.\n     *\n     * WARNING: setting the version to 255 will prevent any future reinitialization.\n     *\n     * Emits an {Initialized} event.\n     */\n    modifier reinitializer(uint8 version) {\n        require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n        _initialized = version;\n        _initializing = true;\n        _;\n        _initializing = false;\n        emit Initialized(version);\n    }\n\n    /**\n     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n     * {initializer} and {reinitializer} modifiers, directly or indirectly.\n     */\n    modifier onlyInitializing() {\n        require(_initializing, \"Initializable: contract is not initializing\");\n        _;\n    }\n\n    /**\n     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n     * through proxies.\n     *\n     * Emits an {Initialized} event the first time it is successfully executed.\n     */\n    function _disableInitializers() internal virtual {\n        require(!_initializing, \"Initializable: contract is initializing\");\n        if (_initialized != type(uint8).max) {\n            _initialized = type(uint8).max;\n            emit Initialized(type(uint8).max);\n        }\n    }\n\n    /**\n     * @dev Internal function that returns the initialized version. Returns `_initialized`\n     */\n    function _getInitializedVersion() internal view returns (uint8) {\n        return _initialized;\n    }\n\n    /**\n     * @dev Internal function that returns the initialized version. Returns `_initializing`\n     */\n    function _isInitializing() internal view returns (bool) {\n        return _initializing;\n    }\n}\n"
      },
      "lib/openzeppelin-contracts-upgradeable/contracts/security/ReentrancyGuardUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuardUpgradeable is Initializable {\n    // Booleans are more expensive than uint256 or any type that takes up a full\n    // word because each write operation emits an extra SLOAD to first read the\n    // slot's contents, replace the bits taken up by the boolean, and then write\n    // back. This is the compiler's defense against contract upgrades and\n    // pointer aliasing, and it cannot be disabled.\n\n    // The values being non-zero value makes deployment a bit more expensive,\n    // but in exchange the refund on every call to nonReentrant will be lower in\n    // amount. Since refunds are capped to a percentage of the total\n    // transaction's gas, it is best to keep them low in cases like this one, to\n    // increase the likelihood of the full refund coming into effect.\n    uint256 private constant _NOT_ENTERED = 1;\n    uint256 private constant _ENTERED = 2;\n\n    uint256 private _status;\n\n    function __ReentrancyGuard_init() internal onlyInitializing {\n        __ReentrancyGuard_init_unchained();\n    }\n\n    function __ReentrancyGuard_init_unchained() internal onlyInitializing {\n        _status = _NOT_ENTERED;\n    }\n\n    /**\n     * @dev Prevents a contract from calling itself, directly or indirectly.\n     * Calling a `nonReentrant` function from another `nonReentrant`\n     * function is not supported. It is possible to prevent this from happening\n     * by making the `nonReentrant` function external, and making it call a\n     * `private` function that does the actual work.\n     */\n    modifier nonReentrant() {\n        _nonReentrantBefore();\n        _;\n        _nonReentrantAfter();\n    }\n\n    function _nonReentrantBefore() private {\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\n        require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n        // Any calls to nonReentrant after this point will fail\n        _status = _ENTERED;\n    }\n\n    function _nonReentrantAfter() private {\n        // By storing the original value once again, a refund is triggered (see\n        // https://eips.ethereum.org/EIPS/eip-2200)\n        _status = _NOT_ENTERED;\n    }\n\n    /**\n     * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n     * `nonReentrant` function in the call stack.\n     */\n    function _reentrancyGuardEntered() internal view returns (bool) {\n        return _status == _ENTERED;\n    }\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[49] private __gap;\n}\n"
      },
      "lib/openzeppelin-contracts-upgradeable/contracts/utils/AddressUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n    /**\n     * @dev Returns true if `account` is a contract.\n     *\n     * [IMPORTANT]\n     * ====\n     * It is unsafe to assume that an address for which this function returns\n     * false is an externally-owned account (EOA) and not a contract.\n     *\n     * Among others, `isContract` will return false for the following\n     * types of addresses:\n     *\n     *  - an externally-owned account\n     *  - a contract in construction\n     *  - an address where a contract will be created\n     *  - an address where a contract lived, but was destroyed\n     * ====\n     *\n     * [IMPORTANT]\n     * ====\n     * You shouldn't rely on `isContract` to protect against flash loan attacks!\n     *\n     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n     * constructor.\n     * ====\n     */\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize/address.code.length, which returns 0\n        // for contracts in construction, since the code is only stored at the end\n        // of the constructor execution.\n\n        return account.code.length > 0;\n    }\n\n    /**\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n     * `recipient`, forwarding all available gas and reverting on errors.\n     *\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\n     * imposed by `transfer`, making them unable to receive funds via\n     * `transfer`. {sendValue} removes this limitation.\n     *\n     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n     *\n     * IMPORTANT: because control is transferred to `recipient`, care must be\n     * taken to not create reentrancy vulnerabilities. Consider using\n     * {ReentrancyGuard} or the\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n    /**\n     * @dev Performs a Solidity function call using a low level `call`. A\n     * plain `call` is an unsafe replacement for a function call: use this\n     * function instead.\n     *\n     * If `target` reverts with a revert reason, it is bubbled up by this\n     * function (like regular Solidity function calls).\n     *\n     * Returns the raw returned data. To convert to the expected return value,\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n     *\n     * Requirements:\n     *\n     * - `target` must be a contract.\n     * - calling `target` with `data` must not revert.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n     * `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but also transferring `value` wei to `target`.\n     *\n     * Requirements:\n     *\n     * - the calling contract must have an ETH balance of at least `value`.\n     * - the called Solidity function must be `payable`.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance >= value, \"Address: insufficient balance for call\");\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n     *\n     * _Available since v4.8._\n     */\n    function verifyCallResultFromTarget(\n        address target,\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        if (success) {\n            if (returndata.length == 0) {\n                // only check isContract if the call was successful and the return data is empty\n                // otherwise we already know that it was a contract\n                require(isContract(target), \"Address: call to non-contract\");\n            }\n            return returndata;\n        } else {\n            _revert(returndata, errorMessage);\n        }\n    }\n\n    /**\n     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n     * revert reason or using the provided one.\n     *\n     * _Available since v4.3._\n     */\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            _revert(returndata, errorMessage);\n        }\n    }\n\n    function _revert(bytes memory returndata, string memory errorMessage) private pure {\n        // Look for revert reason and bubble it up if present\n        if (returndata.length > 0) {\n            // The easiest way to bubble the revert reason is using memory via assembly\n            /// @solidity memory-safe-assembly\n            assembly {\n                let returndata_size := mload(returndata)\n                revert(add(32, returndata), returndata_size)\n            }\n        } else {\n            revert(errorMessage);\n        }\n    }\n}\n"
      },
      "lib/operator-filter-registry/src/IOperatorFilterRegistry.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.13;\n\ninterface IOperatorFilterRegistry {\n    /**\n     * @notice Returns true if operator is not filtered for a given token, either by address or codeHash. Also returns\n     *         true if supplied registrant address is not registered.\n     */\n    function isOperatorAllowed(address registrant, address operator) external view returns (bool);\n\n    /**\n     * @notice Registers an address with the registry. May be called by address itself or by EIP-173 owner.\n     */\n    function register(address registrant) external;\n\n    /**\n     * @notice Registers an address with the registry and \"subscribes\" to another address's filtered operators and codeHashes.\n     */\n    function registerAndSubscribe(address registrant, address subscription) external;\n\n    /**\n     * @notice Registers an address with the registry and copies the filtered operators and codeHashes from another\n     *         address without subscribing.\n     */\n    function registerAndCopyEntries(address registrant, address registrantToCopy) external;\n\n    /**\n     * @notice Unregisters an address with the registry and removes its subscription. May be called by address itself or by EIP-173 owner.\n     *         Note that this does not remove any filtered addresses or codeHashes.\n     *         Also note that any subscriptions to this registrant will still be active and follow the existing filtered addresses and codehashes.\n     */\n    function unregister(address addr) external;\n\n    /**\n     * @notice Update an operator address for a registered address - when filtered is true, the operator is filtered.\n     */\n    function updateOperator(address registrant, address operator, bool filtered) external;\n\n    /**\n     * @notice Update multiple operators for a registered address - when filtered is true, the operators will be filtered. Reverts on duplicates.\n     */\n    function updateOperators(address registrant, address[] calldata operators, bool filtered) external;\n\n    /**\n     * @notice Update a codeHash for a registered address - when filtered is true, the codeHash is filtered.\n     */\n    function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;\n\n    /**\n     * @notice Update multiple codeHashes for a registered address - when filtered is true, the codeHashes will be filtered. Reverts on duplicates.\n     */\n    function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;\n\n    /**\n     * @notice Subscribe an address to another registrant's filtered operators and codeHashes. Will remove previous\n     *         subscription if present.\n     *         Note that accounts with subscriptions may go on to subscribe to other accounts - in this case,\n     *         subscriptions will not be forwarded. Instead the former subscription's existing entries will still be\n     *         used.\n     */\n    function subscribe(address registrant, address registrantToSubscribe) external;\n\n    /**\n     * @notice Unsubscribe an address from its current subscribed registrant, and optionally copy its filtered operators and codeHashes.\n     */\n    function unsubscribe(address registrant, bool copyExistingEntries) external;\n\n    /**\n     * @notice Get the subscription address of a given registrant, if any.\n     */\n    function subscriptionOf(address addr) external returns (address registrant);\n\n    /**\n     * @notice Get the set of addresses subscribed to a given registrant.\n     *         Note that order is not guaranteed as updates are made.\n     */\n    function subscribers(address registrant) external returns (address[] memory);\n\n    /**\n     * @notice Get the subscriber at a given index in the set of addresses subscribed to a given registrant.\n     *         Note that order is not guaranteed as updates are made.\n     */\n    function subscriberAt(address registrant, uint256 index) external returns (address);\n\n    /**\n     * @notice Copy filtered operators and codeHashes from a different registrantToCopy to addr.\n     */\n    function copyEntriesOf(address registrant, address registrantToCopy) external;\n\n    /**\n     * @notice Returns true if operator is filtered by a given address or its subscription.\n     */\n    function isOperatorFiltered(address registrant, address operator) external returns (bool);\n\n    /**\n     * @notice Returns true if the hash of an address's code is filtered by a given address or its subscription.\n     */\n    function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);\n\n    /**\n     * @notice Returns true if a codeHash is filtered by a given address or its subscription.\n     */\n    function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);\n\n    /**\n     * @notice Returns a list of filtered operators for a given address or its subscription.\n     */\n    function filteredOperators(address addr) external returns (address[] memory);\n\n    /**\n     * @notice Returns the set of filtered codeHashes for a given address or its subscription.\n     *         Note that order is not guaranteed as updates are made.\n     */\n    function filteredCodeHashes(address addr) external returns (bytes32[] memory);\n\n    /**\n     * @notice Returns the filtered operator at the given index of the set of filtered operators for a given address or\n     *         its subscription.\n     *         Note that order is not guaranteed as updates are made.\n     */\n    function filteredOperatorAt(address registrant, uint256 index) external returns (address);\n\n    /**\n     * @notice Returns the filtered codeHash at the given index of the list of filtered codeHashes for a given address or\n     *         its subscription.\n     *         Note that order is not guaranteed as updates are made.\n     */\n    function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);\n\n    /**\n     * @notice Returns true if an address has registered\n     */\n    function isRegistered(address addr) external returns (bool);\n\n    /**\n     * @dev Convenience method to compute the code hash of an arbitrary contract\n     */\n    function codeHashOf(address addr) external returns (bytes32);\n}\n"
      },
      "lib/operator-filter-registry/src/lib/Constants.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\naddress constant CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS = 0x000000000000AAeB6D7670E522A718067333cd4E;\naddress constant CANONICAL_CORI_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;\n"
      },
      "lib/operator-filter-registry/src/upgradeable/DefaultOperatorFiltererUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.13;\n\nimport {OperatorFiltererUpgradeable} from \"./OperatorFiltererUpgradeable.sol\";\nimport {CANONICAL_CORI_SUBSCRIPTION} from \"../lib/Constants.sol\";\n\n/**\n * @title  DefaultOperatorFiltererUpgradeable\n * @notice Inherits from OperatorFiltererUpgradeable and automatically subscribes to the default OpenSea subscription\n *         when the init function is called.\n */\nabstract contract DefaultOperatorFiltererUpgradeable is OperatorFiltererUpgradeable {\n    /// @dev The upgradeable initialize function that should be called when the contract is being deployed.\n    function __DefaultOperatorFilterer_init() internal onlyInitializing {\n        OperatorFiltererUpgradeable.__OperatorFilterer_init(CANONICAL_CORI_SUBSCRIPTION, true);\n    }\n}\n"
      },
      "lib/operator-filter-registry/src/upgradeable/OperatorFiltererUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.13;\n\nimport {IOperatorFilterRegistry} from \"../IOperatorFilterRegistry.sol\";\nimport {Initializable} from \"../../../../lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol\";\n\n/**\n * @title  OperatorFiltererUpgradeable\n * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another\n *         registrant's entries in the OperatorFilterRegistry when the init function is called.\n * @dev    This smart contract is meant to be inherited by token contracts so they can use the following:\n *         - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods.\n *         - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods.\n */\nabstract contract OperatorFiltererUpgradeable is Initializable {\n    /// @notice Emitted when an operator is not allowed.\n    error OperatorNotAllowed(address operator);\n\n    IOperatorFilterRegistry constant OPERATOR_FILTER_REGISTRY =\n        IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);\n\n    /// @dev The upgradeable initialize function that should be called when the contract is being upgraded.\n    function __OperatorFilterer_init(address subscriptionOrRegistrantToCopy, bool subscribe)\n        internal\n        onlyInitializing\n    {\n        // If an inheriting token contract is deployed to a network without the registry deployed, the modifier\n        // will not revert, but the contract will need to be registered with the registry once it is deployed in\n        // order for the modifier to filter addresses.\n        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {\n            if (!OPERATOR_FILTER_REGISTRY.isRegistered(address(this))) {\n                if (subscribe) {\n                    OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);\n                } else {\n                    if (subscriptionOrRegistrantToCopy != address(0)) {\n                        OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);\n                    } else {\n                        OPERATOR_FILTER_REGISTRY.register(address(this));\n                    }\n                }\n            }\n        }\n    }\n\n    /**\n     * @dev A helper modifier to check if the operator is allowed.\n     */\n    modifier onlyAllowedOperator(address from) virtual {\n        // Allow spending tokens from addresses with balance\n        // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred\n        // from an EOA.\n        if (from != msg.sender) {\n            _checkFilterOperator(msg.sender);\n        }\n        _;\n    }\n\n    /**\n     * @dev A helper modifier to check if the operator approval is allowed.\n     */\n    modifier onlyAllowedOperatorApproval(address operator) virtual {\n        _checkFilterOperator(operator);\n        _;\n    }\n\n    /**\n     * @dev A helper function to check if the operator is allowed.\n     */\n    function _checkFilterOperator(address operator) internal view virtual {\n        // Check registry code length to facilitate testing in environments without a deployed registry.\n        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {\n            // under normal circumstances, this function will revert rather than return false, but inheriting or\n            // upgraded contracts may specify their own OperatorFilterRegistry implementations, which may behave\n            // differently\n            if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) {\n                revert OperatorNotAllowed(operator);\n            }\n        }\n    }\n}\n"
      },
      "lib/utility-contracts/src/ConstructorInitializable.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\n/**\n * @author emo.eth\n * @notice Abstract smart contract that provides an onlyUninitialized modifier which only allows calling when\n *         from within a constructor of some sort, whether directly instantiating an inherting contract,\n *         or when delegatecalling from a proxy\n */\nabstract contract ConstructorInitializable {\n    error AlreadyInitialized();\n\n    modifier onlyConstructor() {\n        if (address(this).code.length != 0) {\n            revert AlreadyInitialized();\n        }\n        _;\n    }\n}\n"
      },
      "lib/utility-contracts/src/TwoStepOwnable.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\nimport {ConstructorInitializable} from \"./ConstructorInitializable.sol\";\n\n/**\n@notice A two-step extension of Ownable, where the new owner must claim ownership of the contract after owner initiates transfer\nOwner can cancel the transfer at any point before the new owner claims ownership.\nHelpful in guarding against transferring ownership to an address that is unable to act as the Owner.\n*/\nabstract contract TwoStepOwnable is ConstructorInitializable {\n    address private _owner;\n\n    event OwnershipTransferred(\n        address indexed previousOwner,\n        address indexed newOwner\n    );\n\n    address internal potentialOwner;\n\n    event PotentialOwnerUpdated(address newPotentialAdministrator);\n\n    error NewOwnerIsZeroAddress();\n    error NotNextOwner();\n    error OnlyOwner();\n\n    modifier onlyOwner() {\n        _checkOwner();\n        _;\n    }\n\n    constructor() {\n        _initialize();\n    }\n\n    function _initialize() private onlyConstructor {\n        _transferOwnership(msg.sender);\n    }\n\n    ///@notice Initiate ownership transfer to newPotentialOwner. Note: new owner will have to manually acceptOwnership\n    ///@param newPotentialOwner address of potential new owner\n    function transferOwnership(address newPotentialOwner)\n        public\n        virtual\n        onlyOwner\n    {\n        if (newPotentialOwner == address(0)) {\n            revert NewOwnerIsZeroAddress();\n        }\n        potentialOwner = newPotentialOwner;\n        emit PotentialOwnerUpdated(newPotentialOwner);\n    }\n\n    ///@notice Claim ownership of smart contract, after the current owner has initiated the process with transferOwnership\n    function acceptOwnership() public virtual {\n        address _potentialOwner = potentialOwner;\n        if (msg.sender != _potentialOwner) {\n            revert NotNextOwner();\n        }\n        delete potentialOwner;\n        emit PotentialOwnerUpdated(address(0));\n        _transferOwnership(_potentialOwner);\n    }\n\n    ///@notice cancel ownership transfer\n    function cancelOwnershipTransfer() public virtual onlyOwner {\n        delete potentialOwner;\n        emit PotentialOwnerUpdated(address(0));\n    }\n\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if the sender is not the owner.\n     */\n    function _checkOwner() internal view virtual {\n        if (_owner != msg.sender) {\n            revert OnlyOwner();\n        }\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby removing any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n}\n"
      },
      "src/clones/ERC721ACloneable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// ERC721A Contracts v4.2.2\n// Creator: Chiru Labs\n\npragma solidity ^0.8.4;\n\nimport { IERC721A } from \"ERC721A/IERC721A.sol\";\n\nimport {\n    Initializable\n} from \"openzeppelin-contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n/**\n * @dev Interface of ERC721 token receiver.\n */\ninterface ERC721A__IERC721Receiver {\n    function onERC721Received(\n        address operator,\n        address from,\n        uint256 tokenId,\n        bytes calldata data\n    ) external returns (bytes4);\n}\n\n/**\n * @title ERC721A\n *\n * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721)\n * Non-Fungible Token Standard, including the Metadata extension.\n * Optimized for lower gas during batch mints.\n *\n * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...)\n * starting from `_startTokenId()`.\n *\n * Assumptions:\n *\n * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.\n * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256).\n */\ncontract ERC721ACloneable is IERC721A, Initializable {\n    // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364).\n    struct TokenApprovalRef {\n        address value;\n    }\n\n    // =============================================================\n    //                           CONSTANTS\n    // =============================================================\n\n    // Mask of an entry in packed address data.\n    uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;\n\n    // The bit position of `numberMinted` in packed address data.\n    uint256 private constant _BITPOS_NUMBER_MINTED = 64;\n\n    // The bit position of `numberBurned` in packed address data.\n    uint256 private constant _BITPOS_NUMBER_BURNED = 128;\n\n    // The bit position of `aux` in packed address data.\n    uint256 private constant _BITPOS_AUX = 192;\n\n    // Mask of all 256 bits in packed address data except the 64 bits for `aux`.\n    uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;\n\n    // The bit position of `startTimestamp` in packed ownership.\n    uint256 private constant _BITPOS_START_TIMESTAMP = 160;\n\n    // The bit mask of the `burned` bit in packed ownership.\n    uint256 private constant _BITMASK_BURNED = 1 << 224;\n\n    // The bit position of the `nextInitialized` bit in packed ownership.\n    uint256 private constant _BITPOS_NEXT_INITIALIZED = 225;\n\n    // The bit mask of the `nextInitialized` bit in packed ownership.\n    uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225;\n\n    // The bit position of `extraData` in packed ownership.\n    uint256 private constant _BITPOS_EXTRA_DATA = 232;\n\n    // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`.\n    uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1;\n\n    // The mask of the lower 160 bits for addresses.\n    uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1;\n\n    // The maximum `quantity` that can be minted with {_mintERC2309}.\n    // This limit is to prevent overflows on the address data entries.\n    // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309}\n    // is required to cause an overflow, which is unrealistic.\n    uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000;\n\n    // The `Transfer` event signature is given by:\n    // `keccak256(bytes(\"Transfer(address,address,uint256)\"))`.\n    bytes32 private constant _TRANSFER_EVENT_SIGNATURE =\n        0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;\n\n    // =============================================================\n    //                            STORAGE\n    // =============================================================\n\n    // The next token ID to be minted.\n    uint256 private _currentIndex;\n\n    // The number of tokens burned.\n    uint256 private _burnCounter;\n\n    // Token name\n    string private _name;\n\n    // Token symbol\n    string private _symbol;\n\n    // Mapping from token ID to ownership details\n    // An empty struct value does not necessarily mean the token is unowned.\n    // See {_packedOwnershipOf} implementation for details.\n    //\n    // Bits Layout:\n    // - [0..159]   `addr`\n    // - [160..223] `startTimestamp`\n    // - [224]      `burned`\n    // - [225]      `nextInitialized`\n    // - [232..255] `extraData`\n    mapping(uint256 => uint256) private _packedOwnerships;\n\n    // Mapping owner address to address data.\n    //\n    // Bits Layout:\n    // - [0..63]    `balance`\n    // - [64..127]  `numberMinted`\n    // - [128..191] `numberBurned`\n    // - [192..255] `aux`\n    mapping(address => uint256) private _packedAddressData;\n\n    // Mapping from token ID to approved address.\n    mapping(uint256 => TokenApprovalRef) private _tokenApprovals;\n\n    // Mapping from owner to operator approvals\n    mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n    // =============================================================\n    //                          CONSTRUCTOR\n    // =============================================================\n\n    function __ERC721ACloneable__init(\n        string memory name_,\n        string memory symbol_\n    ) internal onlyInitializing {\n        _name = name_;\n        _symbol = symbol_;\n        _currentIndex = _startTokenId();\n    }\n\n    // =============================================================\n    //                   TOKEN COUNTING OPERATIONS\n    // =============================================================\n\n    /**\n     * @dev Returns the starting token ID.\n     * To change the starting token ID, please override this function.\n     */\n    function _startTokenId() internal view virtual returns (uint256) {\n        return 0;\n    }\n\n    /**\n     * @dev Returns the next token ID to be minted.\n     */\n    function _nextTokenId() internal view virtual returns (uint256) {\n        return _currentIndex;\n    }\n\n    /**\n     * @dev Returns the total number of tokens in existence.\n     * Burned tokens will reduce the count.\n     * To get the total number of tokens minted, please see {_totalMinted}.\n     */\n    function totalSupply() public view virtual override returns (uint256) {\n        // Counter underflow is impossible as _burnCounter cannot be incremented\n        // more than `_currentIndex - _startTokenId()` times.\n        unchecked {\n            return _currentIndex - _burnCounter - _startTokenId();\n        }\n    }\n\n    /**\n     * @dev Returns the total amount of tokens minted in the contract.\n     */\n    function _totalMinted() internal view virtual returns (uint256) {\n        // Counter underflow is impossible as `_currentIndex` does not decrement,\n        // and it is initialized to `_startTokenId()`.\n        unchecked {\n            return _currentIndex - _startTokenId();\n        }\n    }\n\n    /**\n     * @dev Returns the total number of tokens burned.\n     */\n    function _totalBurned() internal view virtual returns (uint256) {\n        return _burnCounter;\n    }\n\n    // =============================================================\n    //                    ADDRESS DATA OPERATIONS\n    // =============================================================\n\n    /**\n     * @dev Returns the number of tokens in `owner`'s account.\n     */\n    function balanceOf(address owner)\n        public\n        view\n        virtual\n        override\n        returns (uint256)\n    {\n        if (owner == address(0)) revert BalanceQueryForZeroAddress();\n        return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY;\n    }\n\n    /**\n     * Returns the number of tokens minted by `owner`.\n     */\n    function _numberMinted(address owner) internal view returns (uint256) {\n        return\n            (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) &\n            _BITMASK_ADDRESS_DATA_ENTRY;\n    }\n\n    /**\n     * Returns the number of tokens burned by or on behalf of `owner`.\n     */\n    function _numberBurned(address owner) internal view returns (uint256) {\n        return\n            (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) &\n            _BITMASK_ADDRESS_DATA_ENTRY;\n    }\n\n    /**\n     * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).\n     */\n    function _getAux(address owner) internal view returns (uint64) {\n        return uint64(_packedAddressData[owner] >> _BITPOS_AUX);\n    }\n\n    /**\n     * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).\n     * If there are multiple variables, please pack them into a uint64.\n     */\n    function _setAux(address owner, uint64 aux) internal virtual {\n        uint256 packed = _packedAddressData[owner];\n        uint256 auxCasted;\n        // Cast `aux` with assembly to avoid redundant masking.\n        assembly {\n            auxCasted := aux\n        }\n        packed =\n            (packed & _BITMASK_AUX_COMPLEMENT) |\n            (auxCasted << _BITPOS_AUX);\n        _packedAddressData[owner] = packed;\n    }\n\n    // =============================================================\n    //                            IERC165\n    // =============================================================\n\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId)\n        public\n        view\n        virtual\n        override\n        returns (bool)\n    {\n        // The interface IDs are constants representing the first 4 bytes\n        // of the XOR of all function selectors in the interface.\n        // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165)\n        // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`)\n        return\n            interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.\n            interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.\n            interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.\n    }\n\n    // =============================================================\n    //                        IERC721Metadata\n    // =============================================================\n\n    /**\n     * @dev Returns the token collection name.\n     */\n    function name() public view virtual override returns (string memory) {\n        return _name;\n    }\n\n    /**\n     * @dev Returns the token collection symbol.\n     */\n    function symbol() public view virtual override returns (string memory) {\n        return _symbol;\n    }\n\n    /**\n     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\n     */\n    function tokenURI(uint256 tokenId)\n        public\n        view\n        virtual\n        override\n        returns (string memory)\n    {\n        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();\n\n        string memory baseURI = _baseURI();\n        return\n            bytes(baseURI).length != 0\n                ? string(abi.encodePacked(baseURI, _toString(tokenId)))\n                : \"\";\n    }\n\n    /**\n     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\n     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\n     * by default, it can be overridden in child contracts.\n     */\n    function _baseURI() internal view virtual returns (string memory) {\n        return \"\";\n    }\n\n    // =============================================================\n    //                     OWNERSHIPS OPERATIONS\n    // =============================================================\n\n    /**\n     * @dev Returns the owner of the `tokenId` token.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function ownerOf(uint256 tokenId)\n        public\n        view\n        virtual\n        override\n        returns (address)\n    {\n        return address(uint160(_packedOwnershipOf(tokenId)));\n    }\n\n    /**\n     * @dev Gas spent here starts off proportional to the maximum mint batch size.\n     * It gradually moves to O(1) as tokens get transferred around over time.\n     */\n    function _ownershipOf(uint256 tokenId)\n        internal\n        view\n        virtual\n        returns (TokenOwnership memory)\n    {\n        return _unpackedOwnership(_packedOwnershipOf(tokenId));\n    }\n\n    /**\n     * @dev Returns the unpacked `TokenOwnership` struct at `index`.\n     */\n    function _ownershipAt(uint256 index)\n        internal\n        view\n        virtual\n        returns (TokenOwnership memory)\n    {\n        return _unpackedOwnership(_packedOwnerships[index]);\n    }\n\n    /**\n     * @dev Initializes the ownership slot minted at `index` for efficiency purposes.\n     */\n    function _initializeOwnershipAt(uint256 index) internal virtual {\n        if (_packedOwnerships[index] == 0) {\n            _packedOwnerships[index] = _packedOwnershipOf(index);\n        }\n    }\n\n    /**\n     * Returns the packed ownership data of `tokenId`.\n     */\n    function _packedOwnershipOf(uint256 tokenId)\n        private\n        view\n        returns (uint256)\n    {\n        uint256 curr = tokenId;\n\n        unchecked {\n            if (_startTokenId() <= curr) {\n                if (curr < _currentIndex) {\n                    uint256 packed = _packedOwnerships[curr];\n                    // If not burned.\n                    if (packed & _BITMASK_BURNED == 0) {\n                        // Invariant:\n                        // There will always be an initialized ownership slot\n                        // (i.e. `ownership.addr != address(0) && ownership.burned == false`)\n                        // before an unintialized ownership slot\n                        // (i.e. `ownership.addr == address(0) && ownership.burned == false`)\n                        // Hence, `curr` will not underflow.\n                        //\n                        // We can directly compare the packed value.\n                        // If the address is zero, packed will be zero.\n                        while (packed == 0) {\n                            packed = _packedOwnerships[--curr];\n                        }\n                        return packed;\n                    }\n                }\n            }\n        }\n        revert OwnerQueryForNonexistentToken();\n    }\n\n    /**\n     * @dev Returns the unpacked `TokenOwnership` struct from `packed`.\n     */\n    function _unpackedOwnership(uint256 packed)\n        private\n        pure\n        returns (TokenOwnership memory ownership)\n    {\n        ownership.addr = address(uint160(packed));\n        ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP);\n        ownership.burned = packed & _BITMASK_BURNED != 0;\n        ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA);\n    }\n\n    /**\n     * @dev Packs ownership data into a single uint256.\n     */\n    function _packOwnershipData(address owner, uint256 flags)\n        private\n        view\n        returns (uint256 result)\n    {\n        assembly {\n            // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.\n            owner := and(owner, _BITMASK_ADDRESS)\n            // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`.\n            result := or(\n                owner,\n                or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)\n            )\n        }\n    }\n\n    /**\n     * @dev Returns the `nextInitialized` flag set if `quantity` equals 1.\n     */\n    function _nextInitializedFlag(uint256 quantity)\n        private\n        pure\n        returns (uint256 result)\n    {\n        // For branchless setting of the `nextInitialized` flag.\n        assembly {\n            // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`.\n            result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1))\n        }\n    }\n\n    // =============================================================\n    //                      APPROVAL OPERATIONS\n    // =============================================================\n\n    /**\n     * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n     * The approval is cleared when the token is transferred.\n     *\n     * Only a single account can be approved at a time, so approving the\n     * zero address clears previous approvals.\n     *\n     * Requirements:\n     *\n     * - The caller must own the token or be an approved operator.\n     * - `tokenId` must exist.\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address to, uint256 tokenId) public virtual override {\n        address owner = ownerOf(tokenId);\n\n        if (_msgSenderERC721A() != owner) {\n            if (!isApprovedForAll(owner, _msgSenderERC721A())) {\n                revert ApprovalCallerNotOwnerNorApproved();\n            }\n        }\n\n        _tokenApprovals[tokenId].value = to;\n        emit Approval(owner, to, tokenId);\n    }\n\n    /**\n     * @dev Returns the account approved for `tokenId` token.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function getApproved(uint256 tokenId)\n        public\n        view\n        virtual\n        override\n        returns (address)\n    {\n        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();\n\n        return _tokenApprovals[tokenId].value;\n    }\n\n    /**\n     * @dev Approve or remove `operator` as an operator for the caller.\n     * Operators can call {transferFrom} or {safeTransferFrom}\n     * for any token owned by the caller.\n     *\n     * Requirements:\n     *\n     * - The `operator` cannot be the caller.\n     *\n     * Emits an {ApprovalForAll} event.\n     */\n    function setApprovalForAll(address operator, bool approved)\n        public\n        virtual\n        override\n    {\n        _operatorApprovals[_msgSenderERC721A()][operator] = approved;\n        emit ApprovalForAll(_msgSenderERC721A(), operator, approved);\n    }\n\n    /**\n     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n     *\n     * See {setApprovalForAll}.\n     */\n    function isApprovedForAll(address owner, address operator)\n        public\n        view\n        virtual\n        override\n        returns (bool)\n    {\n        return _operatorApprovals[owner][operator];\n    }\n\n    /**\n     * @dev Returns whether `tokenId` exists.\n     *\n     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\n     *\n     * Tokens start existing when they are minted. See {_mint}.\n     */\n    function _exists(uint256 tokenId) internal view virtual returns (bool) {\n        return\n            _startTokenId() <= tokenId &&\n            tokenId < _currentIndex && // If within bounds,\n            _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned.\n    }\n\n    /**\n     * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`.\n     */\n    function _isSenderApprovedOrOwner(\n        address approvedAddress,\n        address owner,\n        address msgSender\n    ) private pure returns (bool result) {\n        assembly {\n            // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.\n            owner := and(owner, _BITMASK_ADDRESS)\n            // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean.\n            msgSender := and(msgSender, _BITMASK_ADDRESS)\n            // `msgSender == owner || msgSender == approvedAddress`.\n            result := or(eq(msgSender, owner), eq(msgSender, approvedAddress))\n        }\n    }\n\n    /**\n     * @dev Returns the storage slot and value for the approved address of `tokenId`.\n     */\n    function _getApprovedSlotAndAddress(uint256 tokenId)\n        private\n        view\n        returns (uint256 approvedAddressSlot, address approvedAddress)\n    {\n        TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId];\n        // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`.\n        assembly {\n            approvedAddressSlot := tokenApproval.slot\n            approvedAddress := sload(approvedAddressSlot)\n        }\n    }\n\n    // =============================================================\n    //                      TRANSFER OPERATIONS\n    // =============================================================\n\n    /**\n     * @dev Transfers `tokenId` from `from` to `to`.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must be owned by `from`.\n     * - If the caller is not `from`, it must be approved to move this token\n     * by either {approve} or {setApprovalForAll}.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) public virtual override {\n        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);\n\n        if (address(uint160(prevOwnershipPacked)) != from)\n            revert TransferFromIncorrectOwner();\n\n        (\n            uint256 approvedAddressSlot,\n            address approvedAddress\n        ) = _getApprovedSlotAndAddress(tokenId);\n\n        // The nested ifs save around 20+ gas over a compound boolean condition.\n        if (\n            !_isSenderApprovedOrOwner(\n                approvedAddress,\n                from,\n                _msgSenderERC721A()\n            )\n        ) {\n            if (!isApprovedForAll(from, _msgSenderERC721A()))\n                revert TransferCallerNotOwnerNorApproved();\n        }\n\n        if (to == address(0)) revert TransferToZeroAddress();\n\n        _beforeTokenTransfers(from, to, tokenId, 1);\n\n        // Clear approvals from the previous owner.\n        assembly {\n            if approvedAddress {\n                // This is equivalent to `delete _tokenApprovals[tokenId]`.\n                sstore(approvedAddressSlot, 0)\n            }\n        }\n\n        // Underflow of the sender's balance is impossible because we check for\n        // ownership above and the recipient's balance can't realistically overflow.\n        // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.\n        unchecked {\n            // We can directly increment and decrement the balances.\n            --_packedAddressData[from]; // Updates: `balance -= 1`.\n            ++_packedAddressData[to]; // Updates: `balance += 1`.\n\n            // Updates:\n            // - `address` to the next owner.\n            // - `startTimestamp` to the timestamp of transfering.\n            // - `burned` to `false`.\n            // - `nextInitialized` to `true`.\n            _packedOwnerships[tokenId] = _packOwnershipData(\n                to,\n                _BITMASK_NEXT_INITIALIZED |\n                    _nextExtraData(from, to, prevOwnershipPacked)\n            );\n\n            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .\n            if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {\n                uint256 nextTokenId = tokenId + 1;\n                // If the next slot's address is zero and not burned (i.e. packed value is zero).\n                if (_packedOwnerships[nextTokenId] == 0) {\n                    // If the next slot is within bounds.\n                    if (nextTokenId != _currentIndex) {\n                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.\n                        _packedOwnerships[nextTokenId] = prevOwnershipPacked;\n                    }\n                }\n            }\n        }\n\n        emit Transfer(from, to, tokenId);\n        _afterTokenTransfers(from, to, tokenId, 1);\n    }\n\n    /**\n     * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) public virtual override {\n        safeTransferFrom(from, to, tokenId, \"\");\n    }\n\n    /**\n     * @dev Safely transfers `tokenId` token from `from` to `to`.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must exist and be owned by `from`.\n     * - If the caller is not `from`, it must be approved to move this token\n     * by either {approve} or {setApprovalForAll}.\n     * - If `to` refers to a smart contract, it must implement\n     * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId,\n        bytes memory _data\n    ) public virtual override {\n        transferFrom(from, to, tokenId);\n        if (to.code.length != 0) {\n            if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {\n                revert TransferToNonERC721ReceiverImplementer();\n            }\n        }\n    }\n\n    /**\n     * @dev Hook that is called before a set of serially-ordered token IDs\n     * are about to be transferred. This includes minting.\n     * And also called before burning one token.\n     *\n     * `startTokenId` - the first token ID to be transferred.\n     * `quantity` - the amount to be transferred.\n     *\n     * Calling conditions:\n     *\n     * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be\n     * transferred to `to`.\n     * - When `from` is zero, `tokenId` will be minted for `to`.\n     * - When `to` is zero, `tokenId` will be burned by `from`.\n     * - `from` and `to` are never both zero.\n     */\n    function _beforeTokenTransfers(\n        address from,\n        address to,\n        uint256 startTokenId,\n        uint256 quantity\n    ) internal virtual {}\n\n    /**\n     * @dev Hook that is called after a set of serially-ordered token IDs\n     * have been transferred. This includes minting.\n     * And also called after one token has been burned.\n     *\n     * `startTokenId` - the first token ID to be transferred.\n     * `quantity` - the amount to be transferred.\n     *\n     * Calling conditions:\n     *\n     * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been\n     * transferred to `to`.\n     * - When `from` is zero, `tokenId` has been minted for `to`.\n     * - When `to` is zero, `tokenId` has been burned by `from`.\n     * - `from` and `to` are never both zero.\n     */\n    function _afterTokenTransfers(\n        address from,\n        address to,\n        uint256 startTokenId,\n        uint256 quantity\n    ) internal virtual {}\n\n    /**\n     * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract.\n     *\n     * `from` - Previous owner of the given token ID.\n     * `to` - Target address that will receive the token.\n     * `tokenId` - Token ID to be transferred.\n     * `_data` - Optional data to send along with the call.\n     *\n     * Returns whether the call correctly returned the expected magic value.\n     */\n    function _checkContractOnERC721Received(\n        address from,\n        address to,\n        uint256 tokenId,\n        bytes memory _data\n    ) private returns (bool) {\n        try\n            ERC721A__IERC721Receiver(to).onERC721Received(\n                _msgSenderERC721A(),\n                from,\n                tokenId,\n                _data\n            )\n        returns (bytes4 retval) {\n            return\n                retval ==\n                ERC721A__IERC721Receiver(to).onERC721Received.selector;\n        } catch (bytes memory reason) {\n            if (reason.length == 0) {\n                revert TransferToNonERC721ReceiverImplementer();\n            } else {\n                assembly {\n                    revert(add(32, reason), mload(reason))\n                }\n            }\n        }\n    }\n\n    // =============================================================\n    //                        MINT OPERATIONS\n    // =============================================================\n\n    /**\n     * @dev Mints `quantity` tokens and transfers them to `to`.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     * - `quantity` must be greater than 0.\n     *\n     * Emits a {Transfer} event for each mint.\n     */\n    function _mint(address to, uint256 quantity) internal virtual {\n        uint256 startTokenId = _currentIndex;\n        if (quantity == 0) revert MintZeroQuantity();\n\n        _beforeTokenTransfers(address(0), to, startTokenId, quantity);\n\n        // Overflows are incredibly unrealistic.\n        // `balance` and `numberMinted` have a maximum limit of 2**64.\n        // `tokenId` has a maximum limit of 2**256.\n        unchecked {\n            // Updates:\n            // - `balance += quantity`.\n            // - `numberMinted += quantity`.\n            //\n            // We can directly add to the `balance` and `numberMinted`.\n            _packedAddressData[to] +=\n                quantity *\n                ((1 << _BITPOS_NUMBER_MINTED) | 1);\n\n            // Updates:\n            // - `address` to the owner.\n            // - `startTimestamp` to the timestamp of minting.\n            // - `burned` to `false`.\n            // - `nextInitialized` to `quantity == 1`.\n            _packedOwnerships[startTokenId] = _packOwnershipData(\n                to,\n                _nextInitializedFlag(quantity) |\n                    _nextExtraData(address(0), to, 0)\n            );\n\n            uint256 toMasked;\n            uint256 end = startTokenId + quantity;\n\n            // Use assembly to loop and emit the `Transfer` event for gas savings.\n            // The duplicated `log4` removes an extra check and reduces stack juggling.\n            // The assembly, together with the surrounding Solidity code, have been\n            // delicately arranged to nudge the compiler into producing optimized opcodes.\n            assembly {\n                // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.\n                toMasked := and(to, _BITMASK_ADDRESS)\n                // Emit the `Transfer` event.\n                log4(\n                    0, // Start of data (0, since no data).\n                    0, // End of data (0, since no data).\n                    _TRANSFER_EVENT_SIGNATURE, // Signature.\n                    0, // `address(0)`.\n                    toMasked, // `to`.\n                    startTokenId // `tokenId`.\n                )\n\n                // The `iszero(eq(,))` check ensures that large values of `quantity`\n                // that overflows uint256 will make the loop run out of gas.\n                // The compiler will optimize the `iszero` away for performance.\n                for {\n                    let tokenId := add(startTokenId, 1)\n                } iszero(eq(tokenId, end)) {\n                    tokenId := add(tokenId, 1)\n                } {\n                    // Emit the `Transfer` event. Similar to above.\n                    log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId)\n                }\n            }\n            if (toMasked == 0) revert MintToZeroAddress();\n\n            _currentIndex = end;\n        }\n        _afterTokenTransfers(address(0), to, startTokenId, quantity);\n    }\n\n    /**\n     * @dev Mints `quantity` tokens and transfers them to `to`.\n     *\n     * This function is intended for efficient minting only during contract creation.\n     *\n     * It emits only one {ConsecutiveTransfer} as defined in\n     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309),\n     * instead of a sequence of {Transfer} event(s).\n     *\n     * Calling this function outside of contract creation WILL make your contract\n     * non-compliant with the ERC721 standard.\n     * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309\n     * {ConsecutiveTransfer} event is only permissible during contract creation.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     * - `quantity` must be greater than 0.\n     *\n     * Emits a {ConsecutiveTransfer} event.\n     */\n    function _mintERC2309(address to, uint256 quantity) internal virtual {\n        uint256 startTokenId = _currentIndex;\n        if (to == address(0)) revert MintToZeroAddress();\n        if (quantity == 0) revert MintZeroQuantity();\n        if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT)\n            revert MintERC2309QuantityExceedsLimit();\n\n        _beforeTokenTransfers(address(0), to, startTokenId, quantity);\n\n        // Overflows are unrealistic due to the above check for `quantity` to be below the limit.\n        unchecked {\n            // Updates:\n            // - `balance += quantity`.\n            // - `numberMinted += quantity`.\n            //\n            // We can directly add to the `balance` and `numberMinted`.\n            _packedAddressData[to] +=\n                quantity *\n                ((1 << _BITPOS_NUMBER_MINTED) | 1);\n\n            // Updates:\n            // - `address` to the owner.\n            // - `startTimestamp` to the timestamp of minting.\n            // - `burned` to `false`.\n            // - `nextInitialized` to `quantity == 1`.\n            _packedOwnerships[startTokenId] = _packOwnershipData(\n                to,\n                _nextInitializedFlag(quantity) |\n                    _nextExtraData(address(0), to, 0)\n            );\n\n            emit ConsecutiveTransfer(\n                startTokenId,\n                startTokenId + quantity - 1,\n                address(0),\n                to\n            );\n\n            _currentIndex = startTokenId + quantity;\n        }\n        _afterTokenTransfers(address(0), to, startTokenId, quantity);\n    }\n\n    /**\n     * @dev Safely mints `quantity` tokens and transfers them to `to`.\n     *\n     * Requirements:\n     *\n     * - If `to` refers to a smart contract, it must implement\n     * {IERC721Receiver-onERC721Received}, which is called for each safe transfer.\n     * - `quantity` must be greater than 0.\n     *\n     * See {_mint}.\n     *\n     * Emits a {Transfer} event for each mint.\n     */\n    function _safeMint(\n        address to,\n        uint256 quantity,\n        bytes memory _data\n    ) internal virtual {\n        _mint(to, quantity);\n\n        unchecked {\n            if (to.code.length != 0) {\n                uint256 end = _currentIndex;\n                uint256 index = end - quantity;\n                do {\n                    if (\n                        !_checkContractOnERC721Received(\n                            address(0),\n                            to,\n                            index++,\n                            _data\n                        )\n                    ) {\n                        revert TransferToNonERC721ReceiverImplementer();\n                    }\n                } while (index < end);\n                // Reentrancy protection.\n                if (_currentIndex != end) revert();\n            }\n        }\n    }\n\n    /**\n     * @dev Equivalent to `_safeMint(to, quantity, '')`.\n     */\n    function _safeMint(address to, uint256 quantity) internal virtual {\n        _safeMint(to, quantity, \"\");\n    }\n\n    // =============================================================\n    //                        BURN OPERATIONS\n    // =============================================================\n\n    /**\n     * @dev Equivalent to `_burn(tokenId, false)`.\n     */\n    function _burn(uint256 tokenId) internal virtual {\n        _burn(tokenId, false);\n    }\n\n    /**\n     * @dev Destroys `tokenId`.\n     * The approval is cleared when the token is burned.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _burn(uint256 tokenId, bool approvalCheck) internal virtual {\n        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);\n\n        address from = address(uint160(prevOwnershipPacked));\n\n        (\n            uint256 approvedAddressSlot,\n            address approvedAddress\n        ) = _getApprovedSlotAndAddress(tokenId);\n\n        if (approvalCheck) {\n            // The nested ifs save around 20+ gas over a compound boolean condition.\n            if (\n                !_isSenderApprovedOrOwner(\n                    approvedAddress,\n                    from,\n                    _msgSenderERC721A()\n                )\n            ) {\n                if (!isApprovedForAll(from, _msgSenderERC721A()))\n                    revert TransferCallerNotOwnerNorApproved();\n            }\n        }\n\n        _beforeTokenTransfers(from, address(0), tokenId, 1);\n\n        // Clear approvals from the previous owner.\n        assembly {\n            if approvedAddress {\n                // This is equivalent to `delete _tokenApprovals[tokenId]`.\n                sstore(approvedAddressSlot, 0)\n            }\n        }\n\n        // Underflow of the sender's balance is impossible because we check for\n        // ownership above and the recipient's balance can't realistically overflow.\n        // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.\n        unchecked {\n            // Updates:\n            // - `balance -= 1`.\n            // - `numberBurned += 1`.\n            //\n            // We can directly decrement the balance, and increment the number burned.\n            // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`.\n            _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1;\n\n            // Updates:\n            // - `address` to the last owner.\n            // - `startTimestamp` to the timestamp of burning.\n            // - `burned` to `true`.\n            // - `nextInitialized` to `true`.\n            _packedOwnerships[tokenId] = _packOwnershipData(\n                from,\n                (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) |\n                    _nextExtraData(from, address(0), prevOwnershipPacked)\n            );\n\n            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .\n            if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {\n                uint256 nextTokenId = tokenId + 1;\n                // If the next slot's address is zero and not burned (i.e. packed value is zero).\n                if (_packedOwnerships[nextTokenId] == 0) {\n                    // If the next slot is within bounds.\n                    if (nextTokenId != _currentIndex) {\n                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.\n                        _packedOwnerships[nextTokenId] = prevOwnershipPacked;\n                    }\n                }\n            }\n        }\n\n        emit Transfer(from, address(0), tokenId);\n        _afterTokenTransfers(from, address(0), tokenId, 1);\n\n        // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.\n        unchecked {\n            _burnCounter++;\n        }\n    }\n\n    // =============================================================\n    //                     EXTRA DATA OPERATIONS\n    // =============================================================\n\n    /**\n     * @dev Directly sets the extra data for the ownership data `index`.\n     */\n    function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual {\n        uint256 packed = _packedOwnerships[index];\n        if (packed == 0) revert OwnershipNotInitializedForExtraData();\n        uint256 extraDataCasted;\n        // Cast `extraData` with assembly to avoid redundant masking.\n        assembly {\n            extraDataCasted := extraData\n        }\n        packed =\n            (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) |\n            (extraDataCasted << _BITPOS_EXTRA_DATA);\n        _packedOwnerships[index] = packed;\n    }\n\n    /**\n     * @dev Called during each token transfer to set the 24bit `extraData` field.\n     * Intended to be overridden by the cosumer contract.\n     *\n     * `previousExtraData` - the value of `extraData` before transfer.\n     *\n     * Calling conditions:\n     *\n     * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be\n     * transferred to `to`.\n     * - When `from` is zero, `tokenId` will be minted for `to`.\n     * - When `to` is zero, `tokenId` will be burned by `from`.\n     * - `from` and `to` are never both zero.\n     */\n    function _extraData(\n        address from,\n        address to,\n        uint24 previousExtraData\n    ) internal view virtual returns (uint24) {}\n\n    /**\n     * @dev Returns the next extra data for the packed ownership data.\n     * The returned result is shifted into position.\n     */\n    function _nextExtraData(\n        address from,\n        address to,\n        uint256 prevOwnershipPacked\n    ) private view returns (uint256) {\n        uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA);\n        return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA;\n    }\n\n    // =============================================================\n    //                       OTHER OPERATIONS\n    // =============================================================\n\n    /**\n     * @dev Returns the message sender (defaults to `msg.sender`).\n     *\n     * If you are writing GSN compatible contracts, you need to override this function.\n     */\n    function _msgSenderERC721A() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    /**\n     * @dev Converts a uint256 to its ASCII string decimal representation.\n     */\n    function _toString(uint256 value)\n        internal\n        pure\n        virtual\n        returns (string memory str)\n    {\n        assembly {\n            // The maximum value of a uint256 contains 78 digits (1 byte per digit), but\n            // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned.\n            // We will need 1 word for the trailing zeros padding, 1 word for the length,\n            // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0.\n            let m := add(mload(0x40), 0xa0)\n            // Update the free memory pointer to allocate.\n            mstore(0x40, m)\n            // Assign the `str` to the end.\n            str := sub(m, 0x20)\n            // Zeroize the slot after the string.\n            mstore(str, 0)\n\n            // Cache the end of the memory to calculate the length later.\n            let end := str\n\n            // We write the string from rightmost digit to leftmost digit.\n            // The following is essentially a do-while loop that also handles the zero case.\n            // prettier-ignore\n            for { let temp := value } 1 {} {\n                str := sub(str, 1)\n                // Write the character to the pointer.\n                // The ASCII index of the '0' character is 48.\n                mstore8(str, add(48, mod(temp, 10)))\n                // Keep dividing `temp` until zero.\n                temp := div(temp, 10)\n                // prettier-ignore\n                if iszero(temp) { break }\n            }\n\n            let length := sub(end, str)\n            // Move the pointer 32 bytes leftwards to make room for the length.\n            str := sub(str, 0x20)\n            // Store the length.\n            mstore(str, length)\n        }\n    }\n}\n"
      },
      "src/clones/ERC721ContractMetadataCloneable.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\nimport {\n    ISeaDropTokenContractMetadata\n} from \"../interfaces/ISeaDropTokenContractMetadata.sol\";\n\nimport { ERC721ACloneable } from \"./ERC721ACloneable.sol\";\n\nimport { TwoStepOwnable } from \"utility-contracts/TwoStepOwnable.sol\";\n\nimport { IERC2981 } from \"openzeppelin-contracts/interfaces/IERC2981.sol\";\n\nimport {\n    IERC165\n} from \"openzeppelin-contracts/utils/introspection/IERC165.sol\";\n\n/**\n * @title  ERC721ContractMetadataCloneable\n * @author James Wenzel (emo.eth)\n * @author Ryan Ghods (ralxz.eth)\n * @author Stephan Min (stephanm.eth)\n * @notice ERC721ContractMetadata is a token contract that extends ERC721A\n *         with additional metadata and ownership capabilities.\n */\ncontract ERC721ContractMetadataCloneable is\n    ERC721ACloneable,\n    TwoStepOwnable,\n    ISeaDropTokenContractMetadata\n{\n    /// @notice Track the max supply.\n    uint256 _maxSupply;\n\n    /// @notice Track the base URI for token metadata.\n    string _tokenBaseURI;\n\n    /// @notice Track the contract URI for contract metadata.\n    string _contractURI;\n\n    /// @notice Track the provenance hash for guaranteeing metadata order\n    ///         for random reveals.\n    bytes32 _provenanceHash;\n\n    /// @notice Track the royalty info: address to receive royalties, and\n    ///         royalty basis points.\n    RoyaltyInfo _royaltyInfo;\n\n    /**\n     * @dev Reverts if the sender is not the owner or the contract itself.\n     *      This function is inlined instead of being a modifier\n     *      to save contract space from being inlined N times.\n     */\n    function _onlyOwnerOrSelf() internal view {\n        if (\n            _cast(msg.sender == owner()) | _cast(msg.sender == address(this)) ==\n            0\n        ) {\n            revert OnlyOwner();\n        }\n    }\n\n    /**\n     * @notice Sets the base URI for the token metadata and emits an event.\n     *\n     * @param newBaseURI The new base URI to set.\n     */\n    function setBaseURI(string calldata newBaseURI) external override {\n        // Ensure the sender is only the owner or contract itself.\n        _onlyOwnerOrSelf();\n\n        // Set the new base URI.\n        _tokenBaseURI = newBaseURI;\n\n        // Emit an event with the update.\n        if (totalSupply() != 0) {\n            emit BatchMetadataUpdate(1, _nextTokenId() - 1);\n        }\n    }\n\n    /**\n     * @notice Sets the contract URI for contract metadata.\n     *\n     * @param newContractURI The new contract URI.\n     */\n    function setContractURI(string calldata newContractURI) external override {\n        // Ensure the sender is only the owner or contract itself.\n        _onlyOwnerOrSelf();\n\n        // Set the new contract URI.\n        _contractURI = newContractURI;\n\n        // Emit an event with the update.\n        emit ContractURIUpdated(newContractURI);\n    }\n\n    /**\n     * @notice Emit an event notifying metadata updates for\n     *         a range of token ids, according to EIP-4906.\n     *\n     * @param fromTokenId The start token id.\n     * @param toTokenId   The end token id.\n     */\n    function emitBatchMetadataUpdate(uint256 fromTokenId, uint256 toTokenId)\n        external\n    {\n        // Ensure the sender is only the owner or contract itself.\n        _onlyOwnerOrSelf();\n\n        // Emit an event with the update.\n        emit BatchMetadataUpdate(fromTokenId, toTokenId);\n    }\n\n    /**\n     * @notice Sets the max token supply and emits an event.\n     *\n     * @param newMaxSupply The new max supply to set.\n     */\n    function setMaxSupply(uint256 newMaxSupply) external {\n        // Ensure the sender is only the owner or contract itself.\n        _onlyOwnerOrSelf();\n\n        // Ensure the max supply does not exceed the maximum value of uint64.\n        if (newMaxSupply > 2**64 - 1) {\n            revert CannotExceedMaxSupplyOfUint64(newMaxSupply);\n        }\n\n        // Set the new max supply.\n        _maxSupply = newMaxSupply;\n\n        // Emit an event with the update.\n        emit MaxSupplyUpdated(newMaxSupply);\n    }\n\n    /**\n     * @notice Sets the provenance hash and emits an event.\n     *\n     *         The provenance hash is used for random reveals, which\n     *         is a hash of the ordered metadata to show it has not been\n     *         modified after mint started.\n     *\n     *         This function will revert after the first item has been minted.\n     *\n     * @param newProvenanceHash The new provenance hash to set.\n     */\n    function setProvenanceHash(bytes32 newProvenanceHash) external {\n        // Ensure the sender is only the owner or contract itself.\n        _onlyOwnerOrSelf();\n\n        // Revert if any items have been minted.\n        if (_totalMinted() > 0) {\n            revert ProvenanceHashCannotBeSetAfterMintStarted();\n        }\n\n        // Keep track of the old provenance hash for emitting with the event.\n        bytes32 oldProvenanceHash = _provenanceHash;\n\n        // Set the new provenance hash.\n        _provenanceHash = newProvenanceHash;\n\n        // Emit an event with the update.\n        emit ProvenanceHashUpdated(oldProvenanceHash, newProvenanceHash);\n    }\n\n    /**\n     * @notice Sets the address and basis points for royalties.\n     *\n     * @param newInfo The struct to configure royalties.\n     */\n    function setRoyaltyInfo(RoyaltyInfo calldata newInfo) external {\n        // Ensure the sender is only the owner or contract itself.\n        _onlyOwnerOrSelf();\n\n        // Revert if the new royalty address is the zero address.\n        if (newInfo.royaltyAddress == address(0)) {\n            revert RoyaltyAddressCannotBeZeroAddress();\n        }\n\n        // Revert if the new basis points is greater than 10_000.\n        if (newInfo.royaltyBps > 10_000) {\n            revert InvalidRoyaltyBasisPoints(newInfo.royaltyBps);\n        }\n\n        // Set the new royalty info.\n        _royaltyInfo = newInfo;\n\n        // Emit an event with the updated params.\n        emit RoyaltyInfoUpdated(newInfo.royaltyAddress, newInfo.royaltyBps);\n    }\n\n    /**\n     * @notice Returns the base URI for token metadata.\n     */\n    function baseURI() external view override returns (string memory) {\n        return _baseURI();\n    }\n\n    /**\n     * @notice Returns the base URI for the contract, which ERC721A uses\n     *         to return tokenURI.\n     */\n    function _baseURI() internal view virtual override returns (string memory) {\n        return _tokenBaseURI;\n    }\n\n    /**\n     * @notice Returns the contract URI for contract metadata.\n     */\n    function contractURI() external view override returns (string memory) {\n        return _contractURI;\n    }\n\n    /**\n     * @notice Returns the max token supply.\n     */\n    function maxSupply() public view returns (uint256) {\n        return _maxSupply;\n    }\n\n    /**\n     * @notice Returns the provenance hash.\n     *         The provenance hash is used for random reveals, which\n     *         is a hash of the ordered metadata to show it is unmodified\n     *         after mint has started.\n     */\n    function provenanceHash() external view override returns (bytes32) {\n        return _provenanceHash;\n    }\n\n    /**\n     * @notice Returns the address that receives royalties.\n     */\n    function royaltyAddress() external view returns (address) {\n        return _royaltyInfo.royaltyAddress;\n    }\n\n    /**\n     * @notice Returns the royalty basis points out of 10_000.\n     */\n    function royaltyBasisPoints() external view returns (uint256) {\n        return _royaltyInfo.royaltyBps;\n    }\n\n    /**\n     * @notice Called with the sale price to determine how much royalty\n     *         is owed and to whom.\n     *\n     * @ param  _tokenId     The NFT asset queried for royalty information.\n     * @param  _salePrice    The sale price of the NFT asset specified by\n     *                       _tokenId.\n     *\n     * @return receiver      Address of who should be sent the royalty payment.\n     * @return royaltyAmount The royalty payment amount for _salePrice.\n     */\n    function royaltyInfo(\n        uint256,\n        /* _tokenId */\n        uint256 _salePrice\n    ) external view returns (address receiver, uint256 royaltyAmount) {\n        // Put the royalty info on the stack for more efficient access.\n        RoyaltyInfo storage info = _royaltyInfo;\n\n        // Set the royalty amount to the sale price times the royalty basis\n        // points divided by 10_000.\n        royaltyAmount = (_salePrice * info.royaltyBps) / 10_000;\n\n        // Set the receiver of the royalty.\n        receiver = info.royaltyAddress;\n    }\n\n    /**\n     * @notice Returns whether the interface is supported.\n     *\n     * @param interfaceId The interface id to check against.\n     */\n    function supportsInterface(bytes4 interfaceId)\n        public\n        view\n        virtual\n        override(IERC165, ERC721ACloneable)\n        returns (bool)\n    {\n        return\n            interfaceId == type(IERC2981).interfaceId ||\n            interfaceId == 0x49064906 || // ERC-4906\n            super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev Internal pure function to cast a `bool` value to a `uint256` value.\n     *\n     * @param b The `bool` value to cast.\n     *\n     * @return u The `uint256` value.\n     */\n    function _cast(bool b) internal pure returns (uint256 u) {\n        assembly {\n            u := b\n        }\n    }\n}\n"
      },
      "src/clones/ERC721SeaDropCloneable.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\nimport {\n    ERC721ContractMetadataCloneable,\n    ISeaDropTokenContractMetadata\n} from \"./ERC721ContractMetadataCloneable.sol\";\n\nimport {\n    INonFungibleSeaDropToken\n} from \"../interfaces/INonFungibleSeaDropToken.sol\";\n\nimport { ISeaDrop } from \"../interfaces/ISeaDrop.sol\";\n\nimport {\n    AllowListData,\n    PublicDrop,\n    TokenGatedDropStage,\n    SignedMintValidationParams\n} from \"../lib/SeaDropStructs.sol\";\n\nimport {\n    ERC721SeaDropStructsErrorsAndEvents\n} from \"../lib/ERC721SeaDropStructsErrorsAndEvents.sol\";\n\nimport { ERC721ACloneable } from \"./ERC721ACloneable.sol\";\n\nimport {\n    ReentrancyGuardUpgradeable\n} from \"openzeppelin-contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\n\nimport {\n    IERC165\n} from \"openzeppelin-contracts/utils/introspection/IERC165.sol\";\n\nimport {\n    DefaultOperatorFiltererUpgradeable\n} from \"operator-filter-registry/upgradeable/DefaultOperatorFiltererUpgradeable.sol\";\n\n/**\n * @title  ERC721SeaDrop\n * @author James Wenzel (emo.eth)\n * @author Ryan Ghods (ralxz.eth)\n * @author Stephan Min (stephanm.eth)\n * @notice ERC721SeaDrop is a token contract that contains methods\n *         to properly interact with SeaDrop.\n */\ncontract ERC721SeaDropCloneable is\n    ERC721ContractMetadataCloneable,\n    INonFungibleSeaDropToken,\n    ERC721SeaDropStructsErrorsAndEvents,\n    ReentrancyGuardUpgradeable,\n    DefaultOperatorFiltererUpgradeable\n{\n    /// @notice Track the allowed SeaDrop addresses.\n    mapping(address => bool) internal _allowedSeaDrop;\n\n    /// @notice Track the enumerated allowed SeaDrop addresses.\n    address[] internal _enumeratedAllowedSeaDrop;\n\n    /**\n     * @dev Reverts if not an allowed SeaDrop contract.\n     *      This function is inlined instead of being a modifier\n     *      to save contract space from being inlined N times.\n     *\n     * @param seaDrop The SeaDrop address to check if allowed.\n     */\n    function _onlyAllowedSeaDrop(address seaDrop) internal view {\n        if (_allowedSeaDrop[seaDrop] != true) {\n            revert OnlyAllowedSeaDrop();\n        }\n    }\n\n    /**\n     * @notice Deploy the token contract with its name, symbol,\n     *         and allowed SeaDrop addresses.\n     */\n    function initialize(\n        string calldata __name,\n        string calldata __symbol,\n        address[] calldata allowedSeaDrop,\n        address initialOwner\n    ) public initializer {\n        __ERC721ACloneable__init(__name, __symbol);\n        __ReentrancyGuard_init();\n        __DefaultOperatorFilterer_init();\n        _updateAllowedSeaDrop(allowedSeaDrop);\n        _transferOwnership(initialOwner);\n        emit SeaDropTokenDeployed();\n    }\n\n    /**\n     * @notice Update the allowed SeaDrop contracts.\n     *         Only the owner or administrator can use this function.\n     *\n     * @param allowedSeaDrop The allowed SeaDrop addresses.\n     */\n    function updateAllowedSeaDrop(address[] calldata allowedSeaDrop)\n        external\n        virtual\n        override\n        onlyOwner\n    {\n        _updateAllowedSeaDrop(allowedSeaDrop);\n    }\n\n    /**\n     * @notice Internal function to update the allowed SeaDrop contracts.\n     *\n     * @param allowedSeaDrop The allowed SeaDrop addresses.\n     */\n    function _updateAllowedSeaDrop(address[] calldata allowedSeaDrop) internal {\n        // Put the length on the stack for more efficient access.\n        uint256 enumeratedAllowedSeaDropLength = _enumeratedAllowedSeaDrop\n            .length;\n        uint256 allowedSeaDropLength = allowedSeaDrop.length;\n\n        // Reset the old mapping.\n        for (uint256 i = 0; i < enumeratedAllowedSeaDropLength; ) {\n            _allowedSeaDrop[_enumeratedAllowedSeaDrop[i]] = false;\n            unchecked {\n                ++i;\n            }\n        }\n\n        // Set the new mapping for allowed SeaDrop contracts.\n        for (uint256 i = 0; i < allowedSeaDropLength; ) {\n            _allowedSeaDrop[allowedSeaDrop[i]] = true;\n            unchecked {\n                ++i;\n            }\n        }\n\n        // Set the enumeration.\n        _enumeratedAllowedSeaDrop = allowedSeaDrop;\n\n        // Emit an event for the update.\n        emit AllowedSeaDropUpdated(allowedSeaDrop);\n    }\n\n    /**\n     * @dev Overrides the `_startTokenId` function from ERC721A\n     *      to start at token id `1`.\n     *\n     *      This is to avoid future possible problems since `0` is usually\n     *      used to signal values that have not been set or have been removed.\n     */\n    function _startTokenId() internal view virtual override returns (uint256) {\n        return 1;\n    }\n\n    /**\n     * @dev Overrides the `tokenURI()` function from ERC721A\n     *      to return just the base URI if it is implied to not be a directory.\n     *\n     *      This is to help with ERC721 contracts in which the same token URI\n     *      is desired for each token, such as when the tokenURI is 'unrevealed'.\n     */\n    function tokenURI(uint256 tokenId)\n        public\n        view\n        virtual\n        override\n        returns (string memory)\n    {\n        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();\n\n        string memory baseURI = _baseURI();\n\n        // Exit early if the baseURI is empty.\n        if (bytes(baseURI).length == 0) {\n            return \"\";\n        }\n\n        // Check if the last character in baseURI is a slash.\n        if (bytes(baseURI)[bytes(baseURI).length - 1] != bytes(\"/\")[0]) {\n            return baseURI;\n        }\n\n        return string(abi.encodePacked(baseURI, _toString(tokenId)));\n    }\n\n    /**\n     * @notice Mint tokens, restricted to the SeaDrop contract.\n     *\n     * @dev    NOTE: If a token registers itself with multiple SeaDrop\n     *         contracts, the implementation of this function should guard\n     *         against reentrancy. If the implementing token uses\n     *         _safeMint(), or a feeRecipient with a malicious receive() hook\n     *         is specified, the token or fee recipients may be able to execute\n     *         another mint in the same transaction via a separate SeaDrop\n     *         contract.\n     *         This is dangerous if an implementing token does not correctly\n     *         update the minterNumMinted and currentTotalSupply values before\n     *         transferring minted tokens, as SeaDrop references these values\n     *         to enforce token limits on a per-wallet and per-stage basis.\n     *\n     *         ERC721A tracks these values automatically, but this note and\n     *         nonReentrant modifier are left here to encourage best-practices\n     *         when referencing this contract.\n     *\n     * @param minter   The address to mint to.\n     * @param quantity The number of tokens to mint.\n     */\n    function mintSeaDrop(address minter, uint256 quantity)\n        external\n        virtual\n        override\n        nonReentrant\n    {\n        // Ensure the SeaDrop is allowed.\n        _onlyAllowedSeaDrop(msg.sender);\n\n        // Extra safety check to ensure the max supply is not exceeded.\n        if (_totalMinted() + quantity > maxSupply()) {\n            revert MintQuantityExceedsMaxSupply(\n                _totalMinted() + quantity,\n                maxSupply()\n            );\n        }\n\n        // Mint the quantity of tokens to the minter.\n        _safeMint(minter, quantity);\n    }\n\n    /**\n     * @notice Update the public drop data for this nft contract on SeaDrop.\n     *         Only the owner can use this function.\n     *\n     * @param seaDropImpl The allowed SeaDrop contract.\n     * @param publicDrop  The public drop data.\n     */\n    function updatePublicDrop(\n        address seaDropImpl,\n        PublicDrop calldata publicDrop\n    ) external virtual override {\n        // Ensure the sender is only the owner or contract itself.\n        _onlyOwnerOrSelf();\n\n        // Ensure the SeaDrop is allowed.\n        _onlyAllowedSeaDrop(seaDropImpl);\n\n        // Update the public drop data on SeaDrop.\n        ISeaDrop(seaDropImpl).updatePublicDrop(publicDrop);\n    }\n\n    /**\n     * @notice Update the allow list data for this nft contract on SeaDrop.\n     *         Only the owner can use this function.\n     *\n     * @param seaDropImpl   The allowed SeaDrop contract.\n     * @param allowListData The allow list data.\n     */\n    function updateAllowList(\n        address seaDropImpl,\n        AllowListData calldata allowListData\n    ) external virtual override {\n        // Ensure the sender is only the owner or contract itself.\n        _onlyOwnerOrSelf();\n\n        // Ensure the SeaDrop is allowed.\n        _onlyAllowedSeaDrop(seaDropImpl);\n\n        // Update the allow list on SeaDrop.\n        ISeaDrop(seaDropImpl).updateAllowList(allowListData);\n    }\n\n    /**\n     * @notice Update the token gated drop stage data for this nft contract\n     *         on SeaDrop.\n     *         Only the owner can use this function.\n     *\n     *         Note: If two INonFungibleSeaDropToken tokens are doing\n     *         simultaneous token gated drop promotions for each other,\n     *         they can be minted by the same actor until\n     *         `maxTokenSupplyForStage` is reached. Please ensure the\n     *         `allowedNftToken` is not running an active drop during the\n     *         `dropStage` time period.\n     *\n     * @param seaDropImpl     The allowed SeaDrop contract.\n     * @param allowedNftToken The allowed nft token.\n     * @param dropStage       The token gated drop stage data.\n     */\n    function updateTokenGatedDrop(\n        address seaDropImpl,\n        address allowedNftToken,\n        TokenGatedDropStage calldata dropStage\n    ) external virtual override {\n        // Ensure the sender is only the owner or contract itself.\n        _onlyOwnerOrSelf();\n\n        // Ensure the SeaDrop is allowed.\n        _onlyAllowedSeaDrop(seaDropImpl);\n\n        // Update the token gated drop stage.\n        ISeaDrop(seaDropImpl).updateTokenGatedDrop(allowedNftToken, dropStage);\n    }\n\n    /**\n     * @notice Update the drop URI for this nft contract on SeaDrop.\n     *         Only the owner can use this function.\n     *\n     * @param seaDropImpl The allowed SeaDrop contract.\n     * @param dropURI     The new drop URI.\n     */\n    function updateDropURI(address seaDropImpl, string calldata dropURI)\n        external\n        virtual\n        override\n    {\n        // Ensure the sender is only the owner or contract itself.\n        _onlyOwnerOrSelf();\n\n        // Ensure the SeaDrop is allowed.\n        _onlyAllowedSeaDrop(seaDropImpl);\n\n        // Update the drop URI.\n        ISeaDrop(seaDropImpl).updateDropURI(dropURI);\n    }\n\n    /**\n     * @notice Update the creator payout address for this nft contract on\n     *         SeaDrop.\n     *         Only the owner can set the creator payout address.\n     *\n     * @param seaDropImpl   The allowed SeaDrop contract.\n     * @param payoutAddress The new payout address.\n     */\n    function updateCreatorPayoutAddress(\n        address seaDropImpl,\n        address payoutAddress\n    ) external {\n        // Ensure the sender is only the owner or contract itself.\n        _onlyOwnerOrSelf();\n\n        // Ensure the SeaDrop is allowed.\n        _onlyAllowedSeaDrop(seaDropImpl);\n\n        // Update the creator payout address.\n        ISeaDrop(seaDropImpl).updateCreatorPayoutAddress(payoutAddress);\n    }\n\n    /**\n     * @notice Update the allowed fee recipient for this nft contract\n     *         on SeaDrop.\n     *         Only the owner can set the allowed fee recipient.\n     *\n     * @param seaDropImpl  The allowed SeaDrop contract.\n     * @param feeRecipient The new fee recipient.\n     * @param allowed      If the fee recipient is allowed.\n     */\n    function updateAllowedFeeRecipient(\n        address seaDropImpl,\n        address feeRecipient,\n        bool allowed\n    ) external virtual {\n        // Ensure the sender is only the owner or contract itself.\n        _onlyOwnerOrSelf();\n\n        // Ensure the SeaDrop is allowed.\n        _onlyAllowedSeaDrop(seaDropImpl);\n\n        // Update the allowed fee recipient.\n        ISeaDrop(seaDropImpl).updateAllowedFeeRecipient(feeRecipient, allowed);\n    }\n\n    /**\n     * @notice Update the server-side signers for this nft contract\n     *         on SeaDrop.\n     *         Only the owner can use this function.\n     *\n     * @param seaDropImpl                The allowed SeaDrop contract.\n     * @param signer                     The signer to update.\n     * @param signedMintValidationParams Minimum and maximum parameters to\n     *                                   enforce for signed mints.\n     */\n    function updateSignedMintValidationParams(\n        address seaDropImpl,\n        address signer,\n        SignedMintValidationParams memory signedMintValidationParams\n    ) external virtual override {\n        // Ensure the sender is only the owner or contract itself.\n        _onlyOwnerOrSelf();\n\n        // Ensure the SeaDrop is allowed.\n        _onlyAllowedSeaDrop(seaDropImpl);\n\n        // Update the signer.\n        ISeaDrop(seaDropImpl).updateSignedMintValidationParams(\n            signer,\n            signedMintValidationParams\n        );\n    }\n\n    /**\n     * @notice Update the allowed payers for this nft contract on SeaDrop.\n     *         Only the owner can use this function.\n     *\n     * @param seaDropImpl The allowed SeaDrop contract.\n     * @param payer       The payer to update.\n     * @param allowed     Whether the payer is allowed.\n     */\n    function updatePayer(\n        address seaDropImpl,\n        address payer,\n        bool allowed\n    ) external virtual override {\n        // Ensure the sender is only the owner or contract itself.\n        _onlyOwnerOrSelf();\n\n        // Ensure the SeaDrop is allowed.\n        _onlyAllowedSeaDrop(seaDropImpl);\n\n        // Update the payer.\n        ISeaDrop(seaDropImpl).updatePayer(payer, allowed);\n    }\n\n    /**\n     * @notice Returns a set of mint stats for the address.\n     *         This assists SeaDrop in enforcing maxSupply,\n     *         maxTotalMintableByWallet, and maxTokenSupplyForStage checks.\n     *\n     * @dev    NOTE: Implementing contracts should always update these numbers\n     *         before transferring any tokens with _safeMint() to mitigate\n     *         consequences of malicious onERC721Received() hooks.\n     *\n     * @param minter The minter address.\n     */\n    function getMintStats(address minter)\n        external\n        view\n        override\n        returns (\n            uint256 minterNumMinted,\n            uint256 currentTotalSupply,\n            uint256 maxSupply\n        )\n    {\n        minterNumMinted = _numberMinted(minter);\n        currentTotalSupply = _totalMinted();\n        maxSupply = _maxSupply;\n    }\n\n    /**\n     * @notice Returns whether the interface is supported.\n     *\n     * @param interfaceId The interface id to check against.\n     */\n    function supportsInterface(bytes4 interfaceId)\n        public\n        view\n        virtual\n        override(IERC165, ERC721ContractMetadataCloneable)\n        returns (bool)\n    {\n        return\n            interfaceId == type(INonFungibleSeaDropToken).interfaceId ||\n            interfaceId == type(ISeaDropTokenContractMetadata).interfaceId ||\n            // ERC721ContractMetadata returns supportsInterface true for\n            //     EIP-2981\n            // ERC721A returns supportsInterface true for\n            //     ERC165, ERC721, ERC721Metadata\n            super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev Approve or remove `operator` as an operator for the caller.\n     * Operators can call {transferFrom} or {safeTransferFrom}\n     * for any token owned by the caller.\n     *\n     * Requirements:\n     *\n     * - The `operator` cannot be the caller.\n     * - The `operator` must be allowed.\n     *\n     * Emits an {ApprovalForAll} event.\n     */\n    function setApprovalForAll(address operator, bool approved)\n        public\n        override\n        onlyAllowedOperatorApproval(operator)\n    {\n        super.setApprovalForAll(operator, approved);\n    }\n\n    /**\n     * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n     * The approval is cleared when the token is transferred.\n     *\n     * Only a single account can be approved at a time, so approving the\n     * zero address clears previous approvals.\n     *\n     * Requirements:\n     *\n     * - The caller must own the token or be an approved operator.\n     * - `tokenId` must exist.\n     * - The `operator` mut be allowed.\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address operator, uint256 tokenId)\n        public\n        override\n        onlyAllowedOperatorApproval(operator)\n    {\n        super.approve(operator, tokenId);\n    }\n\n    /**\n     * @dev Transfers `tokenId` from `from` to `to`.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must be owned by `from`.\n     * - If the caller is not `from`, it must be approved to move this token\n     * by either {approve} or {setApprovalForAll}.\n     * - The operator must be allowed.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) public override onlyAllowedOperator(from) {\n        super.transferFrom(from, to, tokenId);\n    }\n\n    /**\n     * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) public override onlyAllowedOperator(from) {\n        super.safeTransferFrom(from, to, tokenId);\n    }\n\n    /**\n     * @dev Safely transfers `tokenId` token from `from` to `to`.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must exist and be owned by `from`.\n     * - If the caller is not `from`, it must be approved to move this token\n     * by either {approve} or {setApprovalForAll}.\n     * - If `to` refers to a smart contract, it must implement\n     * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n     * - The operator must be allowed.\n     *\n     * Emits a {Transfer} event.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId,\n        bytes memory data\n    ) public override onlyAllowedOperator(from) {\n        super.safeTransferFrom(from, to, tokenId, data);\n    }\n\n    /**\n     * @notice Configure multiple properties at a time.\n     *\n     *         Note: The individual configure methods should be used\n     *         to unset or reset any properties to zero, as this method\n     *         will ignore zero-value properties in the config struct.\n     *\n     * @param config The configuration struct.\n     */\n    function multiConfigure(MultiConfigureStruct calldata config)\n        external\n        onlyOwner\n    {\n        if (config.maxSupply > 0) {\n            this.setMaxSupply(config.maxSupply);\n        }\n        if (bytes(config.baseURI).length != 0) {\n            this.setBaseURI(config.baseURI);\n        }\n        if (bytes(config.contractURI).length != 0) {\n            this.setContractURI(config.contractURI);\n        }\n        if (\n            _cast(config.publicDrop.startTime != 0) |\n                _cast(config.publicDrop.endTime != 0) ==\n            1\n        ) {\n            this.updatePublicDrop(config.seaDropImpl, config.publicDrop);\n        }\n        if (bytes(config.dropURI).length != 0) {\n            this.updateDropURI(config.seaDropImpl, config.dropURI);\n        }\n        if (config.allowListData.merkleRoot != bytes32(0)) {\n            this.updateAllowList(config.seaDropImpl, config.allowListData);\n        }\n        if (config.creatorPayoutAddress != address(0)) {\n            this.updateCreatorPayoutAddress(\n                config.seaDropImpl,\n                config.creatorPayoutAddress\n            );\n        }\n        if (config.provenanceHash != bytes32(0)) {\n            this.setProvenanceHash(config.provenanceHash);\n        }\n        if (config.allowedFeeRecipients.length > 0) {\n            for (uint256 i = 0; i < config.allowedFeeRecipients.length; ) {\n                this.updateAllowedFeeRecipient(\n                    config.seaDropImpl,\n                    config.allowedFeeRecipients[i],\n                    true\n                );\n                unchecked {\n                    ++i;\n                }\n            }\n        }\n        if (config.disallowedFeeRecipients.length > 0) {\n            for (uint256 i = 0; i < config.disallowedFeeRecipients.length; ) {\n                this.updateAllowedFeeRecipient(\n                    config.seaDropImpl,\n                    config.disallowedFeeRecipients[i],\n                    false\n                );\n                unchecked {\n                    ++i;\n                }\n            }\n        }\n        if (config.allowedPayers.length > 0) {\n            for (uint256 i = 0; i < config.allowedPayers.length; ) {\n                this.updatePayer(\n                    config.seaDropImpl,\n                    config.allowedPayers[i],\n                    true\n                );\n                unchecked {\n                    ++i;\n                }\n            }\n        }\n        if (config.disallowedPayers.length > 0) {\n            for (uint256 i = 0; i < config.disallowedPayers.length; ) {\n                this.updatePayer(\n                    config.seaDropImpl,\n                    config.disallowedPayers[i],\n                    false\n                );\n                unchecked {\n                    ++i;\n                }\n            }\n        }\n        if (config.tokenGatedDropStages.length > 0) {\n            if (\n                config.tokenGatedDropStages.length !=\n                config.tokenGatedAllowedNftTokens.length\n            ) {\n                revert TokenGatedMismatch();\n            }\n            for (uint256 i = 0; i < config.tokenGatedDropStages.length; ) {\n                this.updateTokenGatedDrop(\n                    config.seaDropImpl,\n                    config.tokenGatedAllowedNftTokens[i],\n                    config.tokenGatedDropStages[i]\n                );\n                unchecked {\n                    ++i;\n                }\n            }\n        }\n        if (config.disallowedTokenGatedAllowedNftTokens.length > 0) {\n            for (\n                uint256 i = 0;\n                i < config.disallowedTokenGatedAllowedNftTokens.length;\n\n            ) {\n                TokenGatedDropStage memory emptyStage;\n                this.updateTokenGatedDrop(\n                    config.seaDropImpl,\n                    config.disallowedTokenGatedAllowedNftTokens[i],\n                    emptyStage\n                );\n                unchecked {\n                    ++i;\n                }\n            }\n        }\n        if (config.signedMintValidationParams.length > 0) {\n            if (\n                config.signedMintValidationParams.length !=\n                config.signers.length\n            ) {\n                revert SignersMismatch();\n            }\n            for (\n                uint256 i = 0;\n                i < config.signedMintValidationParams.length;\n\n            ) {\n                this.updateSignedMintValidationParams(\n                    config.seaDropImpl,\n                    config.signers[i],\n                    config.signedMintValidationParams[i]\n                );\n                unchecked {\n                    ++i;\n                }\n            }\n        }\n        if (config.disallowedSigners.length > 0) {\n            for (uint256 i = 0; i < config.disallowedSigners.length; ) {\n                SignedMintValidationParams memory emptyParams;\n                this.updateSignedMintValidationParams(\n                    config.seaDropImpl,\n                    config.disallowedSigners[i],\n                    emptyParams\n                );\n                unchecked {\n                    ++i;\n                }\n            }\n        }\n    }\n}\n"
      },
      "src/interfaces/INonFungibleSeaDropToken.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\nimport {\n    ISeaDropTokenContractMetadata\n} from \"./ISeaDropTokenContractMetadata.sol\";\n\nimport {\n    AllowListData,\n    PublicDrop,\n    TokenGatedDropStage,\n    SignedMintValidationParams\n} from \"../lib/SeaDropStructs.sol\";\n\ninterface INonFungibleSeaDropToken is ISeaDropTokenContractMetadata {\n    /**\n     * @dev Revert with an error if a contract is not an allowed\n     *      SeaDrop address.\n     */\n    error OnlyAllowedSeaDrop();\n\n    /**\n     * @dev Emit an event when allowed SeaDrop contracts are updated.\n     */\n    event AllowedSeaDropUpdated(address[] allowedSeaDrop);\n\n    /**\n     * @notice Update the allowed SeaDrop contracts.\n     *         Only the owner or administrator can use this function.\n     *\n     * @param allowedSeaDrop The allowed SeaDrop addresses.\n     */\n    function updateAllowedSeaDrop(address[] calldata allowedSeaDrop) external;\n\n    /**\n     * @notice Mint tokens, restricted to the SeaDrop contract.\n     *\n     * @dev    NOTE: If a token registers itself with multiple SeaDrop\n     *         contracts, the implementation of this function should guard\n     *         against reentrancy. If the implementing token uses\n     *         _safeMint(), or a feeRecipient with a malicious receive() hook\n     *         is specified, the token or fee recipients may be able to execute\n     *         another mint in the same transaction via a separate SeaDrop\n     *         contract.\n     *         This is dangerous if an implementing token does not correctly\n     *         update the minterNumMinted and currentTotalSupply values before\n     *         transferring minted tokens, as SeaDrop references these values\n     *         to enforce token limits on a per-wallet and per-stage basis.\n     *\n     * @param minter   The address to mint to.\n     * @param quantity The number of tokens to mint.\n     */\n    function mintSeaDrop(address minter, uint256 quantity) external;\n\n    /**\n     * @notice Returns a set of mint stats for the address.\n     *         This assists SeaDrop in enforcing maxSupply,\n     *         maxTotalMintableByWallet, and maxTokenSupplyForStage checks.\n     *\n     * @dev    NOTE: Implementing contracts should always update these numbers\n     *         before transferring any tokens with _safeMint() to mitigate\n     *         consequences of malicious onERC721Received() hooks.\n     *\n     * @param minter The minter address.\n     */\n    function getMintStats(address minter)\n        external\n        view\n        returns (\n            uint256 minterNumMinted,\n            uint256 currentTotalSupply,\n            uint256 maxSupply\n        );\n\n    /**\n     * @notice Update the public drop data for this nft contract on SeaDrop.\n     *         Only the owner or administrator can use this function.\n     *\n     *         The administrator can only update `feeBps`.\n     *\n     * @param seaDropImpl The allowed SeaDrop contract.\n     * @param publicDrop  The public drop data.\n     */\n    function updatePublicDrop(\n        address seaDropImpl,\n        PublicDrop calldata publicDrop\n    ) external;\n\n    /**\n     * @notice Update the allow list data for this nft contract on SeaDrop.\n     *         Only the owner or administrator can use this function.\n     *\n     * @param seaDropImpl   The allowed SeaDrop contract.\n     * @param allowListData The allow list data.\n     */\n    function updateAllowList(\n        address seaDropImpl,\n        AllowListData calldata allowListData\n    ) external;\n\n    /**\n     * @notice Update the token gated drop stage data for this nft contract\n     *         on SeaDrop.\n     *         Only the owner or administrator can use this function.\n     *\n     *         The administrator, when present, must first set `feeBps`.\n     *\n     *         Note: If two INonFungibleSeaDropToken tokens are doing\n     *         simultaneous token gated drop promotions for each other,\n     *         they can be minted by the same actor until\n     *         `maxTokenSupplyForStage` is reached. Please ensure the\n     *         `allowedNftToken` is not running an active drop during the\n     *         `dropStage` time period.\n     *\n     *\n     * @param seaDropImpl     The allowed SeaDrop contract.\n     * @param allowedNftToken The allowed nft token.\n     * @param dropStage       The token gated drop stage data.\n     */\n    function updateTokenGatedDrop(\n        address seaDropImpl,\n        address allowedNftToken,\n        TokenGatedDropStage calldata dropStage\n    ) external;\n\n    /**\n     * @notice Update the drop URI for this nft contract on SeaDrop.\n     *         Only the owner or administrator can use this function.\n     *\n     * @param seaDropImpl The allowed SeaDrop contract.\n     * @param dropURI     The new drop URI.\n     */\n    function updateDropURI(address seaDropImpl, string calldata dropURI)\n        external;\n\n    /**\n     * @notice Update the creator payout address for this nft contract on\n     *         SeaDrop.\n     *         Only the owner can set the creator payout address.\n     *\n     * @param seaDropImpl   The allowed SeaDrop contract.\n     * @param payoutAddress The new payout address.\n     */\n    function updateCreatorPayoutAddress(\n        address seaDropImpl,\n        address payoutAddress\n    ) external;\n\n    /**\n     * @notice Update the allowed fee recipient for this nft contract\n     *         on SeaDrop.\n     *         Only the administrator can set the allowed fee recipient.\n     *\n     * @param seaDropImpl  The allowed SeaDrop contract.\n     * @param feeRecipient The new fee recipient.\n     */\n    function updateAllowedFeeRecipient(\n        address seaDropImpl,\n        address feeRecipient,\n        bool allowed\n    ) external;\n\n    /**\n     * @notice Update the server-side signers for this nft contract\n     *         on SeaDrop.\n     *         Only the owner or administrator can use this function.\n     *\n     * @param seaDropImpl                The allowed SeaDrop contract.\n     * @param signer                     The signer to update.\n     * @param signedMintValidationParams Minimum and maximum parameters\n     *                                   to enforce for signed mints.\n     */\n    function updateSignedMintValidationParams(\n        address seaDropImpl,\n        address signer,\n        SignedMintValidationParams memory signedMintValidationParams\n    ) external;\n\n    /**\n     * @notice Update the allowed payers for this nft contract on SeaDrop.\n     *         Only the owner or administrator can use this function.\n     *\n     * @param seaDropImpl The allowed SeaDrop contract.\n     * @param payer       The payer to update.\n     * @param allowed     Whether the payer is allowed.\n     */\n    function updatePayer(\n        address seaDropImpl,\n        address payer,\n        bool allowed\n    ) external;\n}\n"
      },
      "src/interfaces/ISeaDrop.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\nimport {\n    AllowListData,\n    MintParams,\n    PublicDrop,\n    TokenGatedDropStage,\n    TokenGatedMintParams,\n    SignedMintValidationParams\n} from \"../lib/SeaDropStructs.sol\";\n\nimport { SeaDropErrorsAndEvents } from \"../lib/SeaDropErrorsAndEvents.sol\";\n\ninterface ISeaDrop is SeaDropErrorsAndEvents {\n    /**\n     * @notice Mint a public drop.\n     *\n     * @param nftContract      The nft contract to mint.\n     * @param feeRecipient     The fee recipient.\n     * @param minterIfNotPayer The mint recipient if different than the payer.\n     * @param quantity         The number of tokens to mint.\n     */\n    function mintPublic(\n        address nftContract,\n        address feeRecipient,\n        address minterIfNotPayer,\n        uint256 quantity\n    ) external payable;\n\n    /**\n     * @notice Mint from an allow list.\n     *\n     * @param nftContract      The nft contract to mint.\n     * @param feeRecipient     The fee recipient.\n     * @param minterIfNotPayer The mint recipient if different than the payer.\n     * @param quantity         The number of tokens to mint.\n     * @param mintParams       The mint parameters.\n     * @param proof            The proof for the leaf of the allow list.\n     */\n    function mintAllowList(\n        address nftContract,\n        address feeRecipient,\n        address minterIfNotPayer,\n        uint256 quantity,\n        MintParams calldata mintParams,\n        bytes32[] calldata proof\n    ) external payable;\n\n    /**\n     * @notice Mint with a server-side signature.\n     *         Note that a signature can only be used once.\n     *\n     * @param nftContract      The nft contract to mint.\n     * @param feeRecipient     The fee recipient.\n     * @param minterIfNotPayer The mint recipient if different than the payer.\n     * @param quantity         The number of tokens to mint.\n     * @param mintParams       The mint parameters.\n     * @param salt             The sale for the signed mint.\n     * @param signature        The server-side signature, must be an allowed\n     *                         signer.\n     */\n    function mintSigned(\n        address nftContract,\n        address feeRecipient,\n        address minterIfNotPayer,\n        uint256 quantity,\n        MintParams calldata mintParams,\n        uint256 salt,\n        bytes calldata signature\n    ) external payable;\n\n    /**\n     * @notice Mint as an allowed token holder.\n     *         This will mark the token id as redeemed and will revert if the\n     *         same token id is attempted to be redeemed twice.\n     *\n     * @param nftContract      The nft contract to mint.\n     * @param feeRecipient     The fee recipient.\n     * @param minterIfNotPayer The mint recipient if different than the payer.\n     * @param mintParams       The token gated mint params.\n     */\n    function mintAllowedTokenHolder(\n        address nftContract,\n        address feeRecipient,\n        address minterIfNotPayer,\n        TokenGatedMintParams calldata mintParams\n    ) external payable;\n\n    /**\n     * @notice Emits an event to notify update of the drop URI.\n     *\n     *         This method assume msg.sender is an nft contract and its\n     *         ERC165 interface id matches INonFungibleSeaDropToken.\n     *\n     *         Note: Be sure only authorized users can call this from\n     *         token contracts that implement INonFungibleSeaDropToken.\n     *\n     * @param dropURI The new drop URI.\n     */\n    function updateDropURI(string calldata dropURI) external;\n\n    /**\n     * @notice Updates the public drop data for the nft contract\n     *         and emits an event.\n     *\n     *         This method assume msg.sender is an nft contract and its\n     *         ERC165 interface id matches INonFungibleSeaDropToken.\n     *\n     *         Note: Be sure only authorized users can call this from\n     *         token contracts that implement INonFungibleSeaDropToken.\n     *\n     * @param publicDrop The public drop data.\n     */\n    function updatePublicDrop(PublicDrop calldata publicDrop) external;\n\n    /**\n     * @notice Updates the allow list merkle root for the nft contract\n     *         and emits an event.\n     *\n     *         This method assume msg.sender is an nft contract and its\n     *         ERC165 interface id matches INonFungibleSeaDropToken.\n     *\n     *         Note: Be sure only authorized users can call this from\n     *         token contracts that implement INonFungibleSeaDropToken.\n     *\n     * @param allowListData The allow list data.\n     */\n    function updateAllowList(AllowListData calldata allowListData) external;\n\n    /**\n     * @notice Updates the token gated drop stage for the nft contract\n     *         and emits an event.\n     *\n     *         This method assume msg.sender is an nft contract and its\n     *         ERC165 interface id matches INonFungibleSeaDropToken.\n     *\n     *         Note: Be sure only authorized users can call this from\n     *         token contracts that implement INonFungibleSeaDropToken.\n     *\n     *         Note: If two INonFungibleSeaDropToken tokens are doing\n     *         simultaneous token gated drop promotions for each other,\n     *         they can be minted by the same actor until\n     *         `maxTokenSupplyForStage` is reached. Please ensure the\n     *         `allowedNftToken` is not running an active drop during\n     *         the `dropStage` time period.\n     *\n     * @param allowedNftToken The token gated nft token.\n     * @param dropStage       The token gated drop stage data.\n     */\n    function updateTokenGatedDrop(\n        address allowedNftToken,\n        TokenGatedDropStage calldata dropStage\n    ) external;\n\n    /**\n     * @notice Updates the creator payout address and emits an event.\n     *\n     *         This method assume msg.sender is an nft contract and its\n     *         ERC165 interface id matches INonFungibleSeaDropToken.\n     *\n     *         Note: Be sure only authorized users can call this from\n     *         token contracts that implement INonFungibleSeaDropToken.\n     *\n     * @param payoutAddress The creator payout address.\n     */\n    function updateCreatorPayoutAddress(address payoutAddress) external;\n\n    /**\n     * @notice Updates the allowed fee recipient and emits an event.\n     *\n     *         This method assume msg.sender is an nft contract and its\n     *         ERC165 interface id matches INonFungibleSeaDropToken.\n     *\n     *         Note: Be sure only authorized users can call this from\n     *         token contracts that implement INonFungibleSeaDropToken.\n     *\n     * @param feeRecipient The fee recipient.\n     * @param allowed      If the fee recipient is allowed.\n     */\n    function updateAllowedFeeRecipient(address feeRecipient, bool allowed)\n        external;\n\n    /**\n     * @notice Updates the allowed server-side signers and emits an event.\n     *\n     *         This method assume msg.sender is an nft contract and its\n     *         ERC165 interface id matches INonFungibleSeaDropToken.\n     *\n     *         Note: Be sure only authorized users can call this from\n     *         token contracts that implement INonFungibleSeaDropToken.\n     *\n     * @param signer                     The signer to update.\n     * @param signedMintValidationParams Minimum and maximum parameters\n     *                                   to enforce for signed mints.\n     */\n    function updateSignedMintValidationParams(\n        address signer,\n        SignedMintValidationParams calldata signedMintValidationParams\n    ) external;\n\n    /**\n     * @notice Updates the allowed payer and emits an event.\n     *\n     *         This method assume msg.sender is an nft contract and its\n     *         ERC165 interface id matches INonFungibleSeaDropToken.\n     *\n     *         Note: Be sure only authorized users can call this from\n     *         token contracts that implement INonFungibleSeaDropToken.\n     *\n     * @param payer   The payer to add or remove.\n     * @param allowed Whether to add or remove the payer.\n     */\n    function updatePayer(address payer, bool allowed) external;\n\n    /**\n     * @notice Returns the public drop data for the nft contract.\n     *\n     * @param nftContract The nft contract.\n     */\n    function getPublicDrop(address nftContract)\n        external\n        view\n        returns (PublicDrop memory);\n\n    /**\n     * @notice Returns the creator payout address for the nft contract.\n     *\n     * @param nftContract The nft contract.\n     */\n    function getCreatorPayoutAddress(address nftContract)\n        external\n        view\n        returns (address);\n\n    /**\n     * @notice Returns the allow list merkle root for the nft contract.\n     *\n     * @param nftContract The nft contract.\n     */\n    function getAllowListMerkleRoot(address nftContract)\n        external\n        view\n        returns (bytes32);\n\n    /**\n     * @notice Returns if the specified fee recipient is allowed\n     *         for the nft contract.\n     *\n     * @param nftContract  The nft contract.\n     * @param feeRecipient The fee recipient.\n     */\n    function getFeeRecipientIsAllowed(address nftContract, address feeRecipient)\n        external\n        view\n        returns (bool);\n\n    /**\n     * @notice Returns an enumeration of allowed fee recipients for an\n     *         nft contract when fee recipients are enforced\n     *\n     * @param nftContract The nft contract.\n     */\n    function getAllowedFeeRecipients(address nftContract)\n        external\n        view\n        returns (address[] memory);\n\n    /**\n     * @notice Returns the server-side signers for the nft contract.\n     *\n     * @param nftContract The nft contract.\n     */\n    function getSigners(address nftContract)\n        external\n        view\n        returns (address[] memory);\n\n    /**\n     * @notice Returns the struct of SignedMintValidationParams for a signer.\n     *\n     * @param nftContract The nft contract.\n     * @param signer      The signer.\n     */\n    function getSignedMintValidationParams(address nftContract, address signer)\n        external\n        view\n        returns (SignedMintValidationParams memory);\n\n    /**\n     * @notice Returns the payers for the nft contract.\n     *\n     * @param nftContract The nft contract.\n     */\n    function getPayers(address nftContract)\n        external\n        view\n        returns (address[] memory);\n\n    /**\n     * @notice Returns if the specified payer is allowed\n     *         for the nft contract.\n     *\n     * @param nftContract The nft contract.\n     * @param payer       The payer.\n     */\n    function getPayerIsAllowed(address nftContract, address payer)\n        external\n        view\n        returns (bool);\n\n    /**\n     * @notice Returns the allowed token gated drop tokens for the nft contract.\n     *\n     * @param nftContract The nft contract.\n     */\n    function getTokenGatedAllowedTokens(address nftContract)\n        external\n        view\n        returns (address[] memory);\n\n    /**\n     * @notice Returns the token gated drop data for the nft contract\n     *         and token gated nft.\n     *\n     * @param nftContract     The nft contract.\n     * @param allowedNftToken The token gated nft token.\n     */\n    function getTokenGatedDrop(address nftContract, address allowedNftToken)\n        external\n        view\n        returns (TokenGatedDropStage memory);\n\n    /**\n     * @notice Returns whether the token id for a token gated drop has been\n     *         redeemed.\n     *\n     * @param nftContract       The nft contract.\n     * @param allowedNftToken   The token gated nft token.\n     * @param allowedNftTokenId The token gated nft token id to check.\n     */\n    function getAllowedNftTokenIdIsRedeemed(\n        address nftContract,\n        address allowedNftToken,\n        uint256 allowedNftTokenId\n    ) external view returns (bool);\n}\n"
      },
      "src/interfaces/ISeaDropTokenContractMetadata.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\nimport { IERC2981 } from \"openzeppelin-contracts/interfaces/IERC2981.sol\";\n\ninterface ISeaDropTokenContractMetadata is IERC2981 {\n    /**\n     * @notice Throw if the max supply exceeds uint64, a limit\n     *         due to the storage of bit-packed variables in ERC721A.\n     */\n    error CannotExceedMaxSupplyOfUint64(uint256 newMaxSupply);\n\n    /**\n     * @dev Revert with an error when attempting to set the provenance\n     *      hash after the mint has started.\n     */\n    error ProvenanceHashCannotBeSetAfterMintStarted();\n\n    /**\n     * @dev Revert if the royalty basis points is greater than 10_000.\n     */\n    error InvalidRoyaltyBasisPoints(uint256 basisPoints);\n\n    /**\n     * @dev Revert if the royalty address is being set to the zero address.\n     */\n    error RoyaltyAddressCannotBeZeroAddress();\n\n    /**\n     * @dev Emit an event for token metadata reveals/updates,\n     *      according to EIP-4906.\n     *\n     * @param _fromTokenId The start token id.\n     * @param _toTokenId   The end token id.\n     */\n    event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId);\n\n    /**\n     * @dev Emit an event when the URI for the collection-level metadata\n     *      is updated.\n     */\n    event ContractURIUpdated(string newContractURI);\n\n    /**\n     * @dev Emit an event when the max token supply is updated.\n     */\n    event MaxSupplyUpdated(uint256 newMaxSupply);\n\n    /**\n     * @dev Emit an event with the previous and new provenance hash after\n     *      being updated.\n     */\n    event ProvenanceHashUpdated(bytes32 previousHash, bytes32 newHash);\n\n    /**\n     * @dev Emit an event when the royalties info is updated.\n     */\n    event RoyaltyInfoUpdated(address receiver, uint256 bps);\n\n    /**\n     * @notice A struct defining royalty info for the contract.\n     */\n    struct RoyaltyInfo {\n        address royaltyAddress;\n        uint96 royaltyBps;\n    }\n\n    /**\n     * @notice Sets the base URI for the token metadata and emits an event.\n     *\n     * @param tokenURI The new base URI to set.\n     */\n    function setBaseURI(string calldata tokenURI) external;\n\n    /**\n     * @notice Sets the contract URI for contract metadata.\n     *\n     * @param newContractURI The new contract URI.\n     */\n    function setContractURI(string calldata newContractURI) external;\n\n    /**\n     * @notice Sets the max supply and emits an event.\n     *\n     * @param newMaxSupply The new max supply to set.\n     */\n    function setMaxSupply(uint256 newMaxSupply) external;\n\n    /**\n     * @notice Sets the provenance hash and emits an event.\n     *\n     *         The provenance hash is used for random reveals, which\n     *         is a hash of the ordered metadata to show it has not been\n     *         modified after mint started.\n     *\n     *         This function will revert after the first item has been minted.\n     *\n     * @param newProvenanceHash The new provenance hash to set.\n     */\n    function setProvenanceHash(bytes32 newProvenanceHash) external;\n\n    /**\n     * @notice Sets the address and basis points for royalties.\n     *\n     * @param newInfo The struct to configure royalties.\n     */\n    function setRoyaltyInfo(RoyaltyInfo calldata newInfo) external;\n\n    /**\n     * @notice Returns the base URI for token metadata.\n     */\n    function baseURI() external view returns (string memory);\n\n    /**\n     * @notice Returns the contract URI.\n     */\n    function contractURI() external view returns (string memory);\n\n    /**\n     * @notice Returns the max token supply.\n     */\n    function maxSupply() external view returns (uint256);\n\n    /**\n     * @notice Returns the provenance hash.\n     *         The provenance hash is used for random reveals, which\n     *         is a hash of the ordered metadata to show it is unmodified\n     *         after mint has started.\n     */\n    function provenanceHash() external view returns (bytes32);\n\n    /**\n     * @notice Returns the address that receives royalties.\n     */\n    function royaltyAddress() external view returns (address);\n\n    /**\n     * @notice Returns the royalty basis points out of 10_000.\n     */\n    function royaltyBasisPoints() external view returns (uint256);\n}\n"
      },
      "src/lib/ERC721SeaDropStructsErrorsAndEvents.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\nimport {\n  AllowListData,\n  PublicDrop,\n  SignedMintValidationParams,\n  TokenGatedDropStage\n} from \"./SeaDropStructs.sol\";\n\ninterface ERC721SeaDropStructsErrorsAndEvents {\n  /**\n   * @notice Revert with an error if mint exceeds the max supply.\n   */\n  error MintQuantityExceedsMaxSupply(uint256 total, uint256 maxSupply);\n\n  /**\n   * @notice Revert with an error if the number of token gated \n   *         allowedNftTokens doesn't match the length of supplied\n   *         drop stages.\n   */\n  error TokenGatedMismatch();\n\n  /**\n   *  @notice Revert with an error if the number of signers doesn't match\n   *          the length of supplied signedMintValidationParams\n   */\n  error SignersMismatch();\n\n  /**\n   * @notice An event to signify that a SeaDrop token contract was deployed.\n   */\n  event SeaDropTokenDeployed();\n\n  /**\n   * @notice A struct to configure multiple contract options at a time.\n   */\n  struct MultiConfigureStruct {\n    uint256 maxSupply;\n    string baseURI;\n    string contractURI;\n    address seaDropImpl;\n    PublicDrop publicDrop;\n    string dropURI;\n    AllowListData allowListData;\n    address creatorPayoutAddress;\n    bytes32 provenanceHash;\n\n    address[] allowedFeeRecipients;\n    address[] disallowedFeeRecipients;\n\n    address[] allowedPayers;\n    address[] disallowedPayers;\n\n    // Token-gated\n    address[] tokenGatedAllowedNftTokens;\n    TokenGatedDropStage[] tokenGatedDropStages;\n    address[] disallowedTokenGatedAllowedNftTokens;\n\n    // Server-signed\n    address[] signers;\n    SignedMintValidationParams[] signedMintValidationParams;\n    address[] disallowedSigners;\n  }\n}"
      },
      "src/lib/SeaDropErrorsAndEvents.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\nimport { PublicDrop, TokenGatedDropStage, SignedMintValidationParams } from \"./SeaDropStructs.sol\";\n\ninterface SeaDropErrorsAndEvents {\n    /**\n     * @dev Revert with an error if the drop stage is not active.\n     */\n    error NotActive(\n        uint256 currentTimestamp,\n        uint256 startTimestamp,\n        uint256 endTimestamp\n    );\n\n    /**\n     * @dev Revert with an error if the mint quantity is zero.\n     */\n    error MintQuantityCannotBeZero();\n\n    /**\n     * @dev Revert with an error if the mint quantity exceeds the max allowed\n     *      to be minted per wallet.\n     */\n    error MintQuantityExceedsMaxMintedPerWallet(uint256 total, uint256 allowed);\n\n    /**\n     * @dev Revert with an error if the mint quantity exceeds the max token\n     *      supply.\n     */\n    error MintQuantityExceedsMaxSupply(uint256 total, uint256 maxSupply);\n\n    /**\n     * @dev Revert with an error if the mint quantity exceeds the max token\n     *      supply for the stage.\n     *      Note: The `maxTokenSupplyForStage` for public mint is\n     *      always `type(uint).max`.\n     */\n    error MintQuantityExceedsMaxTokenSupplyForStage(\n        uint256 total, \n        uint256 maxTokenSupplyForStage\n    );\n    \n    /**\n     * @dev Revert if the fee recipient is the zero address.\n     */\n    error FeeRecipientCannotBeZeroAddress();\n\n    /**\n     * @dev Revert if the fee recipient is not already included.\n     */\n    error FeeRecipientNotPresent();\n\n    /**\n     * @dev Revert if the fee basis points is greater than 10_000.\n     */\n    error InvalidFeeBps(uint256 feeBps);\n\n    /**\n     * @dev Revert if the fee recipient is already included.\n     */\n    error DuplicateFeeRecipient();\n\n    /**\n     * @dev Revert if the fee recipient is restricted and not allowed.\n     */\n    error FeeRecipientNotAllowed();\n\n    /**\n     * @dev Revert if the creator payout address is the zero address.\n     */\n    error CreatorPayoutAddressCannotBeZeroAddress();\n\n    /**\n     * @dev Revert with an error if the received payment is incorrect.\n     */\n    error IncorrectPayment(uint256 got, uint256 want);\n\n    /**\n     * @dev Revert with an error if the allow list proof is invalid.\n     */\n    error InvalidProof();\n\n    /**\n     * @dev Revert if a supplied signer address is the zero address.\n     */\n    error SignerCannotBeZeroAddress();\n\n    /**\n     * @dev Revert with an error if signer's signature is invalid.\n     */\n    error InvalidSignature(address recoveredSigner);\n\n    /**\n     * @dev Revert with an error if a signer is not included in\n     *      the enumeration when removing.\n     */\n    error SignerNotPresent();\n\n    /**\n     * @dev Revert with an error if a payer is not included in\n     *      the enumeration when removing.\n     */\n    error PayerNotPresent();\n\n    /**\n     * @dev Revert with an error if a payer is already included in mapping\n     *      when adding.\n     *      Note: only applies when adding a single payer, as duplicates in\n     *      enumeration can be removed with updatePayer.\n     */\n    error DuplicatePayer();\n\n    /**\n     * @dev Revert with an error if the payer is not allowed. The minter must\n     *      pay for their own mint.\n     */\n    error PayerNotAllowed();\n\n    /**\n     * @dev Revert if a supplied payer address is the zero address.\n     */\n    error PayerCannotBeZeroAddress();\n\n    /**\n     * @dev Revert with an error if the sender does not\n     *      match the INonFungibleSeaDropToken interface.\n     */\n    error OnlyINonFungibleSeaDropToken(address sender);\n\n    /**\n     * @dev Revert with an error if the sender of a token gated supplied\n     *      drop stage redeem is not the owner of the token.\n     */\n    error TokenGatedNotTokenOwner(\n        address nftContract,\n        address allowedNftToken,\n        uint256 allowedNftTokenId\n    );\n\n    /**\n     * @dev Revert with an error if the token id has already been used to\n     *      redeem a token gated drop stage.\n     */\n    error TokenGatedTokenIdAlreadyRedeemed(\n        address nftContract,\n        address allowedNftToken,\n        uint256 allowedNftTokenId\n    );\n\n    /**\n     * @dev Revert with an error if an empty TokenGatedDropStage is provided\n     *      for an already-empty TokenGatedDropStage.\n     */\n     error TokenGatedDropStageNotPresent();\n\n    /**\n     * @dev Revert with an error if an allowedNftToken is set to\n     *      the zero address.\n     */\n     error TokenGatedDropAllowedNftTokenCannotBeZeroAddress();\n\n    /**\n     * @dev Revert with an error if an allowedNftToken is set to\n     *      the drop token itself.\n     */\n     error TokenGatedDropAllowedNftTokenCannotBeDropToken();\n\n\n    /**\n     * @dev Revert with an error if supplied signed mint price is less than\n     *      the minimum specified.\n     */\n    error InvalidSignedMintPrice(uint256 got, uint256 minimum);\n\n    /**\n     * @dev Revert with an error if supplied signed maxTotalMintableByWallet\n     *      is greater than the maximum specified.\n     */\n    error InvalidSignedMaxTotalMintableByWallet(uint256 got, uint256 maximum);\n\n    /**\n     * @dev Revert with an error if supplied signed start time is less than\n     *      the minimum specified.\n     */\n    error InvalidSignedStartTime(uint256 got, uint256 minimum);\n    \n    /**\n     * @dev Revert with an error if supplied signed end time is greater than\n     *      the maximum specified.\n     */\n    error InvalidSignedEndTime(uint256 got, uint256 maximum);\n\n    /**\n     * @dev Revert with an error if supplied signed maxTokenSupplyForStage\n     *      is greater than the maximum specified.\n     */\n     error InvalidSignedMaxTokenSupplyForStage(uint256 got, uint256 maximum);\n    \n     /**\n     * @dev Revert with an error if supplied signed feeBps is greater than\n     *      the maximum specified, or less than the minimum.\n     */\n    error InvalidSignedFeeBps(uint256 got, uint256 minimumOrMaximum);\n\n    /**\n     * @dev Revert with an error if signed mint did not specify to restrict\n     *      fee recipients.\n     */\n    error SignedMintsMustRestrictFeeRecipients();\n\n    /**\n     * @dev Revert with an error if a signature for a signed mint has already\n     *      been used.\n     */\n    error SignatureAlreadyUsed();\n\n    /**\n     * @dev An event with details of a SeaDrop mint, for analytical purposes.\n     * \n     * @param nftContract    The nft contract.\n     * @param minter         The mint recipient.\n     * @param feeRecipient   The fee recipient.\n     * @param payer          The address who payed for the tx.\n     * @param quantityMinted The number of tokens minted.\n     * @param unitMintPrice  The amount paid for each token.\n     * @param feeBps         The fee out of 10_000 basis points collected.\n     * @param dropStageIndex The drop stage index. Items minted\n     *                       through mintPublic() have\n     *                       dropStageIndex of 0.\n     */\n    event SeaDropMint(\n        address indexed nftContract,\n        address indexed minter,\n        address indexed feeRecipient,\n        address payer,\n        uint256 quantityMinted,\n        uint256 unitMintPrice,\n        uint256 feeBps,\n        uint256 dropStageIndex\n    );\n\n    /**\n     * @dev An event with updated public drop data for an nft contract.\n     */\n    event PublicDropUpdated(\n        address indexed nftContract,\n        PublicDrop publicDrop\n    );\n\n    /**\n     * @dev An event with updated token gated drop stage data\n     *      for an nft contract.\n     */\n    event TokenGatedDropStageUpdated(\n        address indexed nftContract,\n        address indexed allowedNftToken,\n        TokenGatedDropStage dropStage\n    );\n\n    /**\n     * @dev An event with updated allow list data for an nft contract.\n     * \n     * @param nftContract        The nft contract.\n     * @param previousMerkleRoot The previous allow list merkle root.\n     * @param newMerkleRoot      The new allow list merkle root.\n     * @param publicKeyURI       If the allow list is encrypted, the public key\n     *                           URIs that can decrypt the list.\n     *                           Empty if unencrypted.\n     * @param allowListURI       The URI for the allow list.\n     */\n    event AllowListUpdated(\n        address indexed nftContract,\n        bytes32 indexed previousMerkleRoot,\n        bytes32 indexed newMerkleRoot,\n        string[] publicKeyURI,\n        string allowListURI\n    );\n\n    /**\n     * @dev An event with updated drop URI for an nft contract.\n     */\n    event DropURIUpdated(address indexed nftContract, string newDropURI);\n\n    /**\n     * @dev An event with the updated creator payout address for an nft\n     *      contract.\n     */\n    event CreatorPayoutAddressUpdated(\n        address indexed nftContract,\n        address indexed newPayoutAddress\n    );\n\n    /**\n     * @dev An event with the updated allowed fee recipient for an nft\n     *      contract.\n     */\n    event AllowedFeeRecipientUpdated(\n        address indexed nftContract,\n        address indexed feeRecipient,\n        bool indexed allowed\n    );\n\n    /**\n     * @dev An event with the updated validation parameters for server-side\n     *      signers.\n     */\n    event SignedMintValidationParamsUpdated(\n        address indexed nftContract,\n        address indexed signer,\n        SignedMintValidationParams signedMintValidationParams\n    );   \n\n    /**\n     * @dev An event with the updated payer for an nft contract.\n     */\n    event PayerUpdated(\n        address indexed nftContract,\n        address indexed payer,\n        bool indexed allowed\n    );\n}\n"
      },
      "src/lib/SeaDropStructs.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\n/**\n * @notice A struct defining public drop data.\n *         Designed to fit efficiently in one storage slot.\n * \n * @param mintPrice                The mint price per token. (Up to 1.2m\n *                                 of native token, e.g. ETH, MATIC)\n * @param startTime                The start time, ensure this is not zero.\n * @param endTIme                  The end time, ensure this is not zero.\n * @param maxTotalMintableByWallet Maximum total number of mints a user is\n *                                 allowed. (The limit for this field is\n *                                 2^16 - 1)\n * @param feeBps                   Fee out of 10_000 basis points to be\n *                                 collected.\n * @param restrictFeeRecipients    If false, allow any fee recipient;\n *                                 if true, check fee recipient is allowed.\n */\nstruct PublicDrop {\n    uint80 mintPrice; // 80/256 bits\n    uint48 startTime; // 128/256 bits\n    uint48 endTime; // 176/256 bits\n    uint16 maxTotalMintableByWallet; // 224/256 bits\n    uint16 feeBps; // 240/256 bits\n    bool restrictFeeRecipients; // 248/256 bits\n}\n\n/**\n * @notice A struct defining token gated drop stage data.\n *         Designed to fit efficiently in one storage slot.\n * \n * @param mintPrice                The mint price per token. (Up to 1.2m \n *                                 of native token, e.g.: ETH, MATIC)\n * @param maxTotalMintableByWallet Maximum total number of mints a user is\n *                                 allowed. (The limit for this field is\n *                                 2^16 - 1)\n * @param startTime                The start time, ensure this is not zero.\n * @param endTime                  The end time, ensure this is not zero.\n * @param dropStageIndex           The drop stage index to emit with the event\n *                                 for analytical purposes. This should be \n *                                 non-zero since the public mint emits\n *                                 with index zero.\n * @param maxTokenSupplyForStage   The limit of token supply this stage can\n *                                 mint within. (The limit for this field is\n *                                 2^16 - 1)\n * @param feeBps                   Fee out of 10_000 basis points to be\n *                                 collected.\n * @param restrictFeeRecipients    If false, allow any fee recipient;\n *                                 if true, check fee recipient is allowed.\n */\nstruct TokenGatedDropStage {\n    uint80 mintPrice; // 80/256 bits\n    uint16 maxTotalMintableByWallet; // 96/256 bits\n    uint48 startTime; // 144/256 bits\n    uint48 endTime; // 192/256 bits\n    uint8 dropStageIndex; // non-zero. 200/256 bits\n    uint32 maxTokenSupplyForStage; // 232/256 bits\n    uint16 feeBps; // 248/256 bits\n    bool restrictFeeRecipients; // 256/256 bits\n}\n\n/**\n * @notice A struct defining mint params for an allow list.\n *         An allow list leaf will be composed of `msg.sender` and\n *         the following params.\n * \n *         Note: Since feeBps is encoded in the leaf, backend should ensure\n *         that feeBps is acceptable before generating a proof.\n * \n * @param mintPrice                The mint price per token.\n * @param maxTotalMintableByWallet Maximum total number of mints a user is\n *                                 allowed.\n * @param startTime                The start time, ensure this is not zero.\n * @param endTime                  The end time, ensure this is not zero.\n * @param dropStageIndex           The drop stage index to emit with the event\n *                                 for analytical purposes. This should be\n *                                 non-zero since the public mint emits with\n *                                 index zero.\n * @param maxTokenSupplyForStage   The limit of token supply this stage can\n *                                 mint within.\n * @param feeBps                   Fee out of 10_000 basis points to be\n *                                 collected.\n * @param restrictFeeRecipients    If false, allow any fee recipient;\n *                                 if true, check fee recipient is allowed.\n */\nstruct MintParams {\n    uint256 mintPrice; \n    uint256 maxTotalMintableByWallet;\n    uint256 startTime;\n    uint256 endTime;\n    uint256 dropStageIndex; // non-zero\n    uint256 maxTokenSupplyForStage;\n    uint256 feeBps;\n    bool restrictFeeRecipients;\n}\n\n/**\n * @notice A struct defining token gated mint params.\n * \n * @param allowedNftToken    The allowed nft token contract address.\n * @param allowedNftTokenIds The token ids to redeem.\n */\nstruct TokenGatedMintParams {\n    address allowedNftToken;\n    uint256[] allowedNftTokenIds;\n}\n\n/**\n * @notice A struct defining allow list data (for minting an allow list).\n * \n * @param merkleRoot    The merkle root for the allow list.\n * @param publicKeyURIs If the allowListURI is encrypted, a list of URIs\n *                      pointing to the public keys. Empty if unencrypted.\n * @param allowListURI  The URI for the allow list.\n */\nstruct AllowListData {\n    bytes32 merkleRoot;\n    string[] publicKeyURIs;\n    string allowListURI;\n}\n\n/**\n * @notice A struct defining minimum and maximum parameters to validate for \n *         signed mints, to minimize negative effects of a compromised signer.\n *\n * @param minMintPrice                The minimum mint price allowed.\n * @param maxMaxTotalMintableByWallet The maximum total number of mints allowed\n *                                    by a wallet.\n * @param minStartTime                The minimum start time allowed.\n * @param maxEndTime                  The maximum end time allowed.\n * @param maxMaxTokenSupplyForStage   The maximum token supply allowed.\n * @param minFeeBps                   The minimum fee allowed.\n * @param maxFeeBps                   The maximum fee allowed.\n */\nstruct SignedMintValidationParams {\n    uint80 minMintPrice; // 80/256 bits\n    uint24 maxMaxTotalMintableByWallet; // 104/256 bits\n    uint40 minStartTime; // 144/256 bits\n    uint40 maxEndTime; // 184/256 bits\n    uint40 maxMaxTokenSupplyForStage; // 224/256 bits\n    uint16 minFeeBps; // 240/256 bits\n    uint16 maxFeeBps; // 256/256 bits\n}"
      }
    },
    "settings": {
      "remappings": [
        "ERC721A-Upgradeable/=lib/ERC721A-Upgradeable/contracts/",
        "ERC721A/=lib/ERC721A/contracts/",
        "create2-helpers/=lib/create2-helpers/src/",
        "create2-scripts/=lib/create2-helpers/script/",
        "ds-test/=lib/ds-test/src/",
        "erc4626-tests/=lib/operator-filter-registry/lib/openzeppelin-contracts/lib/erc4626-tests/",
        "forge-std/=lib/forge-std/src/",
        "murky/=lib/murky/src/",
        "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
        "openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/",
        "operator-filter-registry/=lib/operator-filter-registry/src/",
        "seadrop/=src/",
        "solmate/=lib/solmate/src/",
        "utility-contracts/=lib/utility-contracts/src/"
      ],
      "optimizer": {
        "enabled": true,
        "runs": 1000000
      },
      "metadata": {
        "bytecodeHash": "none"
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "evmVersion": "london",
      "libraries": {}
    }
  }}