creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "@thirdweb-dev/contracts/eip/ERC165.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./interface/IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n        return interfaceId == type(IERC165).interfaceId;\n    }\n}\n"
      },
      "@thirdweb-dev/contracts/eip/ERC721AVirtualApprove.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// ERC721A Contracts v3.3.0\n// Creator: Chiru Labs\n\npragma solidity ^0.8.4;\n\n////////// CHANGELOG: turn `approve` to virtual //////////\n\nimport \"./interface/IERC721A.sol\";\nimport \"./interface/IERC721Receiver.sol\";\nimport \"../lib/Address.sol\";\nimport \"../external-deps/openzeppelin/utils/Context.sol\";\nimport \"../lib/Strings.sol\";\nimport \"./ERC165.sol\";\n\n/**\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\n * the Metadata extension. Built to optimize for lower gas during batch mints.\n *\n * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..).\n *\n * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.\n *\n * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256).\n */\ncontract ERC721A is Context, ERC165, IERC721A {\n    using Address for address;\n    using Strings for uint256;\n\n    // The tokenId of the next token to be minted.\n    uint256 internal _currentIndex;\n\n    // The number of tokens burned.\n    uint256 internal _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. See _ownershipOf implementation for details.\n    mapping(uint256 => TokenOwnership) internal _ownerships;\n\n    // Mapping owner address to address data\n    mapping(address => AddressData) private _addressData;\n\n    // Mapping from token ID to approved address\n    mapping(uint256 => address) private _tokenApprovals;\n\n    // Mapping from owner to operator approvals\n    mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n    constructor(string memory name_, string memory symbol_) {\n        _name = name_;\n        _symbol = symbol_;\n        _currentIndex = _startTokenId();\n    }\n\n    /**\n     * To change the starting tokenId, please override this function.\n     */\n    function _startTokenId() internal view virtual returns (uint256) {\n        return 0;\n    }\n\n    /**\n     * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens.\n     */\n    function totalSupply() public view 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     * Returns the total amount of tokens minted in the contract.\n     */\n    function _totalMinted() internal view 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 See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165) returns (bool) {\n        return\n            interfaceId == type(IERC721).interfaceId ||\n            interfaceId == type(IERC721Metadata).interfaceId ||\n            super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev See {IERC721-balanceOf}.\n     */\n    function balanceOf(address owner) public view override returns (uint256) {\n        if (owner == address(0)) revert BalanceQueryForZeroAddress();\n        return uint256(_addressData[owner].balance);\n    }\n\n    /**\n     * Returns the number of tokens minted by `owner`.\n     */\n    function _numberMinted(address owner) internal view returns (uint256) {\n        return uint256(_addressData[owner].numberMinted);\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 uint256(_addressData[owner].numberBurned);\n    }\n\n    /**\n     * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used).\n     */\n    function _getAux(address owner) internal view returns (uint64) {\n        return _addressData[owner].aux;\n    }\n\n    /**\n     * Sets the auxillary 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 {\n        _addressData[owner].aux = aux;\n    }\n\n    /**\n     * Gas spent here starts off proportional to the maximum mint batch size.\n     * It gradually moves to O(1) as tokens get transferred around in the collection over time.\n     */\n    function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {\n        uint256 curr = tokenId;\n\n        unchecked {\n            if (_startTokenId() <= curr)\n                if (curr < _currentIndex) {\n                    TokenOwnership memory ownership = _ownerships[curr];\n                    if (!ownership.burned) {\n                        if (ownership.addr != address(0)) {\n                            return ownership;\n                        }\n                        // Invariant:\n                        // There will always be an ownership that has an address and is not burned\n                        // before an ownership that does not have an address and is not burned.\n                        // Hence, curr will not underflow.\n                        while (true) {\n                            curr--;\n                            ownership = _ownerships[curr];\n                            if (ownership.addr != address(0)) {\n                                return ownership;\n                            }\n                        }\n                    }\n                }\n        }\n        revert OwnerQueryForNonexistentToken();\n    }\n\n    /**\n     * @dev See {IERC721-ownerOf}.\n     */\n    function ownerOf(uint256 tokenId) public view override returns (address) {\n        return _ownershipOf(tokenId).addr;\n    }\n\n    /**\n     * @dev See {IERC721Metadata-name}.\n     */\n    function name() public view virtual override returns (string memory) {\n        return _name;\n    }\n\n    /**\n     * @dev See {IERC721Metadata-symbol}.\n     */\n    function symbol() public view virtual override returns (string memory) {\n        return _symbol;\n    }\n\n    /**\n     * @dev See {IERC721Metadata-tokenURI}.\n     */\n    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\n        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();\n\n        string memory baseURI = _baseURI();\n        return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \"\";\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, can be overriden in child contracts.\n     */\n    function _baseURI() internal view virtual returns (string memory) {\n        return \"\";\n    }\n\n    /**\n     * @dev See {IERC721-approve}.\n     */\n    function approve(address to, uint256 tokenId) public virtual override {\n        address owner = ERC721A.ownerOf(tokenId);\n        if (to == owner) revert ApprovalToCurrentOwner();\n\n        if (_msgSender() != owner)\n            if (!isApprovedForAll(owner, _msgSender())) {\n                revert ApprovalCallerNotOwnerNorApproved();\n            }\n\n        _approve(to, tokenId, owner);\n    }\n\n    /**\n     * @dev See {IERC721-getApproved}.\n     */\n    function getApproved(uint256 tokenId) public view override returns (address) {\n        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();\n\n        return _tokenApprovals[tokenId];\n    }\n\n    /**\n     * @dev See {IERC721-setApprovalForAll}.\n     */\n    function setApprovalForAll(address operator, bool approved) public virtual override {\n        if (operator == _msgSender()) revert ApproveToCaller();\n\n        _operatorApprovals[_msgSender()][operator] = approved;\n        emit ApprovalForAll(_msgSender(), operator, approved);\n    }\n\n    /**\n     * @dev See {IERC721-isApprovedForAll}.\n     */\n    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\n        return _operatorApprovals[owner][operator];\n    }\n\n    /**\n     * @dev See {IERC721-transferFrom}.\n     */\n    function transferFrom(address from, address to, uint256 tokenId) public virtual override {\n        _transfer(from, to, tokenId);\n    }\n\n    /**\n     * @dev See {IERC721-safeTransferFrom}.\n     */\n    function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {\n        safeTransferFrom(from, to, tokenId, \"\");\n    }\n\n    /**\n     * @dev See {IERC721-safeTransferFrom}.\n     */\n    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override {\n        _transfer(from, to, tokenId);\n        if (to.isContract())\n            if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {\n                revert TransferToNonERC721ReceiverImplementer();\n            }\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 (`_mint`),\n     */\n    function _exists(uint256 tokenId) internal view returns (bool) {\n        return _startTokenId() <= tokenId && tokenId < _currentIndex && !_ownerships[tokenId].burned;\n    }\n\n    /**\n     * @dev Equivalent to `_safeMint(to, quantity, '')`.\n     */\n    function _safeMint(address to, uint256 quantity) internal {\n        _safeMint(to, 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     * Emits a {Transfer} event.\n     */\n    function _safeMint(address to, uint256 quantity, bytes memory _data) internal {\n        uint256 startTokenId = _currentIndex;\n        if (to == address(0)) revert MintToZeroAddress();\n        if (quantity == 0) revert MintZeroQuantity();\n\n        _beforeTokenTransfers(address(0), to, startTokenId, quantity);\n\n        // Overflows are incredibly unrealistic.\n        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1\n        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1\n        unchecked {\n            _addressData[to].balance += uint64(quantity);\n            _addressData[to].numberMinted += uint64(quantity);\n\n            _ownerships[startTokenId].addr = to;\n            _ownerships[startTokenId].startTimestamp = uint64(block.timestamp);\n\n            uint256 updatedIndex = startTokenId;\n            uint256 end = updatedIndex + quantity;\n\n            if (to.isContract()) {\n                do {\n                    emit Transfer(address(0), to, updatedIndex);\n                    if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) {\n                        revert TransferToNonERC721ReceiverImplementer();\n                    }\n                } while (updatedIndex < end);\n                // Reentrancy protection\n                if (_currentIndex != startTokenId) revert();\n            } else {\n                do {\n                    emit Transfer(address(0), to, updatedIndex++);\n                } while (updatedIndex < end);\n            }\n            _currentIndex = updatedIndex;\n        }\n        _afterTokenTransfers(address(0), to, startTokenId, quantity);\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.\n     */\n    function _mint(address to, uint256 quantity) internal {\n        uint256 startTokenId = _currentIndex;\n        if (to == address(0)) revert MintToZeroAddress();\n        if (quantity == 0) revert MintZeroQuantity();\n\n        _beforeTokenTransfers(address(0), to, startTokenId, quantity);\n\n        // Overflows are incredibly unrealistic.\n        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1\n        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1\n        unchecked {\n            _addressData[to].balance += uint64(quantity);\n            _addressData[to].numberMinted += uint64(quantity);\n\n            _ownerships[startTokenId].addr = to;\n            _ownerships[startTokenId].startTimestamp = uint64(block.timestamp);\n\n            uint256 updatedIndex = startTokenId;\n            uint256 end = updatedIndex + quantity;\n\n            do {\n                emit Transfer(address(0), to, updatedIndex++);\n            } while (updatedIndex < end);\n\n            _currentIndex = updatedIndex;\n        }\n        _afterTokenTransfers(address(0), to, startTokenId, quantity);\n    }\n\n    /**\n     * @dev Transfers `tokenId` from `from` to `to`.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must be owned by `from`.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _transfer(address from, address to, uint256 tokenId) private {\n        TokenOwnership memory prevOwnership = _ownershipOf(tokenId);\n\n        if (prevOwnership.addr != from) revert TransferFromIncorrectOwner();\n\n        bool isApprovedOrOwner = (_msgSender() == from ||\n            isApprovedForAll(from, _msgSender()) ||\n            getApproved(tokenId) == _msgSender());\n\n        if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();\n        if (to == address(0)) revert TransferToZeroAddress();\n\n        _beforeTokenTransfers(from, to, tokenId, 1);\n\n        // Clear approvals from the previous owner\n        _approve(address(0), tokenId, from);\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            _addressData[from].balance -= 1;\n            _addressData[to].balance += 1;\n\n            TokenOwnership storage currSlot = _ownerships[tokenId];\n            currSlot.addr = to;\n            currSlot.startTimestamp = uint64(block.timestamp);\n\n            // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it.\n            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.\n            uint256 nextTokenId = tokenId + 1;\n            TokenOwnership storage nextSlot = _ownerships[nextTokenId];\n            if (nextSlot.addr == address(0)) {\n                // This will suffice for checking _exists(nextTokenId),\n                // as a burned slot cannot contain the zero address.\n                if (nextTokenId != _currentIndex) {\n                    nextSlot.addr = from;\n                    nextSlot.startTimestamp = prevOwnership.startTimestamp;\n                }\n            }\n        }\n\n        emit Transfer(from, to, tokenId);\n        _afterTokenTransfers(from, to, tokenId, 1);\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        TokenOwnership memory prevOwnership = _ownershipOf(tokenId);\n\n        address from = prevOwnership.addr;\n\n        if (approvalCheck) {\n            bool isApprovedOrOwner = (_msgSender() == from ||\n                isApprovedForAll(from, _msgSender()) ||\n                getApproved(tokenId) == _msgSender());\n\n            if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();\n        }\n\n        _beforeTokenTransfers(from, address(0), tokenId, 1);\n\n        // Clear approvals from the previous owner\n        _approve(address(0), tokenId, from);\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            AddressData storage addressData = _addressData[from];\n            addressData.balance -= 1;\n            addressData.numberBurned += 1;\n\n            // Keep track of who burned the token, and the timestamp of burning.\n            TokenOwnership storage currSlot = _ownerships[tokenId];\n            currSlot.addr = from;\n            currSlot.startTimestamp = uint64(block.timestamp);\n            currSlot.burned = true;\n\n            // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it.\n            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.\n            uint256 nextTokenId = tokenId + 1;\n            TokenOwnership storage nextSlot = _ownerships[nextTokenId];\n            if (nextSlot.addr == address(0)) {\n                // This will suffice for checking _exists(nextTokenId),\n                // as a burned slot cannot contain the zero address.\n                if (nextTokenId != _currentIndex) {\n                    nextSlot.addr = from;\n                    nextSlot.startTimestamp = prevOwnership.startTimestamp;\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     * @dev Approve `to` to operate on `tokenId`\n     *\n     * Emits a {Approval} event.\n     */\n    function _approve(address to, uint256 tokenId, address owner) private {\n        _tokenApprovals[tokenId] = to;\n        emit Approval(owner, to, tokenId);\n    }\n\n    /**\n     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract.\n     *\n     * @param from address representing the previous owner of the given token ID\n     * @param to target address that will receive the tokens\n     * @param tokenId uint256 ID of the token to be transferred\n     * @param _data bytes optional data to send along with the call\n     * @return bool 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 IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {\n            return retval == 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     * @dev Hook that is called before a set of serially-ordered token ids 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(address from, address to, uint256 startTokenId, uint256 quantity) internal virtual {}\n\n    /**\n     * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes\n     * 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(address from, address to, uint256 startTokenId, uint256 quantity) internal virtual {}\n}\n"
      },
      "@thirdweb-dev/contracts/eip/interface/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 * [EIP](https://eips.ethereum.org/EIPS/eip-165).\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     * [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 30 000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"
      },
      "@thirdweb-dev/contracts/eip/interface/IERC2981.sol": {
        "content": "// SPDX-License-Identifier: Apache 2.0\npragma solidity ^0.8.0;\n\nimport \"./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 payed in that same unit of exchange.\n     */\n    function royaltyInfo(\n        uint256 tokenId,\n        uint256 salePrice\n    ) external view returns (address receiver, uint256 royaltyAmount);\n}\n"
      },
      "@thirdweb-dev/contracts/eip/interface/IERC721.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721 {\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 (`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);\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);\n\n    /**\n     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n     * are aware of the ERC721 protocol 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 this token by either {approve} or {setApprovalForAll}.\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function safeTransferFrom(address from, address to, uint256 tokenId) external;\n\n    /**\n     * @dev Transfers `tokenId` token from `from` to `to`.\n     *\n     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} 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 by either {approve} or {setApprovalForAll}.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(address from, address to, uint256 tokenId) 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 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 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);\n\n    /**\n     * @dev Approve or remove `operator` as an operator for the caller.\n     * Operators can call {transferFrom} or {safeTransferFrom} 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 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     * @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 by either {approve} or {setApprovalForAll}.\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\n}\n"
      },
      "@thirdweb-dev/contracts/eip/interface/IERC721A.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// ERC721A Contracts v3.3.0\n// Creator: Chiru Labs\n\npragma solidity ^0.8.4;\n\nimport \"./IERC721.sol\";\nimport \"./IERC721Metadata.sol\";\n\n/**\n * @dev Interface of an ERC721A compliant contract.\n */\ninterface IERC721A is IERC721, IERC721Metadata {\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     * The caller cannot approve to their own address.\n     */\n    error ApproveToCaller();\n\n    /**\n     * The caller cannot approve to the current owner.\n     */\n    error ApprovalToCurrentOwner();\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 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    // Compiler will pack this into a single 256bit word.\n    struct TokenOwnership {\n        // The address of the owner.\n        address addr;\n        // Keeps track of the start time of ownership with minimal overhead for tokenomics.\n        uint64 startTimestamp;\n        // Whether the token has been burned.\n        bool burned;\n    }\n\n    // Compiler will pack this into a single 256bit word.\n    struct AddressData {\n        // Realistically, 2**64-1 is more than enough.\n        uint64 balance;\n        // Keeps track of mint count with minimal overhead for tokenomics.\n        uint64 numberMinted;\n        // Keeps track of burn count with minimal overhead for tokenomics.\n        uint64 numberBurned;\n        // For miscellaneous variable(s) pertaining to the address\n        // (e.g. number of whitelist mint slots used).\n        // If there are multiple variables, please pack them into a uint64.\n        uint64 aux;\n    }\n\n    /**\n     * @dev Returns the total amount of tokens stored by the contract.\n     *\n     * Burned tokens are calculated here, use `_totalMinted()` if you want to count just minted tokens.\n     */\n    function totalSupply() external view returns (uint256);\n}\n"
      },
      "@thirdweb-dev/contracts/eip/interface/IERC721Metadata.sol": {
        "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\n/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension\n/// @dev See https://eips.ethereum.org/EIPS/eip-721\n///  Note: the ERC-165 identifier for this interface is 0x5b5e139f.\n/* is ERC721 */\ninterface IERC721Metadata {\n    /// @notice A descriptive name for a collection of NFTs in this contract\n    function name() external view returns (string memory);\n\n    /// @notice An abbreviated name for NFTs in this contract\n    function symbol() external view returns (string memory);\n\n    /// @notice A distinct Uniform Resource Identifier (URI) for a given asset.\n    /// @dev Throws if `_tokenId` is not a valid NFT. URIs are defined in RFC\n    ///  3986. The URI may point to a JSON file that conforms to the \"ERC721\n    ///  Metadata JSON Schema\".\n    function tokenURI(uint256 _tokenId) external view returns (string memory);\n}\n"
      },
      "@thirdweb-dev/contracts/eip/interface/IERC721Receiver.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * from ERC721 asset contracts.\n */\ninterface IERC721Receiver {\n    /**\n     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\n     * by `operator` from `from`, this function is called.\n     *\n     * It must return its Solidity selector to confirm the token transfer.\n     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\n     *\n     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.\n     */\n    function onERC721Received(\n        address operator,\n        address from,\n        uint256 tokenId,\n        bytes calldata data\n    ) external returns (bytes4);\n}\n"
      },
      "@thirdweb-dev/contracts/eip/queryable/ERC721AQueryable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// ERC721A Contracts v3.3.0\n// Creator: Chiru Labs\n\npragma solidity ^0.8.4;\n\nimport \"./IERC721AQueryable.sol\";\nimport \"../ERC721AVirtualApprove.sol\";\n\n/**\n * @title ERC721A Queryable\n * @dev ERC721A subclass with convenience query functions.\n */\nabstract contract ERC721AQueryable is ERC721A, IERC721AQueryable {\n    /**\n     * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.\n     *\n     * If the `tokenId` is out of bounds:\n     *   - `addr` = `address(0)`\n     *   - `startTimestamp` = `0`\n     *   - `burned` = `false`\n     *\n     * If the `tokenId` is burned:\n     *   - `addr` = `<Address of owner before token was burned>`\n     *   - `startTimestamp` = `<Timestamp when token was burned>`\n     *   - `burned = `true`\n     *\n     * Otherwise:\n     *   - `addr` = `<Address of owner>`\n     *   - `startTimestamp` = `<Timestamp of start of ownership>`\n     *   - `burned = `false`\n     */\n    function explicitOwnershipOf(uint256 tokenId) public view override returns (TokenOwnership memory) {\n        TokenOwnership memory ownership;\n        if (tokenId < _startTokenId() || tokenId >= _currentIndex) {\n            return ownership;\n        }\n        ownership = _ownerships[tokenId];\n        if (ownership.burned) {\n            return ownership;\n        }\n        return _ownershipOf(tokenId);\n    }\n\n    /**\n     * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order.\n     * See {ERC721AQueryable-explicitOwnershipOf}\n     */\n    function explicitOwnershipsOf(uint256[] memory tokenIds) external view override returns (TokenOwnership[] memory) {\n        unchecked {\n            uint256 tokenIdsLength = tokenIds.length;\n            TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength);\n            for (uint256 i; i != tokenIdsLength; ++i) {\n                ownerships[i] = explicitOwnershipOf(tokenIds[i]);\n            }\n            return ownerships;\n        }\n    }\n\n    /**\n     * @dev Returns an array of token IDs owned by `owner`,\n     * in the range [`start`, `stop`)\n     * (i.e. `start <= tokenId < stop`).\n     *\n     * This function allows for tokens to be queried if the collection\n     * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}.\n     *\n     * Requirements:\n     *\n     * - `start` < `stop`\n     */\n    /* solhint-disable*/\n    function tokensOfOwnerIn(\n        address owner,\n        uint256 start,\n        uint256 stop\n    ) external view override returns (uint256[] memory) {\n        unchecked {\n            if (start >= stop) revert InvalidQueryRange();\n            uint256 tokenIdsIdx;\n            uint256 stopLimit = _currentIndex;\n            // Set `start = max(start, _startTokenId())`.\n            if (start < _startTokenId()) {\n                start = _startTokenId();\n            }\n            // Set `stop = min(stop, _currentIndex)`.\n            if (stop > stopLimit) {\n                stop = stopLimit;\n            }\n            uint256 tokenIdsMaxLength = balanceOf(owner);\n            // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`,\n            // to cater for cases where `balanceOf(owner)` is too big.\n            if (start < stop) {\n                uint256 rangeLength = stop - start;\n                if (rangeLength < tokenIdsMaxLength) {\n                    tokenIdsMaxLength = rangeLength;\n                }\n            } else {\n                tokenIdsMaxLength = 0;\n            }\n            uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength);\n            if (tokenIdsMaxLength == 0) {\n                return tokenIds;\n            }\n            // We need to call `explicitOwnershipOf(start)`,\n            // because the slot at `start` may not be initialized.\n            TokenOwnership memory ownership = explicitOwnershipOf(start);\n            address currOwnershipAddr;\n            // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`.\n            // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range.\n            if (!ownership.burned) {\n                currOwnershipAddr = ownership.addr;\n            }\n            for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) {\n                ownership = _ownerships[i];\n                if (ownership.burned) {\n                    continue;\n                }\n                if (ownership.addr != address(0)) {\n                    currOwnershipAddr = ownership.addr;\n                }\n                if (currOwnershipAddr == owner) {\n                    tokenIds[tokenIdsIdx++] = i;\n                }\n            }\n            // Downsize the array to fit.\n            assembly {\n                mstore(tokenIds, tokenIdsIdx)\n            }\n            return tokenIds;\n        }\n    }\n\n    /* solhint-enable */\n\n    /**\n     * @dev Returns an array of token IDs owned by `owner`.\n     *\n     * This function scans the ownership mapping and is O(totalSupply) in complexity.\n     * It is meant to be called off-chain.\n     *\n     * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into\n     * multiple smaller scans if the collection is large enough to cause\n     * an out-of-gas error (10K pfp collections should be fine).\n     */\n    function tokensOfOwner(address owner) external view override returns (uint256[] memory) {\n        unchecked {\n            uint256 tokenIdsIdx;\n            address currOwnershipAddr;\n            uint256 tokenIdsLength = balanceOf(owner);\n            uint256[] memory tokenIds = new uint256[](tokenIdsLength);\n            TokenOwnership memory ownership;\n            for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) {\n                ownership = _ownerships[i];\n                if (ownership.burned) {\n                    continue;\n                }\n                if (ownership.addr != address(0)) {\n                    currOwnershipAddr = ownership.addr;\n                }\n                if (currOwnershipAddr == owner) {\n                    tokenIds[tokenIdsIdx++] = i;\n                }\n            }\n            return tokenIds;\n        }\n    }\n}\n"
      },
      "@thirdweb-dev/contracts/eip/queryable/IERC721AQueryable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// ERC721A Contracts v3.3.0\n// Creator: Chiru Labs\n\npragma solidity ^0.8.4;\n\nimport \"../interface/IERC721A.sol\";\n\n/**\n * @dev Interface of an ERC721AQueryable compliant contract.\n */\ninterface IERC721AQueryable is IERC721A {\n    /**\n     * Invalid query range (`start` >= `stop`).\n     */\n    error InvalidQueryRange();\n\n    /**\n     * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.\n     *\n     * If the `tokenId` is out of bounds:\n     *   - `addr` = `address(0)`\n     *   - `startTimestamp` = `0`\n     *   - `burned` = `false`\n     *\n     * If the `tokenId` is burned:\n     *   - `addr` = `<Address of owner before token was burned>`\n     *   - `startTimestamp` = `<Timestamp when token was burned>`\n     *   - `burned = `true`\n     *\n     * Otherwise:\n     *   - `addr` = `<Address of owner>`\n     *   - `startTimestamp` = `<Timestamp of start of ownership>`\n     *   - `burned = `false`\n     */\n    function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory);\n\n    /**\n     * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order.\n     * See {ERC721AQueryable-explicitOwnershipOf}\n     */\n    function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory);\n\n    /**\n     * @dev Returns an array of token IDs owned by `owner`,\n     * in the range [`start`, `stop`)\n     * (i.e. `start <= tokenId < stop`).\n     *\n     * This function allows for tokens to be queried if the collection\n     * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}.\n     *\n     * Requirements:\n     *\n     * - `start` < `stop`\n     */\n    function tokensOfOwnerIn(address owner, uint256 start, uint256 stop) external view returns (uint256[] memory);\n\n    /**\n     * @dev Returns an array of token IDs owned by `owner`.\n     *\n     * This function scans the ownership mapping and is O(totalSupply) in complexity.\n     * It is meant to be called off-chain.\n     *\n     * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into\n     * multiple smaller scans if the collection is large enough to cause\n     * an out-of-gas error (10K pfp collections should be fine).\n     */\n    function tokensOfOwner(address owner) external view returns (uint256[] memory);\n}\n"
      },
      "@thirdweb-dev/contracts/extension/BatchMintMetadata.sol": {
        "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\n/// @author thirdweb\n\n/**\n *  @title   Batch-mint Metadata\n *  @notice  The `BatchMintMetadata` is a contract extension for any base NFT contract. It lets the smart contract\n *           using this extension set metadata for `n` number of NFTs all at once. This is enabled by storing a single\n *           base URI for a batch of `n` NFTs, where the metadata for each NFT in a relevant batch is `baseURI/tokenId`.\n */\n\ncontract BatchMintMetadata {\n    /// @dev Largest tokenId of each batch of tokens with the same baseURI + 1 {ex: batchId 100 at position 0 includes tokens 0-99}\n    uint256[] private batchIds;\n\n    /// @dev Mapping from id of a batch of tokens => to base URI for the respective batch of tokens.\n    mapping(uint256 => string) private baseURI;\n\n    /// @dev Mapping from id of a batch of tokens => to whether the base URI for the respective batch of tokens is frozen.\n    mapping(uint256 => bool) public batchFrozen;\n\n    /// @dev This event emits when the metadata of all tokens are frozen.\n    /// While not currently supported by marketplaces, this event allows\n    /// future indexing if desired.\n    event MetadataFrozen();\n\n    // @dev This event emits when the metadata of a range of tokens is updated.\n    /// So that the third-party platforms such as NFT market could\n    /// timely update the images and related attributes of the NFTs.\n    event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId);\n\n    /**\n     *  @notice         Returns the count of batches of NFTs.\n     *  @dev            Each batch of tokens has an in ID and an associated `baseURI`.\n     *                  See {batchIds}.\n     */\n    function getBaseURICount() public view returns (uint256) {\n        return batchIds.length;\n    }\n\n    /**\n     *  @notice         Returns the ID for the batch of tokens at the given index.\n     *  @dev            See {getBaseURICount}.\n     *  @param _index   Index of the desired batch in batchIds array.\n     */\n    function getBatchIdAtIndex(uint256 _index) public view returns (uint256) {\n        if (_index >= getBaseURICount()) {\n            revert(\"Invalid index\");\n        }\n        return batchIds[_index];\n    }\n\n    /// @dev Returns the id for the batch of tokens the given tokenId belongs to.\n    function _getBatchId(uint256 _tokenId) internal view returns (uint256 batchId, uint256 index) {\n        uint256 numOfTokenBatches = getBaseURICount();\n        uint256[] memory indices = batchIds;\n\n        for (uint256 i = 0; i < numOfTokenBatches; i += 1) {\n            if (_tokenId < indices[i]) {\n                index = i;\n                batchId = indices[i];\n\n                return (batchId, index);\n            }\n        }\n\n        revert(\"Invalid tokenId\");\n    }\n\n    /// @dev Returns the baseURI for a token. The intended metadata URI for the token is baseURI + tokenId.\n    function _getBaseURI(uint256 _tokenId) internal view returns (string memory) {\n        uint256 numOfTokenBatches = getBaseURICount();\n        uint256[] memory indices = batchIds;\n\n        for (uint256 i = 0; i < numOfTokenBatches; i += 1) {\n            if (_tokenId < indices[i]) {\n                return baseURI[indices[i]];\n            }\n        }\n        revert(\"Invalid tokenId\");\n    }\n\n    /// @dev returns the starting tokenId of a given batchId.\n    function _getBatchStartId(uint256 _batchID) internal view returns (uint256) {\n        uint256 numOfTokenBatches = getBaseURICount();\n        uint256[] memory indices = batchIds;\n\n        for (uint256 i = 0; i < numOfTokenBatches; i++) {\n            if (_batchID == indices[i]) {\n                if (i > 0) {\n                    return indices[i - 1];\n                }\n                return 0;\n            }\n        }\n        revert(\"Invalid batchId\");\n    }\n\n    /// @dev Sets the base URI for the batch of tokens with the given batchId.\n    function _setBaseURI(uint256 _batchId, string memory _baseURI) internal {\n        require(!batchFrozen[_batchId], \"Batch frozen\");\n        baseURI[_batchId] = _baseURI;\n        emit BatchMetadataUpdate(_getBatchStartId(_batchId), _batchId);\n    }\n\n    /// @dev Freezes the base URI for the batch of tokens with the given batchId.\n    function _freezeBaseURI(uint256 _batchId) internal {\n        string memory baseURIForBatch = baseURI[_batchId];\n        require(bytes(baseURIForBatch).length > 0, \"Invalid batch\");\n        batchFrozen[_batchId] = true;\n        emit MetadataFrozen();\n    }\n\n    /// @dev Mints a batch of tokenIds and associates a common baseURI to all those Ids.\n    function _batchMintMetadata(\n        uint256 _startId,\n        uint256 _amountToMint,\n        string memory _baseURIForTokens\n    ) internal returns (uint256 nextTokenIdToMint, uint256 batchId) {\n        batchId = _startId + _amountToMint;\n        nextTokenIdToMint = batchId;\n\n        batchIds.push(batchId);\n\n        baseURI[batchId] = _baseURIForTokens;\n    }\n}\n"
      },
      "@thirdweb-dev/contracts/extension/ContractMetadata.sol": {
        "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\n/// @author thirdweb\n\nimport \"./interface/IContractMetadata.sol\";\n\n/**\n *  @title   Contract Metadata\n *  @notice  Thirdweb's `ContractMetadata` is a contract extension for any base contracts. It lets you set a metadata URI\n *           for you contract.\n *           Additionally, `ContractMetadata` is necessary for NFT contracts that want royalties to get distributed on OpenSea.\n */\n\nabstract contract ContractMetadata is IContractMetadata {\n    /// @notice Returns the contract metadata URI.\n    string public override contractURI;\n\n    /**\n     *  @notice         Lets a contract admin set the URI for contract-level metadata.\n     *  @dev            Caller should be authorized to setup contractURI, e.g. contract admin.\n     *                  See {_canSetContractURI}.\n     *                  Emits {ContractURIUpdated Event}.\n     *\n     *  @param _uri     keccak256 hash of the role. e.g. keccak256(\"TRANSFER_ROLE\")\n     */\n    function setContractURI(string memory _uri) external override {\n        if (!_canSetContractURI()) {\n            revert(\"Not authorized\");\n        }\n\n        _setupContractURI(_uri);\n    }\n\n    /// @dev Lets a contract admin set the URI for contract-level metadata.\n    function _setupContractURI(string memory _uri) internal {\n        string memory prevURI = contractURI;\n        contractURI = _uri;\n\n        emit ContractURIUpdated(prevURI, _uri);\n    }\n\n    /// @dev Returns whether contract metadata can be set in the given execution context.\n    function _canSetContractURI() internal view virtual returns (bool);\n}\n"
      },
      "@thirdweb-dev/contracts/extension/Multicall.sol": {
        "content": "// SPDX-License-Identifier: Apache 2.0\npragma solidity ^0.8.0;\n\n/// @author thirdweb\n\nimport \"../lib/Address.sol\";\nimport \"./interface/IMulticall.sol\";\n\n/**\n * @dev Provides a function to batch together multiple calls in a single external call.\n *\n * _Available since v4.1._\n */\ncontract Multicall is IMulticall {\n    /**\n     *  @notice Receives and executes a batch of function calls on this contract.\n     *  @dev Receives and executes a batch of function calls on this contract.\n     *\n     *  @param data The bytes data that makes up the batch of function calls to execute.\n     *  @return results The bytes data that makes up the result of the batch of function calls executed.\n     */\n    function multicall(bytes[] calldata data) external returns (bytes[] memory results) {\n        results = new bytes[](data.length);\n        address sender = _msgSender();\n        bool isForwarder = msg.sender != sender;\n        for (uint256 i = 0; i < data.length; i++) {\n            if (isForwarder) {\n                results[i] = Address.functionDelegateCall(address(this), abi.encodePacked(data[i], sender));\n            } else {\n                results[i] = Address.functionDelegateCall(address(this), data[i]);\n            }\n        }\n        return results;\n    }\n\n    /// @notice Returns the sender in the given execution context.\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n}\n"
      },
      "@thirdweb-dev/contracts/extension/Ownable.sol": {
        "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\n/// @author thirdweb\n\nimport \"./interface/IOwnable.sol\";\n\n/**\n *  @title   Ownable\n *  @notice  Thirdweb's `Ownable` is a contract extension to be used with any base contract. It exposes functions for setting and reading\n *           who the 'owner' of the inheriting smart contract is, and lets the inheriting contract perform conditional logic that uses\n *           information about who the contract's owner is.\n */\n\nabstract contract Ownable is IOwnable {\n    /// @dev Owner of the contract (purpose: OpenSea compatibility)\n    address private _owner;\n\n    /// @dev Reverts if caller is not the owner.\n    modifier onlyOwner() {\n        if (msg.sender != _owner) {\n            revert(\"Not authorized\");\n        }\n        _;\n    }\n\n    /**\n     *  @notice Returns the owner of the contract.\n     */\n    function owner() public view override returns (address) {\n        return _owner;\n    }\n\n    /**\n     *  @notice Lets an authorized wallet set a new owner for the contract.\n     *  @param _newOwner The address to set as the new owner of the contract.\n     */\n    function setOwner(address _newOwner) external override {\n        if (!_canSetOwner()) {\n            revert(\"Not authorized\");\n        }\n        _setupOwner(_newOwner);\n    }\n\n    /// @dev Lets a contract admin set a new owner for the contract. The new owner must be a contract admin.\n    function _setupOwner(address _newOwner) internal {\n        address _prevOwner = _owner;\n        _owner = _newOwner;\n\n        emit OwnerUpdated(_prevOwner, _newOwner);\n    }\n\n    /// @dev Returns whether owner can be set in the given execution context.\n    function _canSetOwner() internal view virtual returns (bool);\n}\n"
      },
      "@thirdweb-dev/contracts/extension/Royalty.sol": {
        "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\n/// @author thirdweb\n\nimport \"./interface/IRoyalty.sol\";\n\n/**\n *  @title   Royalty\n *  @notice  Thirdweb's `Royalty` is a contract extension to be used with any base contract. It exposes functions for setting and reading\n *           the recipient of royalty fee and the royalty fee basis points, and lets the inheriting contract perform conditional logic\n *           that uses information about royalty fees, if desired.\n *\n *  @dev     The `Royalty` contract is ERC2981 compliant.\n */\n\nabstract contract Royalty is IRoyalty {\n    /// @dev The (default) address that receives all royalty value.\n    address private royaltyRecipient;\n\n    /// @dev The (default) % of a sale to take as royalty (in basis points).\n    uint16 private royaltyBps;\n\n    /// @dev Token ID => royalty recipient and bps for token\n    mapping(uint256 => RoyaltyInfo) private royaltyInfoForToken;\n\n    /**\n     *  @notice   View royalty info for a given token and sale price.\n     *  @dev      Returns royalty amount and recipient for `tokenId` and `salePrice`.\n     *  @param tokenId          The tokenID of the NFT for which to query royalty info.\n     *  @param salePrice        Sale price of the token.\n     *\n     *  @return receiver        Address of royalty recipient account.\n     *  @return royaltyAmount   Royalty amount calculated at current royaltyBps value.\n     */\n    function royaltyInfo(\n        uint256 tokenId,\n        uint256 salePrice\n    ) external view virtual override returns (address receiver, uint256 royaltyAmount) {\n        (address recipient, uint256 bps) = getRoyaltyInfoForToken(tokenId);\n        receiver = recipient;\n        royaltyAmount = (salePrice * bps) / 10_000;\n    }\n\n    /**\n     *  @notice          View royalty info for a given token.\n     *  @dev             Returns royalty recipient and bps for `_tokenId`.\n     *  @param _tokenId  The tokenID of the NFT for which to query royalty info.\n     */\n    function getRoyaltyInfoForToken(uint256 _tokenId) public view override returns (address, uint16) {\n        RoyaltyInfo memory royaltyForToken = royaltyInfoForToken[_tokenId];\n\n        return\n            royaltyForToken.recipient == address(0)\n                ? (royaltyRecipient, uint16(royaltyBps))\n                : (royaltyForToken.recipient, uint16(royaltyForToken.bps));\n    }\n\n    /**\n     *  @notice Returns the defualt royalty recipient and BPS for this contract's NFTs.\n     */\n    function getDefaultRoyaltyInfo() external view override returns (address, uint16) {\n        return (royaltyRecipient, uint16(royaltyBps));\n    }\n\n    /**\n     *  @notice         Updates default royalty recipient and bps.\n     *  @dev            Caller should be authorized to set royalty info.\n     *                  See {_canSetRoyaltyInfo}.\n     *                  Emits {DefaultRoyalty Event}; See {_setupDefaultRoyaltyInfo}.\n     *\n     *  @param _royaltyRecipient   Address to be set as default royalty recipient.\n     *  @param _royaltyBps         Updated royalty bps.\n     */\n    function setDefaultRoyaltyInfo(address _royaltyRecipient, uint256 _royaltyBps) external override {\n        if (!_canSetRoyaltyInfo()) {\n            revert(\"Not authorized\");\n        }\n\n        _setupDefaultRoyaltyInfo(_royaltyRecipient, _royaltyBps);\n    }\n\n    /// @dev Lets a contract admin update the default royalty recipient and bps.\n    function _setupDefaultRoyaltyInfo(address _royaltyRecipient, uint256 _royaltyBps) internal {\n        if (_royaltyBps > 10_000) {\n            revert(\"Exceeds max bps\");\n        }\n\n        royaltyRecipient = _royaltyRecipient;\n        royaltyBps = uint16(_royaltyBps);\n\n        emit DefaultRoyalty(_royaltyRecipient, _royaltyBps);\n    }\n\n    /**\n     *  @notice         Updates default royalty recipient and bps for a particular token.\n     *  @dev            Sets royalty info for `_tokenId`. Caller should be authorized to set royalty info.\n     *                  See {_canSetRoyaltyInfo}.\n     *                  Emits {RoyaltyForToken Event}; See {_setupRoyaltyInfoForToken}.\n     *\n     *  @param _recipient   Address to be set as royalty recipient for given token Id.\n     *  @param _bps         Updated royalty bps for the token Id.\n     */\n    function setRoyaltyInfoForToken(uint256 _tokenId, address _recipient, uint256 _bps) external override {\n        if (!_canSetRoyaltyInfo()) {\n            revert(\"Not authorized\");\n        }\n\n        _setupRoyaltyInfoForToken(_tokenId, _recipient, _bps);\n    }\n\n    /// @dev Lets a contract admin set the royalty recipient and bps for a particular token Id.\n    function _setupRoyaltyInfoForToken(uint256 _tokenId, address _recipient, uint256 _bps) internal {\n        if (_bps > 10_000) {\n            revert(\"Exceeds max bps\");\n        }\n\n        royaltyInfoForToken[_tokenId] = RoyaltyInfo({ recipient: _recipient, bps: _bps });\n\n        emit RoyaltyForToken(_tokenId, _recipient, _bps);\n    }\n\n    /// @dev Returns whether royalty info can be set in the given execution context.\n    function _canSetRoyaltyInfo() internal view virtual returns (bool);\n}\n"
      },
      "@thirdweb-dev/contracts/extension/interface/IContractMetadata.sol": {
        "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\n/// @author thirdweb\n\n/**\n *  Thirdweb's `ContractMetadata` is a contract extension for any base contracts. It lets you set a metadata URI\n *  for you contract.\n *\n *  Additionally, `ContractMetadata` is necessary for NFT contracts that want royalties to get distributed on OpenSea.\n */\n\ninterface IContractMetadata {\n    /// @dev Returns the metadata URI of the contract.\n    function contractURI() external view returns (string memory);\n\n    /**\n     *  @dev Sets contract URI for the storefront-level metadata of the contract.\n     *       Only module admin can call this function.\n     */\n    function setContractURI(string calldata _uri) external;\n\n    /// @dev Emitted when the contract URI is updated.\n    event ContractURIUpdated(string prevURI, string newURI);\n}\n"
      },
      "@thirdweb-dev/contracts/extension/interface/IMulticall.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @author thirdweb\n\n/**\n * @dev Provides a function to batch together multiple calls in a single external call.\n *\n * _Available since v4.1._\n */\ninterface IMulticall {\n    /**\n     * @dev Receives and executes a batch of function calls on this contract.\n     */\n    function multicall(bytes[] calldata data) external returns (bytes[] memory results);\n}\n"
      },
      "@thirdweb-dev/contracts/extension/interface/IOwnable.sol": {
        "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\n/// @author thirdweb\n\n/**\n *  Thirdweb's `Ownable` is a contract extension to be used with any base contract. It exposes functions for setting and reading\n *  who the 'owner' of the inheriting smart contract is, and lets the inheriting contract perform conditional logic that uses\n *  information about who the contract's owner is.\n */\n\ninterface IOwnable {\n    /// @dev Returns the owner of the contract.\n    function owner() external view returns (address);\n\n    /// @dev Lets a module admin set a new owner for the contract. The new owner must be a module admin.\n    function setOwner(address _newOwner) external;\n\n    /// @dev Emitted when a new Owner is set.\n    event OwnerUpdated(address indexed prevOwner, address indexed newOwner);\n}\n"
      },
      "@thirdweb-dev/contracts/extension/interface/IRoyalty.sol": {
        "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\n/// @author thirdweb\n\nimport \"../../eip/interface/IERC2981.sol\";\n\n/**\n *  Thirdweb's `Royalty` is a contract extension to be used with any base contract. It exposes functions for setting and reading\n *  the recipient of royalty fee and the royalty fee basis points, and lets the inheriting contract perform conditional logic\n *  that uses information about royalty fees, if desired.\n *\n *  The `Royalty` contract is ERC2981 compliant.\n */\n\ninterface IRoyalty is IERC2981 {\n    struct RoyaltyInfo {\n        address recipient;\n        uint256 bps;\n    }\n\n    /// @dev Returns the royalty recipient and fee bps.\n    function getDefaultRoyaltyInfo() external view returns (address, uint16);\n\n    /// @dev Lets a module admin update the royalty bps and recipient.\n    function setDefaultRoyaltyInfo(address _royaltyRecipient, uint256 _royaltyBps) external;\n\n    /// @dev Lets a module admin set the royalty recipient for a particular token Id.\n    function setRoyaltyInfoForToken(uint256 tokenId, address recipient, uint256 bps) external;\n\n    /// @dev Returns the royalty recipient for a particular token Id.\n    function getRoyaltyInfoForToken(uint256 tokenId) external view returns (address, uint16);\n\n    /// @dev Emitted when royalty info is updated.\n    event DefaultRoyalty(address indexed newRoyaltyRecipient, uint256 newRoyaltyBps);\n\n    /// @dev Emitted when royalty recipient for tokenId is set\n    event RoyaltyForToken(uint256 indexed tokenId, address indexed royaltyRecipient, uint256 royaltyBps);\n}\n"
      },
      "@thirdweb-dev/contracts/external-deps/openzeppelin/utils/Context.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n}\n"
      },
      "@thirdweb-dev/contracts/lib/Address.sol": {
        "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.1;\n\n/// @author thirdweb, OpenZeppelin Contracts (v4.9.0)\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\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     * Furthermore, `isContract` will also return true if the target contract within\n     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n     * which only has an effect at the end of a transaction.\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.8.0/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(address target, bytes memory data, uint256 value) 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 Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a delegate call.\n     *\n     * _Available since v3.4._\n     */\n    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a delegate call.\n     *\n     * _Available since v3.4._\n     */\n    function functionDelegateCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        (bool success, bytes memory returndata) = target.delegatecall(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"
      },
      "@thirdweb-dev/contracts/lib/Strings.sol": {
        "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\n/// @author thirdweb\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n    bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n     */\n    function toString(uint256 value) internal pure returns (string memory) {\n        // Inspired by OraclizeAPI's implementation - MIT licence\n        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n        if (value == 0) {\n            return \"0\";\n        }\n        uint256 temp = value;\n        uint256 digits;\n        while (temp != 0) {\n            digits++;\n            temp /= 10;\n        }\n        bytes memory buffer = new bytes(digits);\n        while (value != 0) {\n            digits -= 1;\n            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n            value /= 10;\n        }\n        return string(buffer);\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n     */\n    function toHexString(uint256 value) internal pure returns (string memory) {\n        if (value == 0) {\n            return \"0x00\";\n        }\n        uint256 temp = value;\n        uint256 length = 0;\n        while (temp != 0) {\n            length++;\n            temp >>= 8;\n        }\n        return toHexString(value, length);\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n     */\n    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n        bytes memory buffer = new bytes(2 * length + 2);\n        buffer[0] = \"0\";\n        buffer[1] = \"x\";\n        for (uint256 i = 2 * length + 1; i > 1; --i) {\n            buffer[i] = _HEX_SYMBOLS[value & 0xf];\n            value >>= 4;\n        }\n        require(value == 0, \"Strings: hex length insufficient\");\n        return string(buffer);\n    }\n\n    /// @dev Returns the hexadecimal representation of `value`.\n    /// The output is prefixed with \"0x\", encoded using 2 hexadecimal digits per byte,\n    /// and the alphabets are capitalized conditionally according to\n    /// https://eips.ethereum.org/EIPS/eip-55\n    function toHexStringChecksummed(address value) internal pure returns (string memory str) {\n        str = toHexString(value);\n        /// @solidity memory-safe-assembly\n        assembly {\n            let mask := shl(6, div(not(0), 255)) // `0b010000000100000000 ...`\n            let o := add(str, 0x22)\n            let hashed := and(keccak256(o, 40), mul(34, mask)) // `0b10001000 ... `\n            let t := shl(240, 136) // `0b10001000 << 240`\n            for {\n                let i := 0\n            } 1 {\n\n            } {\n                mstore(add(i, i), mul(t, byte(i, hashed)))\n                i := add(i, 1)\n                if eq(i, 20) {\n                    break\n                }\n            }\n            mstore(o, xor(mload(o), shr(1, and(mload(0x00), and(mload(o), mask)))))\n            o := add(o, 0x20)\n            mstore(o, xor(mload(o), shr(1, and(mload(0x20), and(mload(o), mask)))))\n        }\n    }\n\n    /// @dev Returns the hexadecimal representation of `value`.\n    /// The output is prefixed with \"0x\" and encoded using 2 hexadecimal digits per byte.\n    function toHexString(address value) internal pure returns (string memory str) {\n        str = toHexStringNoPrefix(value);\n        /// @solidity memory-safe-assembly\n        assembly {\n            let strLength := add(mload(str), 2) // Compute the length.\n            mstore(str, 0x3078) // Write the \"0x\" prefix.\n            str := sub(str, 2) // Move the pointer.\n            mstore(str, strLength) // Write the length.\n        }\n    }\n\n    /// @dev Returns the hexadecimal representation of `value`.\n    /// The output is encoded using 2 hexadecimal digits per byte.\n    function toHexStringNoPrefix(address value) internal pure returns (string memory str) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            str := mload(0x40)\n\n            // Allocate the memory.\n            // We need 0x20 bytes for the trailing zeros padding, 0x20 bytes for the length,\n            // 0x02 bytes for the prefix, and 0x28 bytes for the digits.\n            // The next multiple of 0x20 above (0x20 + 0x20 + 0x02 + 0x28) is 0x80.\n            mstore(0x40, add(str, 0x80))\n\n            // Store \"0123456789abcdef\" in scratch space.\n            mstore(0x0f, 0x30313233343536373839616263646566)\n\n            str := add(str, 2)\n            mstore(str, 40)\n\n            let o := add(str, 0x20)\n            mstore(add(o, 40), 0)\n\n            value := shl(96, value)\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            for {\n                let i := 0\n            } 1 {\n\n            } {\n                let p := add(o, add(i, i))\n                let temp := byte(i, value)\n                mstore8(add(p, 1), mload(and(temp, 15)))\n                mstore8(p, mload(shr(4, temp)))\n                i := add(i, 1)\n                if eq(i, 20) {\n                    break\n                }\n            }\n        }\n    }\n\n    /// @dev Returns the hex encoded string from the raw bytes.\n    /// The output is encoded using 2 hexadecimal digits per byte.\n    function toHexString(bytes memory raw) internal pure returns (string memory str) {\n        str = toHexStringNoPrefix(raw);\n        /// @solidity memory-safe-assembly\n        assembly {\n            let strLength := add(mload(str), 2) // Compute the length.\n            mstore(str, 0x3078) // Write the \"0x\" prefix.\n            str := sub(str, 2) // Move the pointer.\n            mstore(str, strLength) // Write the length.\n        }\n    }\n\n    /// @dev Returns the hex encoded string from the raw bytes.\n    /// The output is encoded using 2 hexadecimal digits per byte.\n    function toHexStringNoPrefix(bytes memory raw) internal pure returns (string memory str) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            let length := mload(raw)\n            str := add(mload(0x40), 2) // Skip 2 bytes for the optional prefix.\n            mstore(str, add(length, length)) // Store the length of the output.\n\n            // Store \"0123456789abcdef\" in scratch space.\n            mstore(0x0f, 0x30313233343536373839616263646566)\n\n            let o := add(str, 0x20)\n            let end := add(raw, length)\n\n            for {\n\n            } iszero(eq(raw, end)) {\n\n            } {\n                raw := add(raw, 1)\n                mstore8(add(o, 1), mload(and(mload(raw), 15)))\n                mstore8(o, mload(and(shr(4, mload(raw)), 15)))\n                o := add(o, 2)\n            }\n            mstore(o, 0) // Zeroize the slot after the string.\n            mstore(0x40, add(o, 0x20)) // Allocate the memory.\n        }\n    }\n}\n"
      },
      "contracts/ERC721Base.sol": {
        "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\n/// @author thirdweb\n\nimport \"@thirdweb-dev/contracts/eip/queryable/ERC721AQueryable.sol\";\n\nimport \"@thirdweb-dev/contracts/extension/ContractMetadata.sol\";\nimport \"@thirdweb-dev/contracts/extension/Multicall.sol\";\nimport \"@thirdweb-dev/contracts/extension/Ownable.sol\";\nimport \"@thirdweb-dev/contracts/extension/Royalty.sol\";\nimport \"@thirdweb-dev/contracts/extension/BatchMintMetadata.sol\";\n\nimport \"@thirdweb-dev/contracts/lib/Strings.sol\";\n\n/**\n *  The `ERC721Base` smart contract implements the ERC721 NFT standard, along with the ERC721A optimization to the standard.\n *  It includes the following additions to standard ERC721 logic:\n *\n *      - Ability to mint NFTs via the provided `mint` function.\n *\n *      - Contract metadata for royalty support on platforms such as OpenSea that use\n *        off-chain information to distribute roaylties.\n *\n *      - Ownership of the contract, with the ability to restrict certain functions to\n *        only be called by the contract's owner.\n *\n *      - Multicall capability to perform multiple actions atomically\n *\n *      - EIP 2981 compliance for royalty support on NFT marketplaces.\n */\n\ncontract ERC721Base is ERC721AQueryable, ContractMetadata, Multicall, Ownable, Royalty, BatchMintMetadata {\n    using Strings for uint256;\n\n    /*//////////////////////////////////////////////////////////////\n                            Mappings\n    //////////////////////////////////////////////////////////////*/\n\n    mapping(uint256 => string) private fullURI;\n\n    /*//////////////////////////////////////////////////////////////\n                            Constructor\n    //////////////////////////////////////////////////////////////*/\n\n    /**\n     * @notice Initializes the contract during construction.\n     *\n     * @param _defaultAdmin     The default admin of the contract.\n     * @param _name             The name of the contract.\n     * @param _symbol           The symbol of the contract.\n     * @param _royaltyRecipient The address to receive royalties.\n     * @param _royaltyBps       The royalty basis points to be charged. Max = 10000 (10000 = 100%, 1000 = 10%)\n     */\n    constructor(\n        address _defaultAdmin,\n        string memory _name,\n        string memory _symbol,\n        address _royaltyRecipient,\n        uint128 _royaltyBps\n    ) ERC721A(_name, _symbol) {\n        _setupOwner(_defaultAdmin);\n        _setupDefaultRoyaltyInfo(_royaltyRecipient, _royaltyBps);\n    }\n\n    /*//////////////////////////////////////////////////////////////\n                            ERC165 Logic\n    //////////////////////////////////////////////////////////////*/\n\n    /**\n     * @dev See ERC165: https://eips.ethereum.org/EIPS/eip-165\n     * @inheritdoc IERC165\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, IERC165) returns (bool) {\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            interfaceId == type(IERC2981).interfaceId; // ERC165 ID for ERC2981\n    }\n\n    /*//////////////////////////////////////////////////////////////\n                        Overriden ERC721 logic\n    //////////////////////////////////////////////////////////////*/\n\n    /**\n     *  @notice         Returns the metadata URI for an NFT.\n     *  @dev            See `BatchMintMetadata` for handling of metadata in this contract.\n     *\n     *  @param _tokenId The tokenId of an NFT.\n     */\n    function tokenURI(uint256 _tokenId) public view virtual override(ERC721A, IERC721Metadata) returns (string memory) {\n        string memory fullUriForToken = fullURI[_tokenId];\n        if (bytes(fullUriForToken).length > 0) {\n            return fullUriForToken;\n        }\n\n        string memory batchUri = _getBaseURI(_tokenId);\n        return string(abi.encodePacked(batchUri, _tokenId.toString()));\n    }\n\n    /*//////////////////////////////////////////////////////////////\n                            Minting logic\n    //////////////////////////////////////////////////////////////*/\n\n    /**\n     *  @notice          Lets an authorized address mint an NFT to a recipient.\n     *  @dev             The logic in the `_canMint` function determines whether the caller is authorized to mint NFTs.\n     *\n     *  @param _to       The recipient of the NFT to mint.\n     *  @param _tokenURI The full metadata URI for the NFT minted.\n     */\n    function mintTo(address _to, string memory _tokenURI) public virtual {\n        _setTokenURI(nextTokenIdToMint(), _tokenURI);\n        _safeMint(_to, 1, \"\");\n    }\n\n    /**\n     *  @notice          Lets an authorized address mint multiple NFTs at once to a recipient.\n     *  @dev             The logic in the `_canMint` function determines whether the caller is authorized to mint NFTs.\n     *\n     *  @param _to       The recipient of the NFT to mint.\n     *  @param _quantity The number of NFTs to mint.\n     *  @param _baseURI  The baseURI for the `n` number of NFTs minted. The metadata for each NFT is `baseURI/tokenId`\n     *  @param _data     Additional data to pass along during the minting of the NFT.\n     */\n    function batchMintTo(address _to, uint256 _quantity, string memory _baseURI, bytes memory _data) public virtual {\n        _batchMintMetadata(nextTokenIdToMint(), _quantity, _baseURI);\n        _safeMint(_to, _quantity, _data);\n    }\n\n    /**\n     *  @notice         Lets an owner or approved operator burn the NFT of the given tokenId.\n     *  @dev            ERC721A's `_burn(uint256,bool)` internally checks for token approvals.\n     *\n     *  @param _tokenId The tokenId of the NFT to burn.\n     */\n    function burn(uint256 _tokenId) external virtual {\n        _burn(_tokenId, true);\n    }\n\n    /*//////////////////////////////////////////////////////////////\n                        Public getters\n    //////////////////////////////////////////////////////////////*/\n\n    /// @notice The tokenId assigned to the next new NFT to be minted.\n    function nextTokenIdToMint() public view virtual returns (uint256) {\n        return _currentIndex;\n    }\n\n    /**\n     * @notice Returns whether a given address is the owner, or approved to transfer an NFT.\n     *\n     * @param _operator The address to check.\n     * @param _tokenId  The tokenId of the NFT to check.\n     *\n     * @return isApprovedOrOwnerOf Whether the given address is approved to transfer the given NFT.\n     */\n    function isApprovedOrOwner(\n        address _operator,\n        uint256 _tokenId\n    ) public view virtual returns (bool isApprovedOrOwnerOf) {\n        address owner = ownerOf(_tokenId);\n        isApprovedOrOwnerOf = (_operator == owner ||\n            isApprovedForAll(owner, _operator) ||\n            getApproved(_tokenId) == _operator);\n    }\n\n    /*//////////////////////////////////////////////////////////////\n                        Internal (overrideable) functions\n    //////////////////////////////////////////////////////////////*/\n\n    /**\n     * @notice Sets the metadata URI for a given tokenId.\n     *\n     * @param _tokenId  The tokenId of the NFT to set the URI for.\n     * @param _tokenURI The URI to set for the given tokenId.\n     */\n    function _setTokenURI(uint256 _tokenId, string memory _tokenURI) internal virtual {\n        require(bytes(fullURI[_tokenId]).length == 0, \"URI already set\");\n        fullURI[_tokenId] = _tokenURI;\n    }\n\n    /// @dev Returns whether contract metadata can be set in the given execution context.\n    function _canSetContractURI() internal view virtual override returns (bool) {\n        return msg.sender == owner();\n    }\n\n    /// @dev Returns whether a token can be minted in the given execution context.\n    function _canMint() internal view virtual returns (bool) {\n        return msg.sender == owner();\n    }\n\n    /// @dev Returns whether owner can be set in the given execution context.\n    function _canSetOwner() internal view virtual override returns (bool) {\n        return msg.sender == owner();\n    }\n\n    /// @dev Returns whether royalty info can be set in the given execution context.\n    function _canSetRoyaltyInfo() internal view virtual override returns (bool) {\n        return msg.sender == owner();\n    }\n\n    /// @notice Returns the sender in the given execution context.\n    function _msgSender() internal view override(Multicall, Context) returns (address) {\n        return msg.sender;\n    }\n}\n"
      },
      "contracts/ERC721OpenMint.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./ERC721Base.sol\";\n\ncontract ERC721OpenMint is ERC721Base {\n\n      constructor(\n        address _defaultAdmin,\n        string memory _name,\n        string memory _symbol,\n        address _royaltyRecipient,\n        uint128 _royaltyBps\n    )\n        ERC721Base(\n            _defaultAdmin,\n            _name,\n            _symbol,\n            _royaltyRecipient,\n            _royaltyBps\n        )\n    {}\n}\n"
      }
    },
    "settings": {
      "optimizer": {
        "enabled": true,
        "runs": 200
      },
      "evmVersion": "london",
      "remappings": [],
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      }
    }
  }}