creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "@openzeppelin/contracts/interfaces/IERC2981.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC2981.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"../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 */\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(\n        uint256 tokenId,\n        uint256 salePrice\n    ) external view returns (address receiver, uint256 royaltyAmount);\n}\n"
      },
      "@openzeppelin/contracts/token/ERC721/IERC721.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721 is IERC165 {\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 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     *\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\n     *   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    /**\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 have been allowed to move this token by either {approve} or\n     *   {setApprovalForAll}.\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon\n     *   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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\n     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\n     * understand this adds an external call which potentially creates a reentrancy vulnerability.\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 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 address zero.\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"
      },
      "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol)\n\npragma solidity ^0.8.20;\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\n     * reverted.\n     *\n     * The selector can be obtained in Solidity with `IERC721Receiver.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"
      },
      "@openzeppelin/contracts/utils/Address.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n    /**\n     * @dev The ETH balance of the account is not enough to perform the operation.\n     */\n    error AddressInsufficientBalance(address account);\n\n    /**\n     * @dev There's no code at `target` (it is not a contract).\n     */\n    error AddressEmptyCode(address target);\n\n    /**\n     * @dev A call to an address target failed. The target may have reverted.\n     */\n    error FailedInnerCall();\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.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        if (address(this).balance < amount) {\n            revert AddressInsufficientBalance(address(this));\n        }\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        if (!success) {\n            revert FailedInnerCall();\n        }\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 or custom error, it is bubbled\n     * up by this function (like regular Solidity function calls). However, if\n     * the call reverted with no returned reason, this function reverts with a\n     * {FailedInnerCall} error.\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    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0);\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    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n        if (address(this).balance < value) {\n            revert AddressInsufficientBalance(address(this));\n        }\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResultFromTarget(target, success, returndata);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a static call.\n     */\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResultFromTarget(target, success, returndata);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a delegate call.\n     */\n    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n        (bool success, bytes memory returndata) = target.delegatecall(data);\n        return verifyCallResultFromTarget(target, success, returndata);\n    }\n\n    /**\n     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target\n     * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an\n     * unsuccessful call.\n     */\n    function verifyCallResultFromTarget(\n        address target,\n        bool success,\n        bytes memory returndata\n    ) internal view returns (bytes memory) {\n        if (!success) {\n            _revert(returndata);\n        } else {\n            // only check if target is a contract if the call was successful and the return data is empty\n            // otherwise we already know that it was a contract\n            if (returndata.length == 0 && target.code.length == 0) {\n                revert AddressEmptyCode(target);\n            }\n            return returndata;\n        }\n    }\n\n    /**\n     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the\n     * revert reason or with a default {FailedInnerCall} error.\n     */\n    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {\n        if (!success) {\n            _revert(returndata);\n        } else {\n            return returndata;\n        }\n    }\n\n    /**\n     * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.\n     */\n    function _revert(bytes memory returndata) 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 FailedInnerCall();\n        }\n    }\n}\n"
      },
      "@openzeppelin/contracts/utils/Context.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\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    function _contextSuffixLength() internal view virtual returns (uint256) {\n        return 0;\n    }\n}\n"
      },
      "@openzeppelin/contracts/utils/introspection/ERC165.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"./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 */\nabstract contract ERC165 is IERC165 {\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n        return interfaceId == type(IERC165).interfaceId;\n    }\n}\n"
      },
      "@openzeppelin/contracts/utils/introspection/IERC165.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\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"
      },
      "@openzeppelin/contracts/utils/math/Math.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n    /**\n     * @dev Muldiv operation overflow.\n     */\n    error MathOverflowedMulDiv();\n\n    enum Rounding {\n        Floor, // Toward negative infinity\n        Ceil, // Toward positive infinity\n        Trunc, // Toward zero\n        Expand // Away from zero\n    }\n\n    /**\n     * @dev Returns the addition of two unsigned integers, with an overflow flag.\n     */\n    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            uint256 c = a + b;\n            if (c < a) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\n     */\n    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b > a) return (false, 0);\n            return (true, a - b);\n        }\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n     */\n    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n            // benefit is lost if 'b' is also tested.\n            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n            if (a == 0) return (true, 0);\n            uint256 c = a * b;\n            if (c / a != b) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    /**\n     * @dev Returns the division of two unsigned integers, with a division by zero flag.\n     */\n    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b == 0) return (false, 0);\n            return (true, a / b);\n        }\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n     */\n    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b == 0) return (false, 0);\n            return (true, a % b);\n        }\n    }\n\n    /**\n     * @dev Returns the largest of two numbers.\n     */\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a > b ? a : b;\n    }\n\n    /**\n     * @dev Returns the smallest of two numbers.\n     */\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a < b ? a : b;\n    }\n\n    /**\n     * @dev Returns the average of two numbers. The result is rounded towards\n     * zero.\n     */\n    function average(uint256 a, uint256 b) internal pure returns (uint256) {\n        // (a + b) / 2 can overflow.\n        return (a & b) + (a ^ b) / 2;\n    }\n\n    /**\n     * @dev Returns the ceiling of the division of two numbers.\n     *\n     * This differs from standard division with `/` in that it rounds towards infinity instead\n     * of rounding towards zero.\n     */\n    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n        if (b == 0) {\n            // Guarantee the same behavior as in a regular Solidity division.\n            return a / b;\n        }\n\n        // (a + b - 1) / b can overflow on addition, so we distribute.\n        return a == 0 ? 0 : (a - 1) / b + 1;\n    }\n\n    /**\n     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\n     * denominator == 0.\n     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n     * Uniswap Labs also under MIT license.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n        unchecked {\n            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n            // variables such that product = prod1 * 2^256 + prod0.\n            uint256 prod0 = x * y; // Least significant 256 bits of the product\n            uint256 prod1; // Most significant 256 bits of the product\n            assembly {\n                let mm := mulmod(x, y, not(0))\n                prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n            }\n\n            // Handle non-overflow cases, 256 by 256 division.\n            if (prod1 == 0) {\n                // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n                // The surrounding unchecked block does not change this fact.\n                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n                return prod0 / denominator;\n            }\n\n            // Make sure the result is less than 2^256. Also prevents denominator == 0.\n            if (denominator <= prod1) {\n                revert MathOverflowedMulDiv();\n            }\n\n            ///////////////////////////////////////////////\n            // 512 by 256 division.\n            ///////////////////////////////////////////////\n\n            // Make division exact by subtracting the remainder from [prod1 prod0].\n            uint256 remainder;\n            assembly {\n                // Compute remainder using mulmod.\n                remainder := mulmod(x, y, denominator)\n\n                // Subtract 256 bit number from 512 bit number.\n                prod1 := sub(prod1, gt(remainder, prod0))\n                prod0 := sub(prod0, remainder)\n            }\n\n            // Factor powers of two out of denominator and compute largest power of two divisor of denominator.\n            // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n            uint256 twos = denominator & (0 - denominator);\n            assembly {\n                // Divide denominator by twos.\n                denominator := div(denominator, twos)\n\n                // Divide [prod1 prod0] by twos.\n                prod0 := div(prod0, twos)\n\n                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n                twos := add(div(sub(0, twos), twos), 1)\n            }\n\n            // Shift in bits from prod1 into prod0.\n            prod0 |= prod1 * twos;\n\n            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n            // four bits. That is, denominator * inv = 1 mod 2^4.\n            uint256 inverse = (3 * denominator) ^ 2;\n\n            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also\n            // works in modular arithmetic, doubling the correct bits in each step.\n            inverse *= 2 - denominator * inverse; // inverse mod 2^8\n            inverse *= 2 - denominator * inverse; // inverse mod 2^16\n            inverse *= 2 - denominator * inverse; // inverse mod 2^32\n            inverse *= 2 - denominator * inverse; // inverse mod 2^64\n            inverse *= 2 - denominator * inverse; // inverse mod 2^128\n            inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n            // is no longer required.\n            result = prod0 * inverse;\n            return result;\n        }\n    }\n\n    /**\n     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n        uint256 result = mulDiv(x, y, denominator);\n        if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) {\n            result += 1;\n        }\n        return result;\n    }\n\n    /**\n     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\n     * towards zero.\n     *\n     * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n     */\n    function sqrt(uint256 a) internal pure returns (uint256) {\n        if (a == 0) {\n            return 0;\n        }\n\n        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n        //\n        // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n        //\n        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n        //\n        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n        uint256 result = 1 << (log2(a) >> 1);\n\n        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n        // into the expected uint128 result.\n        unchecked {\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            return min(result, a / result);\n        }\n    }\n\n    /**\n     * @notice Calculates sqrt(a), following the selected rounding direction.\n     */\n    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = sqrt(a);\n            return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 2 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >> 128 > 0) {\n                value >>= 128;\n                result += 128;\n            }\n            if (value >> 64 > 0) {\n                value >>= 64;\n                result += 64;\n            }\n            if (value >> 32 > 0) {\n                value >>= 32;\n                result += 32;\n            }\n            if (value >> 16 > 0) {\n                value >>= 16;\n                result += 16;\n            }\n            if (value >> 8 > 0) {\n                value >>= 8;\n                result += 8;\n            }\n            if (value >> 4 > 0) {\n                value >>= 4;\n                result += 4;\n            }\n            if (value >> 2 > 0) {\n                value >>= 2;\n                result += 2;\n            }\n            if (value >> 1 > 0) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log2(value);\n            return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 10 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >= 10 ** 64) {\n                value /= 10 ** 64;\n                result += 64;\n            }\n            if (value >= 10 ** 32) {\n                value /= 10 ** 32;\n                result += 32;\n            }\n            if (value >= 10 ** 16) {\n                value /= 10 ** 16;\n                result += 16;\n            }\n            if (value >= 10 ** 8) {\n                value /= 10 ** 8;\n                result += 8;\n            }\n            if (value >= 10 ** 4) {\n                value /= 10 ** 4;\n                result += 4;\n            }\n            if (value >= 10 ** 2) {\n                value /= 10 ** 2;\n                result += 2;\n            }\n            if (value >= 10 ** 1) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log10(value);\n            return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 256 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     *\n     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n     */\n    function log256(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >> 128 > 0) {\n                value >>= 128;\n                result += 16;\n            }\n            if (value >> 64 > 0) {\n                value >>= 64;\n                result += 8;\n            }\n            if (value >> 32 > 0) {\n                value >>= 32;\n                result += 4;\n            }\n            if (value >> 16 > 0) {\n                value >>= 16;\n                result += 2;\n            }\n            if (value >> 8 > 0) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log256(value);\n            return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n     */\n    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n        return uint8(rounding) % 2 == 1;\n    }\n}\n"
      },
      "@openzeppelin/contracts/utils/math/SignedMath.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n    /**\n     * @dev Returns the largest of two signed numbers.\n     */\n    function max(int256 a, int256 b) internal pure returns (int256) {\n        return a > b ? a : b;\n    }\n\n    /**\n     * @dev Returns the smallest of two signed numbers.\n     */\n    function min(int256 a, int256 b) internal pure returns (int256) {\n        return a < b ? a : b;\n    }\n\n    /**\n     * @dev Returns the average of two signed numbers without overflow.\n     * The result is rounded towards zero.\n     */\n    function average(int256 a, int256 b) internal pure returns (int256) {\n        // Formula from the book \"Hacker's Delight\"\n        int256 x = (a & b) + ((a ^ b) >> 1);\n        return x + (int256(uint256(x) >> 255) & (a ^ b));\n    }\n\n    /**\n     * @dev Returns the absolute unsigned value of a signed value.\n     */\n    function abs(int256 n) internal pure returns (uint256) {\n        unchecked {\n            // must be unchecked in order to support `n = type(int256).min`\n            return uint256(n >= 0 ? n : -n);\n        }\n    }\n}\n"
      },
      "@openzeppelin/contracts/utils/ReentrancyGuard.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\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 ReentrancyGuard {\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    /**\n     * @dev Unauthorized reentrant call.\n     */\n    error ReentrancyGuardReentrantCall();\n\n    constructor() {\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        if (_status == ENTERED) {\n            revert ReentrancyGuardReentrantCall();\n        }\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"
      },
      "@openzeppelin/contracts/utils/Strings.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n    bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n    uint8 private constant ADDRESS_LENGTH = 20;\n\n    /**\n     * @dev The `value` string doesn't fit in the specified `length`.\n     */\n    error StringsInsufficientHexLength(uint256 value, uint256 length);\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        unchecked {\n            uint256 length = Math.log10(value) + 1;\n            string memory buffer = new string(length);\n            uint256 ptr;\n            /// @solidity memory-safe-assembly\n            assembly {\n                ptr := add(buffer, add(32, length))\n            }\n            while (true) {\n                ptr--;\n                /// @solidity memory-safe-assembly\n                assembly {\n                    mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))\n                }\n                value /= 10;\n                if (value == 0) break;\n            }\n            return buffer;\n        }\n    }\n\n    /**\n     * @dev Converts a `int256` to its ASCII `string` decimal representation.\n     */\n    function toStringSigned(int256 value) internal pure returns (string memory) {\n        return string.concat(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value)));\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        unchecked {\n            return toHexString(value, Math.log256(value) + 1);\n        }\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        uint256 localValue = value;\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_DIGITS[localValue & 0xf];\n            localValue >>= 4;\n        }\n        if (localValue != 0) {\n            revert StringsInsufficientHexLength(value, length);\n        }\n        return string(buffer);\n    }\n\n    /**\n     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal\n     * representation.\n     */\n    function toHexString(address addr) internal pure returns (string memory) {\n        return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);\n    }\n\n    /**\n     * @dev Returns true if the two strings are equal.\n     */\n    function equal(string memory a, string memory b) internal pure returns (bool) {\n        return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n    }\n}\n"
      },
      "contracts/access/IAccessControlVF.sol": {
        "content": "// SPDX-License-Identifier: MIT\r\npragma solidity 0.8.22;\r\n\r\ninterface IAccessControlVF {\r\n    /**\r\n     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\r\n     *\r\n     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\r\n     * {RoleAdminChanged} not being emitted signaling this.\r\n     *\r\n     * _Available since v3.1._\r\n     */\r\n    event RoleAdminChanged(\r\n        bytes32 indexed role,\r\n        bytes32 indexed previousAdminRole,\r\n        bytes32 indexed newAdminRole\r\n    );\r\n\r\n    /**\r\n     * @dev Emitted when `account` is granted `role`.\r\n     *\r\n     * `sender` is the account that originated the contract call, an admin role\r\n     * bearer except when using {AccessControl-_setupRole}.\r\n     */\r\n    event RoleGranted(\r\n        bytes32 indexed role,\r\n        address indexed account,\r\n        address indexed sender\r\n    );\r\n\r\n    /**\r\n     * @dev Emitted when `account` is revoked `role`.\r\n     *\r\n     * `sender` is the account that originated the contract call:\r\n     *   - if using `revokeRole`, it is the admin role bearer\r\n     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)\r\n     */\r\n    event RoleRevoked(\r\n        bytes32 indexed role,\r\n        address indexed account,\r\n        address indexed sender\r\n    );\r\n\r\n    /**\r\n     * @dev Returns `true` if `account` has been granted `role`.\r\n     */\r\n    function hasRole(bytes32 role, address account)\r\n        external\r\n        view\r\n        returns (bool);\r\n\r\n    /**\r\n     * @dev Revert with a standard message if `account` is missing `role`.\r\n     *\r\n     * The format of the revert reason is given by the following regular expression:\r\n     *\r\n     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\r\n     */\r\n    function checkRole(bytes32 role, address account) external view;\r\n\r\n    /**\r\n     * @dev Returns bytes of default admin role\r\n     */\r\n    function getAdminRole() external view returns (bytes32);\r\n\r\n    /**\r\n     * @dev Returns bytes of token contract role\r\n     */\r\n    function getTokenContractRole() external view returns (bytes32);\r\n\r\n    /**\r\n     * @dev Returns bytes of sales contract role\r\n     */\r\n    function getSalesContractRole() external view returns (bytes32);\r\n\r\n    /**\r\n     * @dev Returns bytes of burner role\r\n     */\r\n    function getBurnerRole() external view returns (bytes32);\r\n\r\n    /**\r\n     * @dev Returns bytes of minter role\r\n     */\r\n    function getMinterRole() external view returns (bytes32);\r\n\r\n    /**\r\n     * @dev Returns a bytes array of roles that can be minters\r\n     */\r\n    function getMinterRoles() external view returns (bytes32[] memory);\r\n\r\n    /**\r\n     * @dev Returns the admin role that controls `role`. See {grantRole} and\r\n     * {revokeRole}.\r\n     *\r\n     * To change a role's admin, use {_setRoleAdmin}.\r\n     */\r\n    function getRoleAdmin(bytes32 role) external view returns (bytes32);\r\n\r\n    /**\r\n     * @dev Grants `role` to `account`.\r\n     *\r\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\r\n     * event.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the caller must have ``role``'s admin role.\r\n     */\r\n    function grantRole(bytes32 role, address account) external;\r\n\r\n    /**\r\n     * @dev Revokes `role` from `account`.\r\n     *\r\n     * If `account` had been granted `role`, emits a {RoleRevoked} event.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the caller must have ``role``'s admin role.\r\n     */\r\n    function revokeRole(bytes32 role, address account) external;\r\n\r\n    /**\r\n     * @dev Revokes `role` from the calling account.\r\n     *\r\n     * Roles are often managed via {grantRole} and {revokeRole}: this function's\r\n     * purpose is to provide a mechanism for accounts to lose their privileges\r\n     * if they are compromised (such as when a trusted device is misplaced).\r\n     *\r\n     * If the calling account had been revoked `role`, emits a {RoleRevoked}\r\n     * event.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the caller must be `account`.\r\n     */\r\n    function renounceRole(bytes32 role, address account) external;\r\n\r\n    /**\r\n     * @dev Selects the next minter from the minters array using the current minter index.\r\n     * The current minter index should be incremented after each selection.  If the\r\n     * current minter index + 1 is equal to the minters array length then the current\r\n     * minter index should be set back to 0\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the caller must be an admin role\r\n     */\r\n    function selectNextMinter() external returns (address payable);\r\n\r\n    /**\r\n     * @dev Grants `minter` minter role and adds `minter` to minters array\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the caller must be an admin role\r\n     */\r\n    function grantMinterRole(address minter) external;\r\n\r\n    /**\r\n     * @dev Revokes minter role from `minter` and removes `minter` from minters array\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the caller must be an admin role\r\n     */\r\n    function revokeMinterRole(address minter) external;\r\n\r\n    /**\r\n     * @dev Distributes ETH evenly to all addresses in minters array\r\n     */\r\n    function fundMinters() external payable;\r\n}\r\n"
      },
      "contracts/examples/VFToken.sol": {
        "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.8.22;\r\n\r\nimport \"../token/ERC721VF.sol\";\r\nimport \"./VFTokenAllExtensions.sol\";\r\n\r\ncontract VFToken is ERC721VF, VFTokenAllExtensions {\r\n    //Token base URI\r\n    string private _baseUri;\r\n\r\n    /**\r\n     * @dev Initializes the contract by setting a `initialBaseUri`, `name`, `symbol`,\r\n     * and a `controlContractAddress` to the token collection.\r\n     */\r\n    constructor(\r\n        string memory initialBaseUri,\r\n        string memory name,\r\n        string memory symbol,\r\n        address controlContractAddress,\r\n        address royaltiesContractAddress\r\n    )\r\n        ERC721VF(name, symbol)\r\n        VFTokenAllExtensions(\r\n            controlContractAddress,\r\n            royaltiesContractAddress,\r\n            _msgSender()\r\n        )\r\n    {\r\n        string memory contractAddress = Strings.toHexString(\r\n            uint160(address(this)),\r\n            20\r\n        );\r\n        setBaseURI(\r\n            string(\r\n                abi.encodePacked(initialBaseUri, contractAddress, \"/tokens/\")\r\n            )\r\n        );\r\n    }\r\n\r\n    /**\r\n     * @dev Get the base token URI\r\n     */\r\n    function _baseURI() internal view virtual override returns (string memory) {\r\n        return _baseUri;\r\n    }\r\n\r\n    /**\r\n     * @dev Update the base token URI\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the caller must be an admin role\r\n     */\r\n    function setBaseURI(string memory baseUri) public onlyRole(getAdminRole()) {\r\n        _baseUri = baseUri;\r\n    }\r\n\r\n    /**\r\n     * @dev Permanently lock minting\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the caller must be an admin role\r\n     */\r\n    function lockMintingPermanently() external onlyRole(getAdminRole()) {\r\n        _lockMintingPermanently();\r\n    }\r\n\r\n    /**\r\n     * @dev Set the active/inactive state of minting\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the caller must be an admin role\r\n     */\r\n    function toggleMintActive() external onlyRole(getAdminRole()) {\r\n        _toggleMintActive();\r\n    }\r\n\r\n    /**\r\n     * @dev Set the active/inactive state of burning\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the caller must be an admin role\r\n     */\r\n    function toggleBurnActive() external onlyRole(getAdminRole()) {\r\n        _toggleBurnActive();\r\n    }\r\n\r\n    /**\r\n     * @dev Airdrop `addresses` for `quantity` starting at `startTokenId`\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the caller must be a minter role\r\n     * - minting must not be locked and must be active\r\n     * - `addresses` and `quantities` must have the same length\r\n     */\r\n    function airdrop(\r\n        address[] calldata addresses,\r\n        uint256[] calldata quantities,\r\n        uint256 startTokenId\r\n    ) external onlyRoles(getMinterRoles()) notLocked mintActive {\r\n        _airdrop(addresses, quantities, startTokenId);\r\n    }\r\n\r\n    /**\r\n     * @dev mint batch `to` for `quantity` starting at `startTokenId`\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the caller must be a minter role\r\n     * - minting must not be locked and must be active\r\n     */\r\n    function mintBatch(\r\n        address to,\r\n        uint8 quantity,\r\n        uint256 startTokenId\r\n    ) external onlyRoles(getMinterRoles()) notLocked mintActive {\r\n        _mintBatch(to, quantity, startTokenId);\r\n    }\r\n\r\n    /**\r\n     * @dev mint `to` token `tokenId`\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the caller must be a minter role\r\n     * - minting must not be locked and must be active\r\n     */\r\n    function mint(\r\n        address to,\r\n        uint256 tokenId\r\n    ) external onlyRoles(getMinterRoles()) notLocked mintActive {\r\n        _mint(to, tokenId);\r\n    }\r\n\r\n    /**\r\n     * @dev burn `from` token `tokenId`\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the caller must be a burner role\r\n     * - burning must be active\r\n     */\r\n    function burn(\r\n        address from,\r\n        uint256 tokenId\r\n    ) external onlyRole(getBurnerRole()) burnActive {\r\n        _burn(from, tokenId, false);\r\n    }\r\n}\r\n"
      },
      "contracts/examples/VFTokenAllExtensions.sol": {
        "content": "// SPDX-License-Identifier: MIT\r\npragma solidity 0.8.22;\r\n\r\nimport {AccessControlVFExtension} from \"../extensions/accesscontrol/AccessControlVFExtension.sol\";\r\nimport {RoyaltiesVFExtension} from \"../extensions/royalties/RoyaltiesVFExtension.sol\";\r\nimport {WithdrawVFExtension} from \"../extensions/withdraw/WithdrawVFExtension.sol\";\r\nimport {OwnableVFExtension} from \"../extensions/accesscontrol/OwnableVFExtension.sol\";\r\n\r\nabstract contract VFTokenAllExtensions is\r\n    AccessControlVFExtension,\r\n    RoyaltiesVFExtension,\r\n    WithdrawVFExtension,\r\n    OwnableVFExtension\r\n{\r\n    constructor(\r\n        address controlContractAddress,\r\n        address royaltiesContractAddress,\r\n        address initialOwner\r\n    )\r\n        AccessControlVFExtension(controlContractAddress)\r\n        RoyaltiesVFExtension(royaltiesContractAddress)\r\n        OwnableVFExtension(initialOwner)\r\n    {}\r\n\r\n    function setRoyaltiesContract(\r\n        address royaltiesContractAddress\r\n    ) external onlyRole(getAdminRole()) {\r\n        super._setRoyaltiesContract(royaltiesContractAddress);\r\n    }\r\n\r\n    function withdrawMoney() external onlyRole(getAdminRole()) {\r\n        super._withdrawMoney();\r\n    }\r\n\r\n    function withdrawToken(\r\n        address contractAddress,\r\n        address to,\r\n        uint256 tokenId\r\n    ) external onlyRole(getAdminRole()) {\r\n        super._withdrawToken(contractAddress, to, tokenId);\r\n    }\r\n}\r\n"
      },
      "contracts/extensions/accesscontrol/AccessControlVFExtension.sol": {
        "content": "// SPDX-License-Identifier: MIT\r\npragma solidity 0.8.22;\r\n\r\nimport {IAccessControlVF} from \"../../access/IAccessControlVF.sol\";\r\nimport {Context} from \"@openzeppelin/contracts/utils/Context.sol\";\r\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\r\n\r\nabstract contract AccessControlVFExtension is Context, IERC165 {\r\n    //Contract for function access control\r\n    IAccessControlVF private _controlContract;\r\n\r\n    constructor(address controlContractAddress) {\r\n        _controlContract = IAccessControlVF(controlContractAddress);\r\n    }\r\n\r\n    modifier onlyRole(bytes32 role) virtual {\r\n        _controlContract.checkRole(role, _msgSender());\r\n        _;\r\n    }\r\n\r\n    modifier onlyRoles(bytes32[] memory roles) virtual {\r\n        bool hasRequiredRole = false;\r\n        for (uint256 i; i < roles.length; i++) {\r\n            bytes32 role = roles[i];\r\n            if (_controlContract.hasRole(role, _msgSender())) {\r\n                hasRequiredRole = true;\r\n                break;\r\n            }\r\n        }\r\n        require(hasRequiredRole, \"Missing required role\");\r\n        _;\r\n    }\r\n\r\n    function getAdminRole() public view returns (bytes32) {\r\n        return _controlContract.getAdminRole();\r\n    }\r\n\r\n    function getMinterRoles() public view returns (bytes32[] memory) {\r\n        return _controlContract.getMinterRoles();\r\n    }\r\n\r\n    function getBurnerRole() public view returns (bytes32) {\r\n        return _controlContract.getBurnerRole();\r\n    }\r\n\r\n    /**\r\n     * @dev Update the access control contract\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the caller must be an admin role\r\n     * - `controlContractAddress` must support the IVFAccesControl interface\r\n     */\r\n    function setControlContract(address controlContractAddress)\r\n        external\r\n        onlyRole(_controlContract.getAdminRole())\r\n    {\r\n        require(\r\n            IERC165(controlContractAddress).supportsInterface(\r\n                type(IAccessControlVF).interfaceId\r\n            ),\r\n            \"Contract does not support required interface\"\r\n        );\r\n        _controlContract = IAccessControlVF(controlContractAddress);\r\n    }\r\n}\r\n"
      },
      "contracts/extensions/accesscontrol/OwnableVFExtension.sol": {
        "content": "// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\r\n\r\npragma solidity 0.8.22;\r\n\r\nimport \"@openzeppelin/contracts/utils/Context.sol\";\r\n\r\n/**\r\n * @dev Contract module which provides a basic access control mechanism, where\r\n * there is an account (an owner) that can be granted exclusive access to\r\n * specific functions.\r\n *\r\n * By default, the owner account will be the one that deploys the contract. This\r\n * can later be changed with {transferOwnership}.\r\n *\r\n * This module is used through inheritance. It will make available the modifier\r\n * `onlyOwner`, which can be applied to your functions to restrict their use to\r\n * the owner.\r\n */\r\nabstract contract OwnableVFExtension is Context {\r\n    address private _owner;\r\n\r\n    /**\r\n     * @dev The caller account is not authorized to perform an operation.\r\n     */\r\n    error OwnableUnauthorizedAccount(address account);\r\n\r\n    /**\r\n     * @dev The owner is not a valid owner account. (eg. `address(0)`)\r\n     */\r\n    error OwnableInvalidOwner(address owner);\r\n\r\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\r\n\r\n    /**\r\n     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\r\n     */\r\n    constructor(address initialOwner) {\r\n        if (initialOwner == address(0)) {\r\n            revert OwnableInvalidOwner(address(0));\r\n        }\r\n        _transferOwnership(initialOwner);\r\n    }\r\n\r\n    /**\r\n     * @dev Throws if called by any account other than the owner.\r\n     */\r\n    modifier onlyOwner() {\r\n        _checkOwner();\r\n        _;\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the address of the current owner.\r\n     */\r\n    function owner() public view virtual returns (address) {\r\n        return _owner;\r\n    }\r\n\r\n    /**\r\n     * @dev Throws if the sender is not the owner.\r\n     */\r\n    function _checkOwner() internal view virtual {\r\n        if (owner() != _msgSender()) {\r\n            revert OwnableUnauthorizedAccount(_msgSender());\r\n        }\r\n    }\r\n\r\n    /**\r\n     * @dev Leaves the contract without owner. It will not be possible to call\r\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\r\n     *\r\n     * NOTE: Renouncing ownership will leave the contract without an owner,\r\n     * thereby removing any functionality that is only available to the owner.\r\n     */\r\n    function renounceOwnership() public virtual onlyOwner {\r\n        _transferOwnership(address(0));\r\n    }\r\n\r\n    /**\r\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\r\n     * Can only be called by the current owner.\r\n     */\r\n    function transferOwnership(address newOwner) public virtual onlyOwner {\r\n        if (newOwner == address(0)) {\r\n            revert OwnableInvalidOwner(address(0));\r\n        }\r\n        _transferOwnership(newOwner);\r\n    }\r\n\r\n    /**\r\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\r\n     * Internal function without access restriction.\r\n     */\r\n    function _transferOwnership(address newOwner) internal virtual {\r\n        address oldOwner = _owner;\r\n        _owner = newOwner;\r\n        emit OwnershipTransferred(oldOwner, newOwner);\r\n    }\r\n}\r\n"
      },
      "contracts/extensions/royalties/RoyaltiesVFExtension.sol": {
        "content": "// SPDX-License-Identifier: MIT\r\npragma solidity 0.8.22;\r\n\r\nimport {IRoyaltiesVF} from \"../../royalties/IRoyaltiesVF.sol\";\r\nimport {Context} from \"@openzeppelin/contracts/utils/Context.sol\";\r\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\r\nimport {IERC2981} from \"@openzeppelin/contracts/interfaces/IERC2981.sol\";\r\n\r\nabstract contract RoyaltiesVFExtension is Context, IERC165, IERC2981 {\r\n    //Contract for function access control\r\n    IRoyaltiesVF private _royaltiesContract;\r\n\r\n    constructor(address royaltiesContractAddress) {\r\n        _royaltiesContract = IRoyaltiesVF(royaltiesContractAddress);\r\n    }\r\n\r\n    /**\r\n     * @dev Get royalty information for a token based on the `salePrice`\r\n     */\r\n    function royaltyInfo(uint256 tokenId, uint256 salePrice)\r\n        external\r\n        view\r\n        returns (address receiver, uint256 royaltyAmount)\r\n    {\r\n        return\r\n            _royaltiesContract.royaltyInfo(tokenId, address(this), salePrice);\r\n    }\r\n\r\n    /**\r\n     * @dev Update the royalties contract\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the caller must be an admin role\r\n     * - `royaltiesContractAddress` must support the IRoyaltiesVF interface\r\n     */\r\n    function _setRoyaltiesContract(address royaltiesContractAddress) internal {\r\n        require(\r\n            IERC165(royaltiesContractAddress).supportsInterface(\r\n                type(IRoyaltiesVF).interfaceId\r\n            ),\r\n            \"Contract does not support required interface\"\r\n        );\r\n        _royaltiesContract = IRoyaltiesVF(royaltiesContractAddress);\r\n    }\r\n}\r\n"
      },
      "contracts/extensions/withdraw/WithdrawVFExtension.sol": {
        "content": "// SPDX-License-Identifier: MIT\r\npragma solidity 0.8.22;\r\n\r\nimport \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\r\nimport \"@openzeppelin/contracts/utils/Address.sol\";\r\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\r\nimport \"@openzeppelin/contracts/utils/Context.sol\";\r\n\r\nabstract contract WithdrawVFExtension is Context, ReentrancyGuard {\r\n    constructor() {}\r\n\r\n    /**\r\n     * @dev Withdraw balance on contact to msg sender\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the caller must be an admin role\r\n     */\r\n    function _withdrawMoney() internal nonReentrant {\r\n        address payable to = payable(_msgSender());\r\n        Address.sendValue(to, address(this).balance);\r\n    }\r\n\r\n    /**\r\n     * @dev Withdraw token if we need to refund\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - `contractAddress` must support the IVFToken interface\r\n     * - the caller must be an admin role\r\n     */\r\n    function _withdrawToken(\r\n        address contractAddress,\r\n        address to,\r\n        uint256 tokenId\r\n    ) internal nonReentrant {\r\n        IERC721(contractAddress).transferFrom(address(this), to, tokenId);\r\n    }\r\n}\r\n"
      },
      "contracts/royalties/IRoyaltiesVF.sol": {
        "content": "// SPDX-License-Identifier: MIT\r\npragma solidity 0.8.22;\r\n\r\ninterface IRoyaltiesVF {\r\n    /**\r\n     * @dev Update the access control contract\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the caller must be an admin role\r\n     * - `controlContractAddress` must support the IVFAccesControl interface\r\n     */\r\n    function setControlContract(address controlContractAddress) external;\r\n\r\n    /**\r\n     * @dev Get royalty information for a contract based on the `salePrice` of a token\r\n     */\r\n    function royaltyInfo(\r\n        uint256,\r\n        address contractAddress,\r\n        uint256 salePrice\r\n    ) external view returns (address receiver, uint256 royaltyAmount);\r\n\r\n    /**\r\n     * @dev Sets the royalty information that all ids in this contract will default to.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - `receiver` cannot be the zero address.\r\n     * - `feeNumerator` cannot be greater than the fee denominator.\r\n     */\r\n    function setDefaultRoyalty(address receiver, uint96 feeNumerator) external;\r\n\r\n    /**\r\n     * @dev Removes default royalty information.\r\n     */\r\n    function deleteDefaultRoyalty() external;\r\n\r\n    /**\r\n     * @dev Sets the royalty information for `contractAddress`.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - `receiver` cannot be the zero address.\r\n     * - `feeNumerator` cannot be greater than the fee denominator.\r\n     */\r\n    function setContractRoyalties(\r\n        address contractAddress,\r\n        address receiver,\r\n        uint96 feeNumerator\r\n    ) external;\r\n\r\n    /**\r\n     * @dev Removes royalty information for `contractAddress`.\r\n     */\r\n    function resetContractRoyalty(address contractAddress) external;\r\n}\r\n"
      },
      "contracts/token/ERC721VF.sol": {
        "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.8.22;\r\n\r\nimport \"./IERC721VF.sol\";\r\nimport \"operator-filter-registry/src/DefaultOperatorFilterer.sol\";\r\nimport \"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\";\r\nimport \"@openzeppelin/contracts/utils/Address.sol\";\r\nimport \"@openzeppelin/contracts/utils/Context.sol\";\r\nimport \"@openzeppelin/contracts/utils/Strings.sol\";\r\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\r\n\r\n/**\r\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\r\n * the Metadata extension.\r\n */\r\ncontract ERC721VF is\r\n    Context,\r\n    ERC165,\r\n    IERC721VF,\r\n    DefaultOperatorFilterer\r\n{\r\n    using Address for address;\r\n    using Strings for uint256;\r\n\r\n    // Token name\r\n    string private _name;\r\n\r\n    // Token symbol\r\n    string private _symbol;\r\n\r\n    // Mapping from token ID to owner address\r\n    mapping(uint256 => address) private _owners;\r\n\r\n    // Mapping owner address to token count\r\n    mapping(address => uint256) private _balances;\r\n\r\n    // Mapping from token ID to approved address\r\n    mapping(uint256 => address) private _tokenApprovals;\r\n\r\n    // Mapping from owner to operator approvals\r\n    mapping(address => mapping(address => bool)) private _operatorApprovals;\r\n\r\n    // The number of tokens minted\r\n    uint256 private _mintCounter;\r\n\r\n    // The number of tokens burned\r\n    uint256 private _burnCounter;\r\n\r\n    //Flag to permanently lock minting\r\n    bool public mintingPermanentlyLocked = false;\r\n    //Flag to activate or disable minting\r\n    bool public isMintActive = false;\r\n    //Flag to activate or disable burning\r\n    bool public isBurnActive = false;\r\n\r\n    /**\r\n     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\r\n     */\r\n    constructor(\r\n        string memory name_,\r\n        string memory symbol_\r\n    ) {\r\n        _name = name_;\r\n        _symbol = symbol_;\r\n    }\r\n\r\n    modifier notLocked() virtual {\r\n        if (mintingPermanentlyLocked) {\r\n            revert ERC721VFMintingPermanentlyLocked();\r\n        }\r\n        _;\r\n    }\r\n\r\n    modifier mintActive() virtual {\r\n        if (!isMintActive) {\r\n            revert ERC721VFMintIsNotActive();\r\n        }\r\n        _;\r\n    }\r\n\r\n    modifier burnActive() virtual {\r\n        if (!isBurnActive) {\r\n            revert ERC721VFBurnIsNotActive();\r\n        }\r\n        _;\r\n    }\r\n\r\n    /**\r\n     * @dev See {IERC165-supportsInterface}.\r\n     */\r\n    function supportsInterface(\r\n        bytes4 interfaceId\r\n    ) public view virtual override(ERC165, IERC165) returns (bool) {\r\n        return\r\n            interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721\r\n            interfaceId == 0x5b5e139f || // ERC165 interface ID for ERC721Metadata\r\n            interfaceId == type(IERC721VF).interfaceId || // ERC165 interface ID for ERC721VF.\r\n            super.supportsInterface(interfaceId); // ERC165 interface ID for ERC165\r\n    }\r\n\r\n    /**\r\n     * @dev See {IERC721-balanceOf}.\r\n     */\r\n    function balanceOf(\r\n        address owner\r\n    ) public view virtual override returns (uint256) {\r\n        if (owner == address(0)) {\r\n            revert ERC721VFAddressZeroIsNotAValidOwner();\r\n        }\r\n\r\n        return _balances[owner];\r\n    }\r\n\r\n    /**\r\n     * @dev See {IERC721-ownerOf}.\r\n     */\r\n    function ownerOf(\r\n        uint256 tokenId\r\n    ) public view virtual override returns (address) {\r\n        address owner = _ownerOf(tokenId);\r\n        if (owner == address(0)) {\r\n            revert ERC721VFInvalidTokenID(tokenId);\r\n        }\r\n        return owner;\r\n    }\r\n\r\n    /**\r\n     * @dev See {IERC721Metadata-name}.\r\n     */\r\n    function name() public view virtual override returns (string memory) {\r\n        return _name;\r\n    }\r\n\r\n    /**\r\n     * @dev See {IERC721Metadata-symbol}.\r\n     */\r\n    function symbol() public view virtual override returns (string memory) {\r\n        return _symbol;\r\n    }\r\n\r\n    /**\r\n     * @dev See {IERC721Metadata-tokenURI}.\r\n     */\r\n    function tokenURI(\r\n        uint256 tokenId\r\n    ) public view virtual override returns (string memory) {\r\n        _requireMinted(tokenId);\r\n\r\n        string memory baseURI = _baseURI();\r\n        return\r\n            bytes(baseURI).length > 0\r\n                ? string(abi.encodePacked(baseURI, tokenId.toString()))\r\n                : \"\";\r\n    }\r\n\r\n    /**\r\n     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\r\n     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\r\n     * by default, can be overridden in child contracts.\r\n     */\r\n    function _baseURI() internal view virtual returns (string memory) {\r\n        return \"\";\r\n    }\r\n\r\n    /**\r\n     * @dev See {IERC721-approve}.\r\n     */\r\n    function approve(\r\n        address to,\r\n        uint256 tokenId\r\n    ) public virtual override onlyAllowedOperatorApproval(to) {\r\n        address owner = ERC721VF.ownerOf(tokenId);\r\n        if (to == owner) {\r\n            revert ERC721VFApprovalToCurrentOwner(to, tokenId);\r\n        }\r\n\r\n        if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) {\r\n            revert ERC721VFApproveCallerIsNotTokenOwnerOrApprovedForAll(\r\n                to,\r\n                tokenId\r\n            );\r\n        }\r\n\r\n        _approve(to, tokenId);\r\n    }\r\n\r\n    /**\r\n     * @dev See {IERC721-getApproved}.\r\n     */\r\n    function getApproved(\r\n        uint256 tokenId\r\n    ) public view virtual override returns (address) {\r\n        _requireMinted(tokenId);\r\n\r\n        return _tokenApprovals[tokenId];\r\n    }\r\n\r\n    /**\r\n     * @dev See {IERC721-setApprovalForAll}.\r\n     */\r\n    function setApprovalForAll(\r\n        address operator,\r\n        bool approved\r\n    ) public virtual override onlyAllowedOperatorApproval(operator) {\r\n        _setApprovalForAll(_msgSender(), operator, approved);\r\n    }\r\n\r\n    /**\r\n     * @dev See {IERC721-isApprovedForAll}.\r\n     */\r\n    function isApprovedForAll(\r\n        address owner,\r\n        address operator\r\n    ) public view virtual override returns (bool) {\r\n        return _operatorApprovals[owner][operator];\r\n    }\r\n\r\n    /**\r\n     * @dev See {IERC721-transferFrom}.\r\n     */\r\n    function transferFrom(\r\n        address from,\r\n        address to,\r\n        uint256 tokenId\r\n    ) public virtual override onlyAllowedOperator(from) {\r\n        _transferFrom(from, to, tokenId, true);\r\n    }\r\n\r\n    /**\r\n     * @dev See {IERC721-safeTransferFrom}.\r\n     */\r\n    function safeTransferFrom(\r\n        address from,\r\n        address to,\r\n        uint256 tokenId\r\n    ) public virtual override onlyAllowedOperator(from) {\r\n        _safeTransferFrom(from, to, tokenId, true);\r\n    }\r\n\r\n    /**\r\n     * @dev See {IERC721-safeTransferFrom}.\r\n     */\r\n    function safeTransferFrom(\r\n        address from,\r\n        address to,\r\n        uint256 tokenId,\r\n        bytes memory data\r\n    ) public virtual override onlyAllowedOperator(from) {\r\n        _safeTransferFrom(from, to, tokenId, true, data);\r\n    }\r\n\r\n    /**\r\n     * @dev See {IERC721VF-totalSupply}.\r\n     */\r\n    function totalSupply() public view returns (uint256) {\r\n        unchecked {\r\n            return _mintCounter - _burnCounter;\r\n        }\r\n    }\r\n\r\n    /**\r\n     * @dev See {IERC721VF-totalMinted}.\r\n     */\r\n    function totalMinted() public view returns (uint256) {\r\n        unchecked {\r\n            return _mintCounter;\r\n        }\r\n    }\r\n\r\n    /**\r\n     * @dev See {IERC721VF-totalBurned}.\r\n     */\r\n    function totalBurned() public view returns (uint256) {\r\n        unchecked {\r\n            return _burnCounter;\r\n        }\r\n    }\r\n\r\n    /**\r\n     * @dev See {IERC721VF-tokensOfOwner}.\r\n     */\r\n    function tokensOfOwner(\r\n        address owner\r\n    ) public view returns (uint256[] memory ownerTokens) {\r\n        address currentOwnerAddress;\r\n        uint256 tokenCount = balanceOf(owner);\r\n\r\n        if (tokenCount == 0) {\r\n            return new uint256[](0);\r\n        } else {\r\n            uint256[] memory result = new uint256[](tokenCount);\r\n            uint256 resultIndex = 0;\r\n\r\n            uint256 index;\r\n            for (index = 0; resultIndex != tokenCount; index++) {\r\n                currentOwnerAddress = _owners[index];\r\n                if (currentOwnerAddress == owner) {\r\n                    result[resultIndex++] = index;\r\n                }\r\n            }\r\n\r\n            return result;\r\n        }\r\n    }\r\n\r\n    /**\r\n     * @dev See {IERC721VF-tokensOfOwnerIn}.\r\n     */\r\n    function tokensOfOwnerIn(\r\n        address owner,\r\n        uint256 startIndex,\r\n        uint256 endIndex\r\n    ) public view returns (uint256[] memory ownerTokens) {\r\n        address currentOwnerAddress;\r\n        uint256 tokenCount = balanceOf(owner);\r\n\r\n        if (tokenCount == 0) {\r\n            return new uint256[](0);\r\n        } else {\r\n            uint256[] memory result = new uint256[](tokenCount);\r\n            uint256 resultIndex = 0;\r\n\r\n            uint256 index = startIndex;\r\n            for (index; index <= endIndex; index++) {\r\n                currentOwnerAddress = _owners[index];\r\n                if (currentOwnerAddress == owner) {\r\n                    result[resultIndex++] = index;\r\n                }\r\n            }\r\n\r\n            // Downsize the array to fit.\r\n            assembly {\r\n                mstore(result, resultIndex)\r\n            }\r\n\r\n            return result;\r\n        }\r\n    }\r\n\r\n    /**\r\n     * @dev See {IERC721-transferFrom}.\r\n     */\r\n    function _transferFrom(\r\n        address from,\r\n        address to,\r\n        uint256 tokenId,\r\n        bool approvalCheck\r\n    ) internal virtual {\r\n        //solhint-disable-next-line max-line-length\r\n\r\n        if (approvalCheck) {\r\n            if (!_isApprovedOrOwner(_msgSender(), tokenId)) {\r\n                revert ERC721VFCallerIsNotTokenOwnerOrApproved(\r\n                    from,\r\n                    to,\r\n                    tokenId\r\n                );\r\n            }\r\n        }\r\n\r\n        _transfer(from, to, tokenId);\r\n    }\r\n\r\n    /**\r\n     * @dev See {IERC721-safeTransferFrom}.\r\n     */\r\n    function _safeTransferFrom(\r\n        address from,\r\n        address to,\r\n        uint256 tokenId,\r\n        bool approvalCheck\r\n    ) internal virtual {\r\n        _safeTransferFrom(from, to, tokenId, approvalCheck, \"\");\r\n    }\r\n\r\n    /**\r\n     * @dev See {IERC721-safeTransferFrom}.\r\n     */\r\n    function _safeTransferFrom(\r\n        address from,\r\n        address to,\r\n        uint256 tokenId,\r\n        bool approvalCheck,\r\n        bytes memory data\r\n    ) internal virtual {\r\n        if (approvalCheck) {\r\n            if (!_isApprovedOrOwner(_msgSender(), tokenId)) {\r\n                revert ERC721VFCallerIsNotTokenOwnerOrApproved(\r\n                    from,\r\n                    to,\r\n                    tokenId\r\n                );\r\n            }\r\n        }\r\n        _safeTransfer(from, to, tokenId, data);\r\n    }\r\n\r\n    /**\r\n     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\r\n     * are aware of the ERC721 protocol to prevent tokens from being forever locked.\r\n     *\r\n     * `data` is additional data, it has no specified format and it is sent in call to `to`.\r\n     *\r\n     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\r\n     * implement alternative mechanisms to perform token transfer, such as signature-based.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - `from` cannot be the zero address.\r\n     * - `to` cannot be the zero address.\r\n     * - `tokenId` token must exist and be owned by `from`.\r\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\r\n     *\r\n     * Emits a {Transfer} event.\r\n     */\r\n    function _safeTransfer(\r\n        address from,\r\n        address to,\r\n        uint256 tokenId,\r\n        bytes memory data\r\n    ) internal virtual {\r\n        _transfer(from, to, tokenId);\r\n        _checkOnERC721Received(from, to, tokenId, data);\r\n    }\r\n\r\n    /**\r\n     * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist\r\n     */\r\n    function _ownerOf(uint256 tokenId) internal view virtual returns (address) {\r\n        return _owners[tokenId];\r\n    }\r\n\r\n    /**\r\n     * @dev Returns whether `tokenId` exists.\r\n     *\r\n     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\r\n     *\r\n     * Tokens start existing when they are minted (`_mint`),\r\n     * and stop existing when they are burned (`_burn`).\r\n     */\r\n    function _exists(uint256 tokenId) internal view virtual returns (bool) {\r\n        return _ownerOf(tokenId) != address(0);\r\n    }\r\n\r\n    /**\r\n     * @dev Returns whether `spender` is allowed to manage `tokenId`.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - `tokenId` must exist.\r\n     */\r\n    function _isApprovedOrOwner(\r\n        address spender,\r\n        uint256 tokenId\r\n    ) internal view virtual returns (bool) {\r\n        address owner = ERC721VF.ownerOf(tokenId);\r\n        return (spender == owner ||\r\n            isApprovedForAll(owner, spender) ||\r\n            getApproved(tokenId) == spender);\r\n    }\r\n\r\n    /**\r\n     * @dev Permanently lock minting\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the caller must be an admin role\r\n     */\r\n    function _lockMintingPermanently() internal {\r\n        mintingPermanentlyLocked = true;\r\n    }\r\n\r\n    /**\r\n     * @dev Set the active/inactive state of minting\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the caller must be an admin role\r\n     */\r\n    function _toggleMintActive() internal {\r\n        isMintActive = !isMintActive;\r\n    }\r\n\r\n    /**\r\n     * @dev Safely mints `tokenId` and transfers it to `to`.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - `tokenId` must not exist.\r\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\r\n     *\r\n     * Emits a {Transfer} event.\r\n     */\r\n    function _safeMint(address to, uint256 tokenId) internal virtual {\r\n        _safeMint(to, tokenId, \"\");\r\n    }\r\n\r\n    /**\r\n     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\r\n     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\r\n     */\r\n    function _safeMint(\r\n        address to,\r\n        uint256 tokenId,\r\n        bytes memory data\r\n    ) internal virtual {\r\n        _mint(to, tokenId);\r\n        _checkOnERC721Received(address(0), to, tokenId, data);\r\n    }\r\n\r\n    /**\r\n     * @dev Safely batch mints tokens starting at `startTokenId` until `quantity` is met and transfers them to `to`.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - `tokenId` must not exist.\r\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\r\n     * - Transfer to only ERC721Reciever implementers\r\n     *\r\n     * Emits a {Transfer} event.\r\n     */\r\n    function _safeMintBatch(\r\n        address to,\r\n        uint256 quantity,\r\n        uint256 startTokenId\r\n    ) internal returns (uint256 endToken) {\r\n        uint256 tokenId = startTokenId;\r\n        for (uint256 i; i < quantity; i++) {\r\n            if (to == address(0)) {\r\n                revert ERC721VFMintToTheZeroAddress();\r\n            }\r\n\r\n            if (_exists(tokenId)) {\r\n                revert ERC721VFTokenAlreadyMinted(tokenId);\r\n            }\r\n\r\n            _beforeTokenTransfer(address(0), to, tokenId, 1);\r\n\r\n            _balances[to] += 1;\r\n            _owners[tokenId] = to;\r\n\r\n            emit Transfer(address(0), to, tokenId);\r\n\r\n            _afterTokenTransfer(address(0), to, tokenId, 1);\r\n\r\n            _checkOnERC721Received(address(0), to, tokenId, \"\");\r\n\r\n            tokenId++;\r\n        }\r\n\r\n        unchecked {\r\n            _mintCounter += quantity;\r\n        }\r\n\r\n        return tokenId;\r\n    }\r\n\r\n    /**\r\n     * @dev Airdrop `addresses` for `quantity` starting at `startTokenId`\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the caller must be a minter role\r\n     * - minting must not be locked and must be active\r\n     * - `addresses` and `quantities` must have the same length\r\n     */\r\n    function _airdrop(\r\n        address[] calldata addresses,\r\n        uint256[] calldata quantities,\r\n        uint256 startTokenId\r\n    ) internal virtual {\r\n        if (addresses.length != quantities.length) {\r\n            revert ERC721VFAddressAndQuantitiesNeedToBeEqualLength();\r\n        }\r\n\r\n        for (uint256 i; i < addresses.length; i++) {\r\n            startTokenId = _mintBatch(\r\n                addresses[i],\r\n                quantities[i],\r\n                startTokenId\r\n            );\r\n        }\r\n    }\r\n\r\n    /**\r\n     * @dev Batch mints tokens starting at `startTokenId` until `quantity` is met and transfers them to `to`.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - `tokenId` must not exist.\r\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\r\n     *\r\n     * Emits a {Transfer} event.\r\n     */\r\n    function _mintBatch(\r\n        address to,\r\n        uint256 quantity,\r\n        uint256 startTokenId\r\n    ) internal virtual returns (uint256 endToken) {\r\n        uint256 tokenId = startTokenId;\r\n        for (uint256 i; i < quantity; i++) {\r\n            if (to == address(0)) {\r\n                revert ERC721VFMintToTheZeroAddress();\r\n            }\r\n\r\n            if (_exists(tokenId)) {\r\n                revert ERC721VFTokenAlreadyMinted(tokenId);\r\n            }\r\n\r\n            _beforeTokenTransfer(address(0), to, tokenId, 1);\r\n\r\n            _owners[tokenId] = to;\r\n\r\n            emit Transfer(address(0), to, tokenId);\r\n\r\n            _afterTokenTransfer(address(0), to, tokenId, 1);\r\n\r\n            tokenId++;\r\n        }\r\n\r\n        unchecked {\r\n            _balances[to] += quantity;\r\n            _mintCounter += quantity;\r\n        }\r\n\r\n        return tokenId;\r\n    }\r\n\r\n    /**\r\n     * @dev Mints `tokenId` and transfers it to `to`.\r\n     *\r\n     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - `tokenId` must not exist.\r\n     * - `to` cannot be the zero address.\r\n     *\r\n     * Emits a {Transfer} event.\r\n     */\r\n    function _mint(address to, uint256 tokenId) internal virtual {\r\n        if (to == address(0)) {\r\n            revert ERC721VFMintToTheZeroAddress();\r\n        }\r\n\r\n        if (_exists(tokenId)) {\r\n            revert ERC721VFTokenAlreadyMinted(tokenId);\r\n        }\r\n\r\n        _beforeTokenTransfer(address(0), to, tokenId, 1);\r\n\r\n        unchecked {\r\n            // Will not overflow unless all 2**256 token ids are minted to the same owner.\r\n            // Given that tokens are minted one by one, it is impossible in practice that\r\n            // this ever happens. Might change if we allow batch minting.\r\n            // The ERC fails to describe this case.\r\n            _balances[to] += 1;\r\n        }\r\n\r\n        _owners[tokenId] = to;\r\n\r\n        unchecked {\r\n            _mintCounter++;\r\n        }\r\n\r\n        emit Transfer(address(0), to, tokenId);\r\n\r\n        _afterTokenTransfer(address(0), to, tokenId, 1);\r\n    }\r\n\r\n    /**\r\n     * @dev Set the active/inactive state of burning\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - the caller must be an admin role\r\n     */\r\n    function _toggleBurnActive() internal {\r\n        isBurnActive = !isBurnActive;\r\n    }\r\n\r\n    /**\r\n     * @dev Destroys `tokenId`.\r\n     * The approval is cleared when the token is burned.\r\n     * This is an internal function that does not check if the sender is authorized to operate on the token.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - `tokenId` must exist.\r\n     *\r\n     * Emits a {Transfer} event.\r\n     */\r\n    function _burn(\r\n        address from,\r\n        uint256 tokenId,\r\n        bool approvalCheck\r\n    ) internal virtual {\r\n        if (approvalCheck) {\r\n            if (!_isApprovedOrOwner(from, tokenId)) {\r\n                revert ERC721VFBurnCallerIsNotTokenOwnerOrApproved(\r\n                    from,\r\n                    tokenId\r\n                );\r\n            }\r\n        }\r\n        _burn(tokenId);\r\n    }\r\n\r\n    /**\r\n     * @dev Destroys `tokenId`.\r\n     * The approval is cleared when the token is burned.\r\n     * This is an internal function that does not check if the sender is authorized to operate on the token.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - `tokenId` must exist.\r\n     *\r\n     * Emits a {Transfer} event.\r\n     */\r\n    function _burn(uint256 tokenId) internal virtual {\r\n        address owner = ERC721VF.ownerOf(tokenId);\r\n\r\n        _beforeTokenTransfer(owner, address(0), tokenId, 1);\r\n\r\n        // Clear approvals\r\n        delete _tokenApprovals[tokenId];\r\n\r\n        unchecked {\r\n            // Cannot overflow, as that would require more tokens to be burned/transferred\r\n            // out than the owner initially received through minting and transferring in.\r\n            _balances[owner] -= 1;\r\n        }\r\n        delete _owners[tokenId];\r\n\r\n        unchecked {\r\n            _burnCounter++;\r\n        }\r\n\r\n        emit Transfer(owner, address(0), tokenId);\r\n\r\n        _afterTokenTransfer(owner, address(0), tokenId, 1);\r\n    }\r\n\r\n    /**\r\n     * @dev Transfers `tokenId` from `from` to `to`.\r\n     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - `to` cannot be the zero address.\r\n     * - `tokenId` token must be owned by `from`.\r\n     *\r\n     * Emits a {Transfer} event.\r\n     */\r\n    function _transfer(\r\n        address from,\r\n        address to,\r\n        uint256 tokenId\r\n    ) internal virtual {\r\n        if (to == address(0)) {\r\n            revert ERC721VFTransferToTheZeroAddress();\r\n        }\r\n\r\n        if (ERC721VF.ownerOf(tokenId) != from) {\r\n            revert ERC721VFTransferFromIncorrectOwner(from, tokenId);\r\n        }\r\n\r\n        _beforeTokenTransfer(from, to, tokenId, 1);\r\n\r\n        // Clear approvals from the previous owner\r\n        delete _tokenApprovals[tokenId];\r\n\r\n        unchecked {\r\n            // `_balances[from]` cannot overflow for the same reason as described in `_burn`:\r\n            // `from`'s balance is the number of token held, which is at least one before the current\r\n            // transfer.\r\n            // `_balances[to]` could overflow in the conditions described in `_mint`. That would require\r\n            // all 2**256 token ids to be minted, which in practice is impossible.\r\n            _balances[from] -= 1;\r\n            _balances[to] += 1;\r\n        }\r\n        _owners[tokenId] = to;\r\n\r\n        emit Transfer(from, to, tokenId);\r\n\r\n        _afterTokenTransfer(from, to, tokenId, 1);\r\n    }\r\n\r\n    /**\r\n     * @dev Approve `to` to operate on `tokenId`\r\n     *\r\n     * Emits an {Approval} event.\r\n     */\r\n    function _approve(address to, uint256 tokenId) internal virtual {\r\n        _tokenApprovals[tokenId] = to;\r\n        emit Approval(ERC721VF.ownerOf(tokenId), to, tokenId);\r\n    }\r\n\r\n    /**\r\n     * @dev Approve `operator` to operate on all of `owner` tokens\r\n     *\r\n     * Emits an {ApprovalForAll} event.\r\n     */\r\n    function _setApprovalForAll(\r\n        address owner,\r\n        address operator,\r\n        bool approved\r\n    ) internal virtual {\r\n        if (owner == operator) {\r\n            revert ERC721VFApproveToCaller();\r\n        }\r\n        _operatorApprovals[owner][operator] = approved;\r\n        emit ApprovalForAll(owner, operator, approved);\r\n    }\r\n\r\n    /**\r\n     * @dev Reverts if the `tokenId` has not been minted yet.\r\n     */\r\n    function _requireMinted(uint256 tokenId) internal view virtual {\r\n        if (!_exists(tokenId)) {\r\n            revert ERC721VFInvalidTokenID(tokenId);\r\n        }\r\n    }\r\n\r\n    function _checkOnERC721Received(\r\n        address from,\r\n        address to,\r\n        uint256 tokenId,\r\n        bytes memory data\r\n    ) private {\r\n        if (to.code.length > 0) {\r\n            try\r\n                IERC721Receiver(to).onERC721Received(\r\n                    _msgSender(),\r\n                    from,\r\n                    tokenId,\r\n                    data\r\n                )\r\n            returns (bytes4 retval) {\r\n                if (retval != IERC721Receiver.onERC721Received.selector) {\r\n                    revert ERC721VFTransferToNonERC721VFReceiverImplementer(\r\n                        to,\r\n                        tokenId\r\n                    );\r\n                }\r\n            } catch (bytes memory reason) {\r\n                if (reason.length == 0) {\r\n                    revert ERC721VFTransferToNonERC721VFReceiverImplementer(\r\n                        to,\r\n                        tokenId\r\n                    );\r\n                } else {\r\n                    /// @solidity memory-safe-assembly\r\n                    assembly {\r\n                        revert(add(32, reason), mload(reason))\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    /**\r\n     * @dev Hook that is called before any token transfer. This includes minting\r\n     * and burning.\r\n     *\r\n     * Calling conditions:\r\n     *\r\n     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\r\n     * transferred to `to`.\r\n     * - When `from` is zero, `tokenId` will be minted for `to`.\r\n     * - When `to` is zero, ``from``'s `tokenId` will be burned.\r\n     * - `from` and `to` are never both zero.\r\n     * - `batchSize` is non-zero.\r\n     *\r\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\r\n     */\r\n    function _beforeTokenTransfer(\r\n        address from,\r\n        address to,\r\n        uint256 tokenId,\r\n        uint256 batchSize\r\n    ) internal virtual {}\r\n\r\n    /**\r\n     * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is\r\n     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\r\n     *\r\n     * Calling conditions:\r\n     *\r\n     * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.\r\n     * - When `from` is zero, the tokens were minted for `to`.\r\n     * - When `to` is zero, ``from``'s tokens were burned.\r\n     * - `from` and `to` are never both zero.\r\n     * - `batchSize` is non-zero.\r\n     *\r\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\r\n     */\r\n    function _afterTokenTransfer(\r\n        address from,\r\n        address to,\r\n        uint256 firstTokenId,\r\n        uint256 batchSize\r\n    ) internal virtual {}\r\n}\r\n"
      },
      "contracts/token/IERC721VF.sol": {
        "content": "// SPDX-License-Identifier: MIT\r\n\r\npragma solidity 0.8.22;\r\n\r\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\r\n\r\n/**\r\n * @dev Required interface of an ERC721VF compliant contract.\r\n */\r\ninterface IERC721VF is IERC165 {\r\n    error ERC721VFAddressZeroIsNotAValidOwner();\r\n    error ERC721VFInvalidTokenID(uint256 tokenId);\r\n    error ERC721VFApprovalToCurrentOwner(address to, uint256 tokenId);\r\n    error ERC721VFApproveCallerIsNotTokenOwnerOrApprovedForAll(\r\n        address to,\r\n        uint256 tokenId\r\n    );\r\n    error ERC721VFCallerIsNotTokenOwnerOrApproved(\r\n        address from,\r\n        address to,\r\n        uint256 tokenId\r\n    );\r\n    error ERC721VFTransferToNonERC721VFReceiverImplementer(\r\n        address to,\r\n        uint256 tokenId\r\n    );\r\n    error ERC721VFAddressAndQuantitiesNeedToBeEqualLength();\r\n    error ERC721VFMintToTheZeroAddress();\r\n    error ERC721VFTokenAlreadyMinted(uint256 tokenId);\r\n    error ERC721VFTransferToTheZeroAddress();\r\n    error ERC721VFTransferFromIncorrectOwner(address from, uint256 tokenId);\r\n    error ERC721VFApproveToCaller();\r\n    error ERC721VFBurnCallerIsNotTokenOwnerOrApproved(\r\n        address from,\r\n        uint256 tokenId\r\n    );\r\n    error ERC721VFMintingPermanentlyLocked();\r\n    error ERC721VFMintIsNotActive();\r\n    error ERC721VFBurnIsNotActive();\r\n\r\n    /**\r\n     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\r\n     */\r\n    event Transfer(\r\n        address indexed from,\r\n        address indexed to,\r\n        uint256 indexed tokenId\r\n    );\r\n\r\n    /**\r\n     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\r\n     */\r\n    event Approval(\r\n        address indexed owner,\r\n        address indexed approved,\r\n        uint256 indexed tokenId\r\n    );\r\n\r\n    /**\r\n     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\r\n     */\r\n    event ApprovalForAll(\r\n        address indexed owner,\r\n        address indexed operator,\r\n        bool approved\r\n    );\r\n\r\n    /**\r\n     * @dev Returns the token collection name.\r\n     */\r\n    function name() external view returns (string memory);\r\n\r\n    /**\r\n     * @dev Returns the token collection symbol.\r\n     */\r\n    function symbol() external view returns (string memory);\r\n\r\n    /**\r\n     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\r\n     */\r\n    function tokenURI(uint256 tokenId) external view returns (string memory);\r\n\r\n    /**\r\n     * @dev Returns the number of tokens in ``owner``'s account.\r\n     */\r\n    function balanceOf(address owner) external view returns (uint256 balance);\r\n\r\n    /**\r\n     * @dev Returns the owner of the `tokenId` token.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - `tokenId` must exist.\r\n     */\r\n    function ownerOf(uint256 tokenId) external view returns (address owner);\r\n\r\n    /**\r\n     * @dev Safely transfers `tokenId` token from `from` to `to`.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - `from` cannot be the zero address.\r\n     * - `to` cannot be the zero address.\r\n     * - `tokenId` token must exist and be owned by `from`.\r\n     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\r\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\r\n     *\r\n     * Emits a {Transfer} event.\r\n     */\r\n    function safeTransferFrom(\r\n        address from,\r\n        address to,\r\n        uint256 tokenId,\r\n        bytes calldata data\r\n    ) external;\r\n\r\n    /**\r\n     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\r\n     * are aware of the ERC721 protocol to prevent tokens from being forever locked.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - `from` cannot be the zero address.\r\n     * - `to` cannot be the zero address.\r\n     * - `tokenId` token must exist and be owned by `from`.\r\n     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\r\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\r\n     *\r\n     * Emits a {Transfer} event.\r\n     */\r\n    function safeTransferFrom(\r\n        address from,\r\n        address to,\r\n        uint256 tokenId\r\n    ) external;\r\n\r\n    /**\r\n     * @dev Transfers `tokenId` token from `from` to `to`.\r\n     *\r\n     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\r\n     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\r\n     * understand this adds an external call which potentially creates a reentrancy vulnerability.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - `from` cannot be the zero address.\r\n     * - `to` cannot be the zero address.\r\n     * - `tokenId` token must be owned by `from`.\r\n     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\r\n     *\r\n     * Emits a {Transfer} event.\r\n     */\r\n    function transferFrom(\r\n        address from,\r\n        address to,\r\n        uint256 tokenId\r\n    ) external;\r\n\r\n    /**\r\n     * @dev Gives permission to `to` to transfer `tokenId` token to another account.\r\n     * The approval is cleared when the token is transferred.\r\n     *\r\n     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - The caller must own the token or be an approved operator.\r\n     * - `tokenId` must exist.\r\n     *\r\n     * Emits an {Approval} event.\r\n     */\r\n    function approve(address to, uint256 tokenId) external;\r\n\r\n    /**\r\n     * @dev Approve or remove `operator` as an operator for the caller.\r\n     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - The `operator` cannot be the caller.\r\n     *\r\n     * Emits an {ApprovalForAll} event.\r\n     */\r\n    function setApprovalForAll(address operator, bool _approved) external;\r\n\r\n    /**\r\n     * @dev Returns the account approved for `tokenId` token.\r\n     *\r\n     * Requirements:\r\n     *\r\n     * - `tokenId` must exist.\r\n     */\r\n    function getApproved(uint256 tokenId)\r\n        external\r\n        view\r\n        returns (address operator);\r\n\r\n    /**\r\n     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\r\n     *\r\n     * See {setApprovalForAll}\r\n     */\r\n    function isApprovedForAll(address owner, address operator)\r\n        external\r\n        view\r\n        returns (bool);\r\n}\r\n"
      },
      "operator-filter-registry/src/DefaultOperatorFilterer.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.13;\n\nimport {OperatorFilterer} from \"./OperatorFilterer.sol\";\nimport {CANONICAL_CORI_SUBSCRIPTION} from \"./lib/Constants.sol\";\n/**\n * @title  DefaultOperatorFilterer\n * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription.\n * @dev    Please note that if your token contract does not provide an owner with EIP-173, it must provide\n *         administration methods on the contract itself to interact with the registry otherwise the subscription\n *         will be locked to the options set during construction.\n */\n\nabstract contract DefaultOperatorFilterer is OperatorFilterer {\n    /// @dev The constructor that is called when the contract is being deployed.\n    constructor() OperatorFilterer(CANONICAL_CORI_SUBSCRIPTION, true) {}\n}\n"
      },
      "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"
      },
      "operator-filter-registry/src/lib/Constants.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.13;\n\naddress constant CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS = 0x000000000000AAeB6D7670E522A718067333cd4E;\naddress constant CANONICAL_CORI_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;\n"
      },
      "operator-filter-registry/src/OperatorFilterer.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.13;\n\nimport {IOperatorFilterRegistry} from \"./IOperatorFilterRegistry.sol\";\nimport {CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS} from \"./lib/Constants.sol\";\n/**\n * @title  OperatorFilterer\n * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another\n *         registrant's entries in the OperatorFilterRegistry.\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 *         Please note that if your token contract does not provide an owner with EIP-173, it must provide\n *         administration methods on the contract itself to interact with the registry otherwise the subscription\n *         will be locked to the options set during construction.\n */\n\nabstract contract OperatorFilterer {\n    /// @dev Emitted when an operator is not allowed.\n    error OperatorNotAllowed(address operator);\n\n    IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY =\n        IOperatorFilterRegistry(CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS);\n\n    /// @dev The constructor that is called when the contract is being deployed.\n    constructor(address subscriptionOrRegistrantToCopy, bool subscribe) {\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 (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     * @dev A helper function to check if an 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 function to check if an 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 an 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 contracts\n            // may specify their own OperatorFilterRegistry implementations, which may behave differently\n            if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) {\n                revert OperatorNotAllowed(operator);\n            }\n        }\n    }\n}\n"
      }
    },
    "settings": {
      "evmVersion": "paris",
      "optimizer": {
        "enabled": false,
        "runs": 200
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "libraries": {}
    }
  }}