creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "src/templates/cloneable/erc721c/merkle/mutable-minter-royalties/NFT.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\n\nimport \"../../ERC721CMetadataInitializable.sol\";\nimport \"@limitbreak/creator-token-standards/minting/MerkleWhitelistMint.sol\";\nimport \"@limitbreak/creator-token-standards/programmable-royalties/MutableMinterRoyalties.sol\";\n\ncontract NFT is \n    ERC721CMetadataInitializable, \n    MerkleWhitelistMintInitializable,\n    MutableMinterRoyaltiesInitializable {\n\n    constructor() ERC721(\"\", \"\") {}\n\n    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721CInitializable, MutableMinterRoyaltiesBase) returns (bool) {\n        return super.supportsInterface(interfaceId);\n    }\n\n    function _mintToken(address to, uint256 tokenId) internal virtual override {\n        _onMinted(to, tokenId);\n        _mint(to, tokenId);\n    }\n}"
      },
      "src/templates/cloneable/erc721c/ERC721CMetadataInitializable.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\n\nimport \"@limitbreak/creator-token-standards/access/OwnableInitializable.sol\";\nimport \"@limitbreak/creator-token-standards/erc721c/ERC721C.sol\";\nimport \"@limitbreak/creator-token-standards/token/erc721/MetadataURI.sol\";\n\nabstract contract ERC721CMetadataInitializable is \n    OwnableInitializable, \n    MetadataURIInitializable, \n    ERC721CInitializable {\n    using Strings for uint256;\n\n    error AdventureFreeNFT__NonexistentToken();\n\n    /// @notice Returns tokenURI if baseURI is set\n    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\n        if(!_exists(tokenId)) {\n            revert AdventureFreeNFT__NonexistentToken();\n        }\n\n        string memory baseURI = _baseURI();\n        return bytes(baseURI).length > 0\n            ? string(abi.encodePacked(baseURI, tokenId.toString(), suffixURI))\n            : \"\";\n    }\n\n    /// @dev Required to return baseTokenURI for tokenURI\n    function _baseURI() internal view virtual override returns (string memory) {\n        return baseTokenURI;\n    }\n}"
      },
      "lib/creator-token-standards/src/minting/MerkleWhitelistMint.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\nimport \"./ClaimPeriodBase.sol\";\nimport \"./MaxSupply.sol\";\nimport \"@openzeppelin/contracts/utils/cryptography/MerkleProof.sol\";\n\n/**\n * @title MerkleWhitelistMint\n * @author Limit Break, Inc.\n * @notice Base functionality of a contract mix-in that may optionally be used with extend ERC-721 tokens with merkle-proof based whitelist minting capabilities.\n * @dev Inheriting contracts must implement `_mintToken`.\n *\n * @dev The leaf nodes of the merkle tree contain the address and quantity of tokens that may be minted by that address.\n *      Duplicate addresses are not permitted.  For instance, address(Bob) may only appear once in the merkle tree.\n *      If address(Bob) appears more than once, Bob will be able to claim from only one of the leaves that contain his \n *      address. In the event a mistake is made and duplicates are included in the merkle tree, the owner of the \n *      contract may be able to de-duplicate the tree and submit a new root, provided \n *      `_remainingNumberOfMerkleRootChanges` is greater than 0. The number of permitted merkle root changes is set \n *      during contract construction/initialization, so take this into account when deploying your contracts.\n */\nabstract contract MerkleWhitelistMintBase is ClaimPeriodBase, MaxSupplyBase {\n    error MerkleWhitelistMint__AddressHasAlreadyClaimed();\n    error MerkleWhitelistMint__CannotClaimMoreThanMaximumAmountOfMerkleMints();\n    error MerkleWhitelistMint__InvalidProof();\n    error MerkleWhitelistMint__MaxMintsMustBeGreaterThanZero();\n    error MerkleWhitelistMint__MerkleRootCannotBeZero();\n    error MerkleWhitelistMint__MerkleRootHasNotBeenInitialized();\n    error MerkleWhitelistMint__MerkleRootImmutable();\n    error MerkleWhitelistMint__PermittedNumberOfMerkleRootChangesMustBeGreaterThanZero();\n\n    /// @dev The number of times the merkle root may be updated\n    uint256 private _remainingNumberOfMerkleRootChanges;\n\n    /// @dev This is the root ERC-721 contract from which claims can be made\n    bytes32 private _merkleRoot;\n\n    /// @dev This is the current amount of tokens mintable via merkle whitelist claims\n    uint256 private _remainingMerkleMints;\n\n    /// @dev Mapping that tracks whether or not an address has claimed their whitelist mint\n    mapping (address => bool) private whitelistClaimed;\n\n    /// @notice Emitted when a merkle root is updated\n    event MerkleRootUpdated(bytes32 merkleRoot_);\n\n    /// @notice Mints the specified quantity to the calling address if the submitted merkle proof successfully verifies the reserved quantity for the caller in the whitelist.\n    ///\n    /// Throws when the claim period has not opened.\n    /// Throws when the claim period has closed.\n    /// Throws if a merkle root has not been set.\n    /// Throws if the caller has already successfully claimed.\n    /// Throws if the quantity minted plus amount already minted exceeds the maximum amount claimable via merkle root.\n    /// Throws if the submitted merkle proof does not successfully verify the reserved quantity for the caller.\n    function whitelistMint(uint256 quantity, bytes32[] calldata merkleProof_) external {\n        _requireClaimsOpen();\n\n        bytes32 merkleRootCache = _merkleRoot;\n\n        if(merkleRootCache == bytes32(0)) {\n            revert MerkleWhitelistMint__MerkleRootHasNotBeenInitialized();\n        }\n\n        if(whitelistClaimed[_msgSender()]) {\n            revert MerkleWhitelistMint__AddressHasAlreadyClaimed();\n        }\n\n        uint256 supplyAfterMint = mintedSupply() + quantity;\n\n        if(quantity > _remainingMerkleMints) {\n            revert MerkleWhitelistMint__CannotClaimMoreThanMaximumAmountOfMerkleMints();\n        }\n        _requireLessThanMaxSupply(supplyAfterMint);\n\n        if(!MerkleProof.verify(merkleProof_, merkleRootCache, keccak256(abi.encodePacked(_msgSender(), quantity)))) {\n            revert MerkleWhitelistMint__InvalidProof();\n        }\n\n        whitelistClaimed[_msgSender()] = true;\n\n        unchecked {\n            _remainingMerkleMints -= quantity;\n        }\n\n        _mintBatch(_msgSender(), quantity);\n    }\n\n    /// @notice Update the merkle root if the merkle root was marked as changeable during initialization\n    ///\n    /// Throws if the `merkleRootChangable` boolean is false\n    /// Throws if provided merkle root is 0\n    function setMerkleRoot(bytes32 merkleRoot_) external {\n        _requireCallerIsContractOwner();\n\n        if(_remainingNumberOfMerkleRootChanges == 0) {\n            revert MerkleWhitelistMint__MerkleRootImmutable();\n        }\n\n        if(merkleRoot_ == bytes32(0)) {\n            revert MerkleWhitelistMint__MerkleRootCannotBeZero();\n        }\n\n        _merkleRoot = merkleRoot_;\n\n        emit MerkleRootUpdated(merkleRoot_);\n\n        unchecked {\n            _remainingNumberOfMerkleRootChanges--;\n        }\n    }\n\n    /// @notice Returns the merkle root\n    function getMerkleRoot() external view returns (bytes32) {\n        return _merkleRoot;\n    }\n\n    /// @notice Returns the remaining amount of token mints via merkle claiming\n    function remainingMerkleMints() external view returns (uint256) {\n        return _remainingMerkleMints;\n    }\n\n    /// @notice Returns true if the account already claimed their whitelist mint, false otherwise\n    function isWhitelistClaimed(address account) external view returns (bool) {\n        return whitelistClaimed[account];\n    }\n\n    function _setMaxMerkleMintsAndPermittedNumberOfMerkleRootChanges(\n        uint256 maxMerkleMints_, \n        uint256 permittedNumberOfMerkleRootChanges_) internal {\n\n        if(maxMerkleMints_ == 0) {\n            revert MerkleWhitelistMint__MaxMintsMustBeGreaterThanZero();\n        }\n\n        if (permittedNumberOfMerkleRootChanges_ == 0) {\n            revert MerkleWhitelistMint__PermittedNumberOfMerkleRootChangesMustBeGreaterThanZero();\n        }\n\n        _remainingMerkleMints = maxMerkleMints_;\n        _remainingNumberOfMerkleRootChanges = permittedNumberOfMerkleRootChanges_;\n\n        _initializeNextTokenIdCounter();\n    }\n}\n\n/**\n * @title MerkleWhitelistMint\n * @author Limit Break, Inc.\n * @notice Constructable MerkleWhitelistMint Contract implementation.\n */\nabstract contract MerkleWhitelistMint is MerkleWhitelistMintBase, MaxSupply {\n    constructor(uint256 maxMerkleMints_, uint256 permittedNumberOfMerkleRootChanges_) {\n        _setMaxMerkleMintsAndPermittedNumberOfMerkleRootChanges(\n            maxMerkleMints_,\n            permittedNumberOfMerkleRootChanges_\n        );\n    }\n\n    function maxSupply() public view override(MaxSupplyBase, MaxSupply) returns (uint256) {\n        return _maxSupplyImmutable;\n    }\n}\n\n/**\n * @title MerkleWhitelistMintInitializable\n * @author Limit Break, Inc.\n * @notice Initializable MerkleWhitelistMint Contract implementation to allow for EIP-1167 clones. \n */\nabstract contract MerkleWhitelistMintInitializable is MerkleWhitelistMintBase, MaxSupplyInitializable {\n    \n    error MerkleWhitelistMintInitializable__MerkleSupplyAlreadyInitialized();\n\n    /// @dev Flag indicating that the merkle mint max supply has been initialized.\n    bool private _merkleSupplyInitialized;\n\n    function initializeMaxMerkleMintsAndPermittedNumberOfMerkleRootChanges(\n        uint256 maxMerkleMints_, \n        uint256 permittedNumberOfMerkleRootChanges_) public {\n        _requireCallerIsContractOwner();\n\n        if(_merkleSupplyInitialized) {\n            revert MerkleWhitelistMintInitializable__MerkleSupplyAlreadyInitialized();\n        }\n\n        _merkleSupplyInitialized = true;\n\n        _setMaxMerkleMintsAndPermittedNumberOfMerkleRootChanges(\n            maxMerkleMints_,\n            permittedNumberOfMerkleRootChanges_\n        );\n    }\n}"
      },
      "lib/creator-token-standards/src/programmable-royalties/MutableMinterRoyalties.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\nimport \"../access/OwnablePermissions.sol\";\nimport \"@openzeppelin/contracts/interfaces/IERC2981.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\n/**\n * @title MutableMinterRoyaltiesBase\n * @author Limit Break, Inc.\n * @dev Base functionality of an NFT mix-in contract implementing programmable royalties for minters, allowing the minter of each token ID to \n *      update the royalty fee percentage.\n */\nabstract contract MutableMinterRoyaltiesBase is IERC2981, ERC165 {\n\n    error MutableMinterRoyalties__MinterCannotBeZeroAddress();\n    error MutableMinterRoyalties__MinterHasAlreadyBeenAssignedToTokenId();\n    error MutableMinterRoyalties__OnlyMinterCanChangeRoyaltyFee();\n    error MutableMinterRoyalties__RoyaltyFeeWillExceedSalePrice();\n\n    struct RoyaltyInfo {\n        address receiver;\n        uint96 royaltyFraction;\n    }\n\n    uint96 public constant FEE_DENOMINATOR = 10_000;\n    uint96 private _defaultRoyaltyFeeNumerator;\n\n    mapping (uint256 => RoyaltyInfo) private _tokenRoyaltyInfo;\n\n    /// @dev Emitted when royalty is set.\n    event RoyaltySet(uint256 indexed tokenId, address indexed receiver, uint96 feeNumerator);\n\n    /**\n     * @notice Allows the minter to update the royalty fee percentage for a specific token ID.\n     * @dev The caller must be the minter of the specified token ID.\n     * @dev Throws when royaltyFeeNumerator is greater than FEE_DENOMINATOR\n     * @dev Throws when the caller is not the minter of the specified token ID\n     * @param tokenId The token ID\n     * @param royaltyFeeNumerator The new royalty fee numerator\n     \n     */\n    function setRoyaltyFee(uint256 tokenId, uint96 royaltyFeeNumerator) external {\n        if (royaltyFeeNumerator > FEE_DENOMINATOR) {\n            revert MutableMinterRoyalties__RoyaltyFeeWillExceedSalePrice();\n        }\n\n        RoyaltyInfo storage royalty = _tokenRoyaltyInfo[tokenId];\n\n        if (royalty.receiver != msg.sender) {\n            revert MutableMinterRoyalties__OnlyMinterCanChangeRoyaltyFee();\n        }\n\n        royalty.royaltyFraction = royaltyFeeNumerator;\n\n        emit RoyaltySet(tokenId, msg.sender, royaltyFeeNumerator);\n    }\n\n    /**\n     * @notice Indicates whether the contract implements the specified interface.\n     * @dev Overrides supportsInterface in ERC165.\n     * @param interfaceId The interface id\n     * @return true if the contract implements the specified interface, false otherwise\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) {\n        return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId);\n    }\n\n    function defaultRoyaltyFeeNumerator() public virtual view returns (uint96) {\n        return _defaultRoyaltyFeeNumerator;\n    }\n\n    /**\n     * @notice Returns the royalty info for a given token ID and sale price.\n     * @dev Implements the IERC2981 interface.\n     * @param tokenId The token ID\n     * @param salePrice The sale price\n     * @return receiver The minter's address\n     * @return royaltyAmount The royalty amount\n     */\n    function royaltyInfo(\n        uint256 tokenId,\n        uint256 salePrice\n    ) external view override returns (address receiver, uint256 royaltyAmount) {\n        RoyaltyInfo memory royalty = _tokenRoyaltyInfo[tokenId];\n\n        if (royalty.receiver == address(0)) {\n            royalty.royaltyFraction = defaultRoyaltyFeeNumerator();\n        }\n\n        return (royalty.receiver, (salePrice * royalty.royaltyFraction) / FEE_DENOMINATOR);\n    }\n\n    /**\n     * @dev Sets the minter's address and royalty fraction for the specified token ID in the _tokenRoyaltyInfo mapping \n     *      when a new token is minted.\n     * @dev Throws when minter is the zero address\n     * @dev Throws when the minter has already been assigned to the specified token ID\n     * @param minter The address of the minter\n     * @param tokenId The token ID\n     */\n    function _onMinted(address minter, uint256 tokenId) internal {\n        if (minter == address(0)) {\n            revert MutableMinterRoyalties__MinterCannotBeZeroAddress();\n        }\n        \n        if (_tokenRoyaltyInfo[tokenId].receiver != address(0)) {\n            revert MutableMinterRoyalties__MinterHasAlreadyBeenAssignedToTokenId();\n        }\n\n        uint96 defaultRoyaltyFeeNumerator_ = defaultRoyaltyFeeNumerator();\n\n        _tokenRoyaltyInfo[tokenId] = RoyaltyInfo({\n            receiver: minter,\n            royaltyFraction: defaultRoyaltyFeeNumerator_\n        });\n\n        emit RoyaltySet(tokenId, minter, defaultRoyaltyFeeNumerator_);\n    }\n\n    /**\n     * @dev Removes the royalty information from the _tokenRoyaltyInfo mapping for the specified token ID when a token \n     *      is burned.\n     * @param tokenId The token ID\n     */\n    function _onBurned(uint256 tokenId) internal {\n        delete _tokenRoyaltyInfo[tokenId];\n\n        emit RoyaltySet(tokenId, address(0), defaultRoyaltyFeeNumerator());\n    }\n\n    function _setDefaultRoyaltyFee(uint96 defaultRoyaltyFeeNumerator_) internal {\n        if(defaultRoyaltyFeeNumerator_ > FEE_DENOMINATOR) {\n            revert MutableMinterRoyalties__RoyaltyFeeWillExceedSalePrice();\n        }\n\n        _defaultRoyaltyFeeNumerator = defaultRoyaltyFeeNumerator_;\n    }\n}\n\n/**\n * @title MutableMinterRoyalties\n * @author Limit Break, Inc.\n * @notice Constructable MutableMinterRoyalties Contract implementation.\n */\nabstract contract MutableMinterRoyalties is MutableMinterRoyaltiesBase {\n\n    uint96 private immutable _defaultRoyaltyFeeNumeratorImmutable;\n\n    constructor(uint96 defaultRoyaltyFeeNumerator_) {\n        _setDefaultRoyaltyFee(defaultRoyaltyFeeNumerator_);\n        _defaultRoyaltyFeeNumeratorImmutable = defaultRoyaltyFeeNumerator_;\n    }\n\n    function defaultRoyaltyFeeNumerator() public view override returns (uint96) {\n        return _defaultRoyaltyFeeNumeratorImmutable;\n    }\n}\n\n/**\n * @title MutableMinterRoyaltiesInitializable\n * @author Limit Break, Inc.\n * @notice Initializable MutableMinterRoyalties Contract implementation to allow for EIP-1167 clones. \n */\nabstract contract MutableMinterRoyaltiesInitializable is OwnablePermissions, MutableMinterRoyaltiesBase {\n\n    error MutableMinterRoyaltiesInitializable__DefaultMinterRoyaltyFeeAlreadyInitialized();\n\n    bool private _defaultMinterRoyaltyFeeInitialized;\n\n    function initializeDefaultMinterRoyaltyFee(uint96 defaultRoyaltyFeeNumerator_) public {\n        _requireCallerIsContractOwner();\n\n        if(_defaultMinterRoyaltyFeeInitialized) {\n            revert MutableMinterRoyaltiesInitializable__DefaultMinterRoyaltyFeeAlreadyInitialized();\n        }\n\n        _defaultMinterRoyaltyFeeInitialized = true;\n\n        _setDefaultRoyaltyFee(defaultRoyaltyFeeNumerator_);\n    }\n}"
      },
      "lib/creator-token-standards/src/access/OwnableInitializable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.4;\n\nimport \"./OwnablePermissions.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\nabstract contract OwnableInitializable is OwnablePermissions, Ownable {\n\n    error InitializableOwnable__OwnerAlreadyInitialized();\n\n    bool private _ownerInitialized;\n\n    /**\n     * @dev When EIP-1167 is used to clone a contract that inherits Ownable permissions,\n     * this is required to assign the initial contract owner, as the constructor is\n     * not called during the cloning process.\n     */\n    function initializeOwner(address owner_) public {\n      if (owner() != address(0) || _ownerInitialized) {\n          revert InitializableOwnable__OwnerAlreadyInitialized();\n      }\n\n      _transferOwnership(owner_);\n      _ownerInitialized = true;\n    }\n\n    function renounceOwnership() public override {\n        super.renounceOwnership();\n\n        // Ensure _ownerInitialized flag is true to prevent recapture of ownership.\n        _ownerInitialized = true;\n    }\n\n    function _requireCallerIsContractOwner() internal view virtual override {\n        _checkOwner();\n    }\n}\n"
      },
      "lib/creator-token-standards/src/erc721c/ERC721C.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\nimport \"../utils/AutomaticValidatorTransferApproval.sol\";\nimport \"../utils/CreatorTokenBase.sol\";\nimport \"../token/erc721/ERC721OpenZeppelin.sol\";\nimport \"../interfaces/ITransferValidatorSetTokenType.sol\";\nimport {TOKEN_TYPE_ERC721} from \"@limitbreak/permit-c/Constants.sol\";\n\n/**\n * @title ERC721C\n * @author Limit Break, Inc.\n * @notice Extends OpenZeppelin's ERC721 implementation with Creator Token functionality, which\n *         allows the contract owner to update the transfer validation logic by managing a security policy in\n *         an external transfer validation security policy registry.  See {CreatorTokenTransferValidator}.\n */\nabstract contract ERC721C is ERC721OpenZeppelin, CreatorTokenBase, AutomaticValidatorTransferApproval {\n\n    /**\n     * @notice Overrides behavior of isApprovedFor all such that if an operator is not explicitly approved\n     *         for all, the contract owner can optionally auto-approve the 721-C transfer validator for transfers.\n     */\n    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool isApproved) {\n        isApproved = super.isApprovedForAll(owner, operator);\n\n        if (!isApproved) {\n            if (autoApproveTransfersFromValidator) {\n                isApproved = operator == address(getTransferValidator());\n            }\n        }\n    }\n\n    /**\n     * @notice Indicates whether the contract implements the specified interface.\n     * @dev Overrides supportsInterface in ERC165.\n     * @param interfaceId The interface id\n     * @return true if the contract implements the specified interface, false otherwise\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n        return \n        interfaceId == type(ICreatorToken).interfaceId || \n        interfaceId == type(ICreatorTokenLegacy).interfaceId || \n        super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @notice Returns the function selector for the transfer validator's validation function to be called \n     * @notice for transaction simulation. \n     */\n    function getTransferValidationFunction() external pure returns (bytes4 functionSignature, bool isViewFunction) {\n        functionSignature = bytes4(keccak256(\"validateTransfer(address,address,address,uint256)\"));\n        isViewFunction = true;\n    }\n\n    /// @dev Ties the open-zeppelin _beforeTokenTransfer hook to more granular transfer validation logic\n    function _beforeTokenTransfer(\n        address from,\n        address to,\n        uint256 firstTokenId,\n        uint256 batchSize) internal virtual override {\n        for (uint256 i = 0; i < batchSize;) {\n            _validateBeforeTransfer(from, to, firstTokenId + i);\n            unchecked {\n                ++i;\n            }\n        }\n    }\n\n    /// @dev Ties the open-zeppelin _afterTokenTransfer hook to more granular transfer validation logic\n    function _afterTokenTransfer(\n        address from,\n        address to,\n        uint256 firstTokenId,\n        uint256 batchSize) internal virtual override {\n        for (uint256 i = 0; i < batchSize;) {\n            _validateAfterTransfer(from, to, firstTokenId + i);\n            unchecked {\n                ++i;\n            }\n        }\n    }\n\n    function _tokenType() internal pure override returns(uint16) {\n        return uint16(TOKEN_TYPE_ERC721);\n    }\n}\n\n/**\n * @title ERC721CInitializable\n * @author Limit Break, Inc.\n * @notice Initializable implementation of ERC721C to allow for EIP-1167 proxy clones.\n */\nabstract contract ERC721CInitializable is ERC721OpenZeppelinInitializable, CreatorTokenBase, AutomaticValidatorTransferApproval {\n\n    function initializeERC721(string memory name_, string memory symbol_) public override {\n        super.initializeERC721(name_, symbol_);\n\n        _emitDefaultTransferValidator();\n        _registerTokenType(getTransferValidator());\n    }\n\n    /**\n     * @notice Overrides behavior of isApprovedFor all such that if an operator is not explicitly approved\n     *         for all, the contract owner can optionally auto-approve the 721-C transfer validator for transfers.\n     */\n    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool isApproved) {\n        isApproved = super.isApprovedForAll(owner, operator);\n\n        if (!isApproved) {\n            if (autoApproveTransfersFromValidator) {\n                isApproved = operator == address(getTransferValidator());\n            }\n        }\n    }\n\n    /**\n     * @notice Indicates whether the contract implements the specified interface.\n     * @dev Overrides supportsInterface in ERC165.\n     * @param interfaceId The interface id\n     * @return true if the contract implements the specified interface, false otherwise\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n        return \n        interfaceId == type(ICreatorToken).interfaceId || \n        interfaceId == type(ICreatorTokenLegacy).interfaceId || \n        super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @notice Returns the function selector for the transfer validator's validation function to be called \n     * @notice for transaction simulation. \n     */\n    function getTransferValidationFunction() external pure returns (bytes4 functionSignature, bool isViewFunction) {\n        functionSignature = bytes4(keccak256(\"validateTransfer(address,address,address,uint256)\"));\n        isViewFunction = true;\n    }\n\n    /// @dev Ties the open-zeppelin _beforeTokenTransfer hook to more granular transfer validation logic\n    function _beforeTokenTransfer(\n        address from,\n        address to,\n        uint256 firstTokenId,\n        uint256 batchSize) internal virtual override {\n        for (uint256 i = 0; i < batchSize;) {\n            _validateBeforeTransfer(from, to, firstTokenId + i);\n            unchecked {\n                ++i;\n            }\n        }\n    }\n\n    /// @dev Ties the open-zeppelin _afterTokenTransfer hook to more granular transfer validation logic\n    function _afterTokenTransfer(\n        address from,\n        address to,\n        uint256 firstTokenId,\n        uint256 batchSize) internal virtual override {\n        for (uint256 i = 0; i < batchSize;) {\n            _validateAfterTransfer(from, to, firstTokenId + i);\n            unchecked {\n                ++i;\n            }\n        }\n    }\n\n    function _tokenType() internal pure override returns(uint16) {\n        return uint16(TOKEN_TYPE_ERC721);\n    }\n}"
      },
      "lib/creator-token-standards/src/token/erc721/MetadataURI.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\nimport \"../../access/OwnablePermissions.sol\";\n\nabstract contract MetadataURI is OwnablePermissions {\n\n    /// @dev Base token uri\n    string public baseTokenURI;\n\n    /// @dev Token uri suffix/extension\n    string public suffixURI;\n\n    /// @dev Emitted when base URI is set.\n    event BaseURISet(string baseTokenURI);\n\n    /// @dev Emitted when suffix URI is set.\n    event SuffixURISet(string suffixURI);\n\n    /// @notice Sets base URI\n    function setBaseURI(string memory baseTokenURI_) public {\n        _requireCallerIsContractOwner();\n        baseTokenURI = baseTokenURI_;\n        emit BaseURISet(baseTokenURI_);\n    }\n\n    /// @notice Sets suffix URI\n    function setSuffixURI(string memory suffixURI_) public {\n        _requireCallerIsContractOwner();\n        suffixURI = suffixURI_;\n        emit SuffixURISet(suffixURI_);\n    }\n}\n\nabstract contract MetadataURIInitializable is MetadataURI {\n    error MetadataURIInitializable__URIAlreadyInitialized();\n\n    bool private _uriInitialized;\n\n    /// @dev Initializes parameters of tokens with uri values.\n    /// These cannot be set in the constructor because this contract is optionally compatible with EIP-1167.\n    function initializeURI(string memory baseURI_, string memory suffixURI_) public {\n        _requireCallerIsContractOwner();\n\n        if(_uriInitialized) {\n            revert MetadataURIInitializable__URIAlreadyInitialized();\n        }\n\n        _uriInitialized = true;\n\n        baseTokenURI = baseURI_;\n        emit BaseURISet(baseURI_);\n\n        suffixURI = suffixURI_;\n        emit SuffixURISet(suffixURI_);\n    }\n}"
      },
      "lib/creator-token-standards/src/minting/ClaimPeriodBase.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\nimport \"../access/OwnablePermissions.sol\";\n\n/**\n * @title ClaimPeriodBase\n * @author Limit Break, Inc.\n * @notice In order to support multiple contracts with enforced claim periods, the claim period has been moved to this base contract.\n *\n */\nabstract contract ClaimPeriodBase is OwnablePermissions {\n\n    error ClaimPeriodBase__ClaimsMustBeClosedToReopen();\n    error ClaimPeriodBase__ClaimPeriodIsNotOpen();\n    error ClaimPeriodBase__ClaimPeriodMustBeClosedInTheFuture();\n\n    /// @dev True if claims have been initalized, false otherwise.\n    bool private claimPeriodInitialized;\n\n    /// @dev The timestamp when the claim period closes - when this value is zero and claims are open, the claim period is open indefinitely\n    uint256 private claimPeriodClosingTimestamp;\n\n    /// @dev Emitted when a claim period is scheduled to be closed.\n    event ClaimPeriodClosing(uint256 claimPeriodClosingTimestamp);\n\n    /// @dev Emitted when a claim period is scheduled to be opened.\n    event ClaimPeriodOpened(uint256 claimPeriodClosingTimestamp);\n\n    /// @dev Opens the claim period.  Claims can be closed with a custom amount of warning time using the closeClaims function.\n    /// Accepts a claimPeriodClosingTimestamp_ timestamp which will open the period ending at that time (in seconds)\n    /// NOTE: Use as high a window as possible to prevent gas wars for claiming\n    /// For an unbounded claim window, pass in type(uint256).max\n    function openClaims(uint256 claimPeriodClosingTimestamp_) external {\n        _requireCallerIsContractOwner();\n\n        if(claimPeriodClosingTimestamp_ <= block.timestamp) {\n            revert ClaimPeriodBase__ClaimPeriodMustBeClosedInTheFuture();\n        }\n\n        _onClaimPeriodOpening();\n\n        if(claimPeriodInitialized) {\n            if(block.timestamp < claimPeriodClosingTimestamp) {\n                revert ClaimPeriodBase__ClaimsMustBeClosedToReopen();\n            }\n        } else {\n            claimPeriodInitialized = true;\n        }\n\n        claimPeriodClosingTimestamp = claimPeriodClosingTimestamp_;\n\n        emit ClaimPeriodOpened(claimPeriodClosingTimestamp_);\n    }\n\n    /// @dev Closes claims at a specified timestamp.\n    ///\n    /// Throws when the specified timestamp is not in the future.\n    function closeClaims(uint256 claimPeriodClosingTimestamp_) external {\n        _requireCallerIsContractOwner();\n\n        _requireClaimsOpen();\n\n        if(claimPeriodClosingTimestamp_ <= block.timestamp) {\n            revert ClaimPeriodBase__ClaimPeriodMustBeClosedInTheFuture();\n        }\n\n        claimPeriodClosingTimestamp = claimPeriodClosingTimestamp_;\n        \n        emit ClaimPeriodClosing(claimPeriodClosingTimestamp_);\n    }\n\n    /// @dev Returns the Claim Period Timestamp\n    function getClaimPeriodClosingTimestamp() external view returns (uint256) {\n        return claimPeriodClosingTimestamp;\n    }\n\n    /// @notice Returns true if the claim period has been opened, false otherwise\n    function isClaimPeriodOpen() external view returns (bool) {\n        return _isClaimPeriodOpen();\n    }\n\n    /// @dev Returns true if claim period is open, false otherwise.\n    function _isClaimPeriodOpen() internal view returns (bool) {\n        return claimPeriodInitialized && block.timestamp < claimPeriodClosingTimestamp;\n    }\n\n    /// @dev Validates that the claim period is open.\n    /// Throws if claims are not open.\n    function _requireClaimsOpen() internal view {\n        if(!_isClaimPeriodOpen()) {\n            revert ClaimPeriodBase__ClaimPeriodIsNotOpen();\n        }\n    }\n\n    /// @dev Hook to allow inheriting contracts to perform state validation when opening the claim period\n    function _onClaimPeriodOpening() internal virtual {}\n}"
      },
      "lib/creator-token-standards/src/minting/MaxSupply.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\nimport \"../access/OwnablePermissions.sol\";\nimport \"./MintTokenBase.sol\";\nimport \"./SequentialMintBase.sol\";\n\n/**\n * @title MaxSupplyBase\n * @author Limit Break, Inc.\n * @notice In order to support multiple contracts with a global maximum supply, the max supply has been moved to this base contract.\n * @dev Inheriting contracts must implement `_mintToken`.\n */\nabstract contract MaxSupplyBase is OwnablePermissions, MintTokenBase, SequentialMintBase {\n\n    error MaxSupplyBase__CannotClaimMoreThanMaximumAmountOfOwnerMints();\n    error MaxSupplyBase__CannotMintToAddressZero();\n    error MaxSupplyBase__MaxSupplyCannotBeSetToMaxUint256();\n    error MaxSupplyBase__MaxSupplyExceeded();\n    error MaxSupplyBase__MintedQuantityMustBeGreaterThanZero();\n\n    /// @dev The global maximum supply for a contract.  Inheriting contracts must reference this maximum supply in addition to any other\n    /// @dev constraints they are looking to enforce.\n    /// @dev If `_maxSupply` is set to zero, the global max supply will match the combined max allowable mints for each minting mix-in used.\n    /// @dev If the `_maxSupply` is below the total sum of allowable mints, the `_maxSupply` will be prioritized.\n    uint256 private _maxSupply;\n\n    /// @dev The number of tokens remaining to mint via owner mint.\n    /// @dev This can be used to guarantee minting out by allowing the owner to mint unclaimed supply after the public mint is completed.\n    uint256 private _remainingOwnerMints;\n\n    /// @dev Emitted when the maximum supply is initialized\n    event MaxSupplyInitialized(uint256 maxSupply, uint256 maxOwnerMints);\n\n    /// @notice Mints the specified quantity to the provided address\n    ///\n    /// Throws when the caller is not the owner\n    /// Throws when provided quantity is zero\n    /// Throws when provided address is address zero\n    /// Throws if the quantity minted plus amount already minted exceeds the maximum amount mintable by the owner\n    function ownerMint(address to, uint256 quantity) external {\n        _requireCallerIsContractOwner();\n\n        if(to == address(0)) {\n            revert MaxSupplyBase__CannotMintToAddressZero();\n        }\n\n        if(quantity > _remainingOwnerMints) {\n            revert MaxSupplyBase__CannotClaimMoreThanMaximumAmountOfOwnerMints();\n        }\n        _requireLessThanMaxSupply(mintedSupply() + quantity);\n\n        unchecked {\n            _remainingOwnerMints -= quantity;\n        }\n        _mintBatch(to, quantity);\n    }\n\n    function maxSupply() public virtual view returns (uint256) {\n        return _maxSupply;\n    }\n\n    function remainingOwnerMints() public view returns (uint256) {\n        return _remainingOwnerMints;\n    }\n\n    function mintedSupply() public view returns (uint256) {\n        return getNextTokenId() - 1;\n    }\n\n    function _setMaxSupplyAndOwnerMints(uint256 maxSupply_, uint256 maxOwnerMints_) internal {\n        if(maxSupply_ == type(uint256).max) {\n            revert MaxSupplyBase__MaxSupplyCannotBeSetToMaxUint256();\n        }\n\n        _maxSupply = maxSupply_;\n        _remainingOwnerMints = maxOwnerMints_;\n\n        _initializeNextTokenIdCounter();\n\n        emit MaxSupplyInitialized(maxSupply_, maxOwnerMints_);\n    }\n\n    function _requireLessThanMaxSupply(uint256 supplyAfterMint) internal view {\n        uint256 maxSupplyCache = maxSupply();\n        if (maxSupplyCache > 0) {\n            if (supplyAfterMint > maxSupplyCache) {\n                revert MaxSupplyBase__MaxSupplyExceeded();\n            }\n        }\n    }\n\n    /// @dev Batch mints the specified quantity to the specified address\n    /// Throws if quantity is zero\n    /// Throws if `to` is a smart contract that does not implement IERC721 receiver\n    function _mintBatch(address to, uint256 quantity) internal returns (uint256 startTokenId, uint256 endTokenId) {\n        if(quantity == 0) {\n            revert MaxSupplyBase__MintedQuantityMustBeGreaterThanZero();\n        }\n        startTokenId = getNextTokenId();\n        unchecked {\n            endTokenId = startTokenId + quantity - 1;\n            _advanceNextTokenIdCounter(quantity);\n\n            for(uint256 i = 0; i < quantity; ++i) {\n                _mintToken(to, startTokenId + i);\n            }\n        }\n        return (startTokenId, endTokenId);\n    }\n}\n\n/**\n * @title MaxSupply\n * @author Limit Break, Inc.\n * @notice Constructable implementation of the MaxSupplyBase mixin.\n */\nabstract contract MaxSupply is MaxSupplyBase {\n\n    uint256 internal immutable _maxSupplyImmutable;\n\n    constructor(uint256 maxSupply_, uint256 maxOwnerMints_) {\n        _setMaxSupplyAndOwnerMints(maxSupply_, maxOwnerMints_);\n        _maxSupplyImmutable = maxSupply_;\n    }\n\n    function maxSupply() public virtual view override returns (uint256) {\n        return _maxSupplyImmutable;\n    }\n}\n\n/**\n * @title MaxSupplyInitializable\n * @author Limit Break, Inc.\n * @notice Initializable implementation of the MaxSupplyBase mixin to allow for EIP-1167 clones.\n */\nabstract contract MaxSupplyInitializable is MaxSupplyBase {\n\n    error InitializableMaxSupplyBase__MaxSupplyAlreadyInitialized();\n\n    /// @dev Boolean value set during initialization to prevent reinitializing the value.\n    bool private _maxSupplyInitialized;\n\n    function initializeMaxSupply(uint256 maxSupply_, uint256 maxOwnerMints_) external {\n        _requireCallerIsContractOwner();\n\n        if(_maxSupplyInitialized) {\n            revert InitializableMaxSupplyBase__MaxSupplyAlreadyInitialized();\n        }\n\n        _maxSupplyInitialized = true;\n\n        _setMaxSupplyAndOwnerMints(maxSupply_, maxOwnerMints_);        \n    }\n\n    function maxSupplyInitialized() public view returns (bool) {\n        return _maxSupplyInitialized;\n    }\n}\n"
      },
      "lib/openzeppelin-contracts/contracts/utils/cryptography/MerkleProof.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/MerkleProof.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev These functions deal with verification of Merkle Tree proofs.\n *\n * The tree and the proofs can be generated using our\n * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].\n * You will find a quickstart guide in the readme.\n *\n * WARNING: You should avoid using leaf values that are 64 bytes long prior to\n * hashing, or use a hash function other than keccak256 for hashing leaves.\n * This is because the concatenation of a sorted pair of internal nodes in\n * the merkle tree could be reinterpreted as a leaf value.\n * OpenZeppelin's JavaScript library generates merkle trees that are safe\n * against this attack out of the box.\n */\nlibrary MerkleProof {\n    /**\n     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree\n     * defined by `root`. For this, a `proof` must be provided, containing\n     * sibling hashes on the branch from the leaf to the root of the tree. Each\n     * pair of leaves and each pair of pre-images are assumed to be sorted.\n     */\n    function verify(\n        bytes32[] memory proof,\n        bytes32 root,\n        bytes32 leaf\n    ) internal pure returns (bool) {\n        return processProof(proof, leaf) == root;\n    }\n\n    /**\n     * @dev Calldata version of {verify}\n     *\n     * _Available since v4.7._\n     */\n    function verifyCalldata(\n        bytes32[] calldata proof,\n        bytes32 root,\n        bytes32 leaf\n    ) internal pure returns (bool) {\n        return processProofCalldata(proof, leaf) == root;\n    }\n\n    /**\n     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up\n     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt\n     * hash matches the root of the tree. When processing the proof, the pairs\n     * of leafs & pre-images are assumed to be sorted.\n     *\n     * _Available since v4.4._\n     */\n    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {\n        bytes32 computedHash = leaf;\n        for (uint256 i = 0; i < proof.length; i++) {\n            computedHash = _hashPair(computedHash, proof[i]);\n        }\n        return computedHash;\n    }\n\n    /**\n     * @dev Calldata version of {processProof}\n     *\n     * _Available since v4.7._\n     */\n    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {\n        bytes32 computedHash = leaf;\n        for (uint256 i = 0; i < proof.length; i++) {\n            computedHash = _hashPair(computedHash, proof[i]);\n        }\n        return computedHash;\n    }\n\n    /**\n     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by\n     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.\n     *\n     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.\n     *\n     * _Available since v4.7._\n     */\n    function multiProofVerify(\n        bytes32[] memory proof,\n        bool[] memory proofFlags,\n        bytes32 root,\n        bytes32[] memory leaves\n    ) internal pure returns (bool) {\n        return processMultiProof(proof, proofFlags, leaves) == root;\n    }\n\n    /**\n     * @dev Calldata version of {multiProofVerify}\n     *\n     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.\n     *\n     * _Available since v4.7._\n     */\n    function multiProofVerifyCalldata(\n        bytes32[] calldata proof,\n        bool[] calldata proofFlags,\n        bytes32 root,\n        bytes32[] memory leaves\n    ) internal pure returns (bool) {\n        return processMultiProofCalldata(proof, proofFlags, leaves) == root;\n    }\n\n    /**\n     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction\n     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another\n     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false\n     * respectively.\n     *\n     * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree\n     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the\n     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).\n     *\n     * _Available since v4.7._\n     */\n    function processMultiProof(\n        bytes32[] memory proof,\n        bool[] memory proofFlags,\n        bytes32[] memory leaves\n    ) internal pure returns (bytes32 merkleRoot) {\n        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by\n        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the\n        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of\n        // the merkle tree.\n        uint256 leavesLen = leaves.length;\n        uint256 totalHashes = proofFlags.length;\n\n        // Check proof validity.\n        require(leavesLen + proof.length - 1 == totalHashes, \"MerkleProof: invalid multiproof\");\n\n        // The xxxPos values are \"pointers\" to the next value to consume in each array. All accesses are done using\n        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's \"pop\".\n        bytes32[] memory hashes = new bytes32[](totalHashes);\n        uint256 leafPos = 0;\n        uint256 hashPos = 0;\n        uint256 proofPos = 0;\n        // At each step, we compute the next hash using two values:\n        // - a value from the \"main queue\". If not all leaves have been consumed, we get the next leaf, otherwise we\n        //   get the next hash.\n        // - depending on the flag, either another value for the \"main queue\" (merging branches) or an element from the\n        //   `proof` array.\n        for (uint256 i = 0; i < totalHashes; i++) {\n            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];\n            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];\n            hashes[i] = _hashPair(a, b);\n        }\n\n        if (totalHashes > 0) {\n            return hashes[totalHashes - 1];\n        } else if (leavesLen > 0) {\n            return leaves[0];\n        } else {\n            return proof[0];\n        }\n    }\n\n    /**\n     * @dev Calldata version of {processMultiProof}.\n     *\n     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.\n     *\n     * _Available since v4.7._\n     */\n    function processMultiProofCalldata(\n        bytes32[] calldata proof,\n        bool[] calldata proofFlags,\n        bytes32[] memory leaves\n    ) internal pure returns (bytes32 merkleRoot) {\n        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by\n        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the\n        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of\n        // the merkle tree.\n        uint256 leavesLen = leaves.length;\n        uint256 totalHashes = proofFlags.length;\n\n        // Check proof validity.\n        require(leavesLen + proof.length - 1 == totalHashes, \"MerkleProof: invalid multiproof\");\n\n        // The xxxPos values are \"pointers\" to the next value to consume in each array. All accesses are done using\n        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's \"pop\".\n        bytes32[] memory hashes = new bytes32[](totalHashes);\n        uint256 leafPos = 0;\n        uint256 hashPos = 0;\n        uint256 proofPos = 0;\n        // At each step, we compute the next hash using two values:\n        // - a value from the \"main queue\". If not all leaves have been consumed, we get the next leaf, otherwise we\n        //   get the next hash.\n        // - depending on the flag, either another value for the \"main queue\" (merging branches) or an element from the\n        //   `proof` array.\n        for (uint256 i = 0; i < totalHashes; i++) {\n            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];\n            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];\n            hashes[i] = _hashPair(a, b);\n        }\n\n        if (totalHashes > 0) {\n            return hashes[totalHashes - 1];\n        } else if (leavesLen > 0) {\n            return leaves[0];\n        } else {\n            return proof[0];\n        }\n    }\n\n    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {\n        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);\n    }\n\n    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            mstore(0x00, a)\n            mstore(0x20, b)\n            value := keccak256(0x00, 0x40)\n        }\n    }\n}\n"
      },
      "lib/creator-token-standards/src/access/OwnablePermissions.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\";\n\nabstract contract OwnablePermissions is Context {\n    function _requireCallerIsContractOwner() internal view virtual;\n}\n"
      },
      "lib/openzeppelin-contracts/contracts/interfaces/IERC2981.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Interface for the NFT Royalty Standard.\n *\n * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal\n * support for royalty payments across all NFT marketplaces and ecosystem participants.\n *\n * _Available since v4.5._\n */\ninterface IERC2981 is IERC165 {\n    /**\n     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of\n     * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.\n     */\n    function royaltyInfo(uint256 tokenId, uint256 salePrice)\n        external\n        view\n        returns (address receiver, uint256 royaltyAmount);\n}\n"
      },
      "lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n        return interfaceId == type(IERC165).interfaceId;\n    }\n}\n"
      },
      "lib/openzeppelin-contracts/contracts/access/Ownable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the deployer as the initial owner.\n     */\n    constructor() {\n        _transferOwnership(_msgSender());\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        _checkOwner();\n        _;\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if the sender is not the owner.\n     */\n    function _checkOwner() internal view virtual {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby removing any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n}\n"
      },
      "lib/creator-token-standards/src/utils/AutomaticValidatorTransferApproval.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\nimport \"../access/OwnablePermissions.sol\";\n\n/**\n * @title AutomaticValidatorTransferApproval\n * @author Limit Break, Inc.\n * @notice Base contract mix-in that provides boilerplate code giving the contract owner the\n *         option to automatically approve a 721-C transfer validator implementation for transfers.\n */\nabstract contract AutomaticValidatorTransferApproval is OwnablePermissions {\n\n    /// @dev Emitted when the automatic approval flag is modified by the creator.\n    event AutomaticApprovalOfTransferValidatorSet(bool autoApproved);\n\n    /// @dev If true, the collection's transfer validator is automatically approved to transfer holder's tokens.\n    bool public autoApproveTransfersFromValidator;\n\n    /**\n     * @notice Sets if the transfer validator is automatically approved as an operator for all token owners.\n     * \n     * @dev    Throws when the caller is not the contract owner.\n     * \n     * @param autoApprove If true, the collection's transfer validator will be automatically approved to\n     *                    transfer holder's tokens.\n     */\n    function setAutomaticApprovalOfTransfersFromValidator(bool autoApprove) external {\n        _requireCallerIsContractOwner();\n        autoApproveTransfersFromValidator = autoApprove;\n        emit AutomaticApprovalOfTransferValidatorSet(autoApprove);\n    }\n}"
      },
      "lib/creator-token-standards/src/utils/CreatorTokenBase.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\nimport \"../access/OwnablePermissions.sol\";\nimport \"../interfaces/ICreatorToken.sol\";\nimport \"../interfaces/ICreatorTokenLegacy.sol\";\nimport \"../interfaces/ITransferValidator.sol\";\nimport \"./TransferValidation.sol\";\nimport \"../interfaces/ITransferValidatorSetTokenType.sol\";\n\n/**\n * @title CreatorTokenBase\n * @author Limit Break, Inc.\n * @notice CreatorTokenBaseV3 is an abstract contract that provides basic functionality for managing token \n * transfer policies through an implementation of ICreatorTokenTransferValidator/ICreatorTokenTransferValidatorV2/ICreatorTokenTransferValidatorV3. \n * This contract is intended to be used as a base for creator-specific token contracts, enabling customizable transfer \n * restrictions and security policies.\n *\n * <h4>Features:</h4>\n * <ul>Ownable: This contract can have an owner who can set and update the transfer validator.</ul>\n * <ul>TransferValidation: Implements the basic token transfer validation interface.</ul>\n *\n * <h4>Benefits:</h4>\n * <ul>Provides a flexible and modular way to implement custom token transfer restrictions and security policies.</ul>\n * <ul>Allows creators to enforce policies such as account and codehash blacklists, whitelists, and graylists.</ul>\n * <ul>Can be easily integrated into other token contracts as a base contract.</ul>\n *\n * <h4>Intended Usage:</h4>\n * <ul>Use as a base contract for creator token implementations that require advanced transfer restrictions and \n *   security policies.</ul>\n * <ul>Set and update the ICreatorTokenTransferValidator implementation contract to enforce desired policies for the \n *   creator token.</ul>\n *\n * <h4>Compatibility:</h4>\n * <ul>Backward and Forward Compatible - V1/V2/V3 Creator Token Base will work with V1/V2/V3 Transfer Validators.</ul>\n */\nabstract contract CreatorTokenBase is OwnablePermissions, TransferValidation, ICreatorToken {\n\n    /// @dev Thrown when setting a transfer validator address that has no deployed code.\n    error CreatorTokenBase__InvalidTransferValidatorContract();\n\n    /// @dev The default transfer validator that will be used if no transfer validator has been set by the creator.\n    address public constant DEFAULT_TRANSFER_VALIDATOR = address(0x721C0078c2328597Ca70F5451ffF5A7B38D4E947);\n\n    /// @dev Used to determine if the default transfer validator is applied.\n    /// @dev Set to true when the creator sets a transfer validator address.\n    bool private isValidatorInitialized;\n    /// @dev Address of the transfer validator to apply to transactions.\n    address private transferValidator;\n\n    constructor() {\n        _emitDefaultTransferValidator();\n        _registerTokenType(DEFAULT_TRANSFER_VALIDATOR);\n    }\n\n    /**\n     * @notice Sets the transfer validator for the token contract.\n     *\n     * @dev    Throws when provided validator contract is not the zero address and does not have code.\n     * @dev    Throws when the caller is not the contract owner.\n     *\n     * @dev    <h4>Postconditions:</h4>\n     *         1. The transferValidator address is updated.\n     *         2. The `TransferValidatorUpdated` event is emitted.\n     *\n     * @param transferValidator_ The address of the transfer validator contract.\n     */\n    function setTransferValidator(address transferValidator_) public {\n        _requireCallerIsContractOwner();\n\n        bool isValidTransferValidator = transferValidator_.code.length > 0;\n\n        if(transferValidator_ != address(0) && !isValidTransferValidator) {\n            revert CreatorTokenBase__InvalidTransferValidatorContract();\n        }\n\n        emit TransferValidatorUpdated(address(getTransferValidator()), transferValidator_);\n\n        isValidatorInitialized = true;\n        transferValidator = transferValidator_;\n\n        _registerTokenType(transferValidator_);\n    }\n\n    /**\n     * @notice Returns the transfer validator contract address for this token contract.\n     */\n    function getTransferValidator() public view override returns (address validator) {\n        validator = transferValidator;\n\n        if (validator == address(0)) {\n            if (!isValidatorInitialized) {\n                validator = DEFAULT_TRANSFER_VALIDATOR;\n            }\n        }\n    }\n\n    /**\n     * @dev Pre-validates a token transfer, reverting if the transfer is not allowed by this token's security policy.\n     *      Inheriting contracts are responsible for overriding the _beforeTokenTransfer function, or its equivalent\n     *      and calling _validateBeforeTransfer so that checks can be properly applied during token transfers.\n     *\n     * @dev Be aware that if the msg.sender is the transfer validator, the transfer is automatically permitted, as the\n     *      transfer validator is expected to pre-validate the transfer.\n     *\n     * @dev Throws when the transfer doesn't comply with the collection's transfer policy, if the transferValidator is\n     *      set to a non-zero address.\n     *\n     * @param caller  The address of the caller.\n     * @param from    The address of the sender.\n     * @param to      The address of the receiver.\n     * @param tokenId The token id being transferred.\n     */\n    function _preValidateTransfer(\n        address caller, \n        address from, \n        address to, \n        uint256 tokenId, \n        uint256 /*value*/) internal virtual override {\n        address validator = getTransferValidator();\n\n        if (validator != address(0)) {\n            if (msg.sender == validator) {\n                return;\n            }\n\n            ITransferValidator(validator).validateTransfer(caller, from, to, tokenId);\n        }\n    }\n\n    /**\n     * @dev Pre-validates a token transfer, reverting if the transfer is not allowed by this token's security policy.\n     *      Inheriting contracts are responsible for overriding the _beforeTokenTransfer function, or its equivalent\n     *      and calling _validateBeforeTransfer so that checks can be properly applied during token transfers.\n     *\n     * @dev Be aware that if the msg.sender is the transfer validator, the transfer is automatically permitted, as the\n     *      transfer validator is expected to pre-validate the transfer.\n     * \n     * @dev Used for ERC20 and ERC1155 token transfers which have an amount value to validate in the transfer validator.\n     * @dev The `tokenId` for ERC20 tokens should be set to `0`.\n     *\n     * @dev Throws when the transfer doesn't comply with the collection's transfer policy, if the transferValidator is\n     *      set to a non-zero address.\n     *\n     * @param caller  The address of the caller.\n     * @param from    The address of the sender.\n     * @param to      The address of the receiver.\n     * @param tokenId The token id being transferred.\n     * @param amount  The amount of token being transferred.\n     */\n    function _preValidateTransfer(\n        address caller, \n        address from, \n        address to, \n        uint256 tokenId, \n        uint256 amount,\n        uint256 /*value*/) internal virtual override {\n        address validator = getTransferValidator();\n\n        if (validator != address(0)) {\n            if (msg.sender == validator) {\n                return;\n            }\n\n            ITransferValidator(validator).validateTransfer(caller, from, to, tokenId, amount);\n        }\n    }\n\n    function _tokenType() internal virtual pure returns(uint16);\n\n    function _registerTokenType(address validator) internal {\n        if (validator != address(0)) {\n            uint256 validatorCodeSize;\n            assembly {\n                validatorCodeSize := extcodesize(validator)\n            }\n            if(validatorCodeSize > 0) {\n                try ITransferValidatorSetTokenType(validator).setTokenTypeOfCollection(address(this), _tokenType()) {\n                } catch { }\n            }\n        }\n    }\n\n    /**\n     * @dev  Used during contract deployment for constructable and cloneable creator tokens\n     * @dev  to emit the `TransferValidatorUpdated` event signaling the validator for the contract\n     * @dev  is the default transfer validator.\n     */\n    function _emitDefaultTransferValidator() internal {\n        emit TransferValidatorUpdated(address(0), DEFAULT_TRANSFER_VALIDATOR);\n    }\n}\n"
      },
      "lib/creator-token-standards/src/token/erc721/ERC721OpenZeppelin.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.4;\n\nimport \"../../access/OwnablePermissions.sol\";\nimport \"@openzeppelin/contracts/token/ERC721/ERC721.sol\";\n\nabstract contract ERC721OpenZeppelinBase is ERC721 {\n\n    // Token name\n    string internal _contractName;\n\n    // Token symbol\n    string internal _contractSymbol;\n\n    function name() public view virtual override returns (string memory) {\n        return _contractName;\n    }\n\n    function symbol() public view virtual override returns (string memory) {\n        return _contractSymbol;\n    }\n\n    function _setNameAndSymbol(string memory name_, string memory symbol_) internal {\n        _contractName = name_;\n        _contractSymbol = symbol_;\n    }\n}\n\nabstract contract ERC721OpenZeppelin is ERC721OpenZeppelinBase {\n    constructor(string memory name_, string memory symbol_) ERC721(\"\", \"\") {\n        _setNameAndSymbol(name_, symbol_);\n    }\n}\n\nabstract contract ERC721OpenZeppelinInitializable is OwnablePermissions, ERC721OpenZeppelinBase {\n\n    error ERC721OpenZeppelinInitializable__AlreadyInitializedERC721();\n\n    /// @notice Specifies whether or not the contract is initialized\n    bool private _erc721Initialized;\n\n    /// @dev Initializes parameters of ERC721 tokens.\n    /// These cannot be set in the constructor because this contract is optionally compatible with EIP-1167.\n    function initializeERC721(string memory name_, string memory symbol_) public virtual {\n        _requireCallerIsContractOwner();\n\n        if(_erc721Initialized) {\n            revert ERC721OpenZeppelinInitializable__AlreadyInitializedERC721();\n        }\n\n        _erc721Initialized = true;\n\n        _setNameAndSymbol(name_, symbol_);\n    }\n}\n"
      },
      "lib/creator-token-standards/src/interfaces/ITransferValidatorSetTokenType.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\ninterface ITransferValidatorSetTokenType {\n    function setTokenTypeOfCollection(address collection, uint16 tokenType) external;\n}"
      },
      "lib/creator-token-standards/lib/PermitC/src/Constants.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/// @dev Constant bytes32 value of 0x000...000\nbytes32 constant ZERO_BYTES32 = bytes32(0);\n\n/// @dev Constant value of 0\nuint256 constant ZERO = 0;\n/// @dev Constant value of 1\nuint256 constant ONE = 1;\n\n/// @dev Constant value representing an open order in storage\nuint8 constant ORDER_STATE_OPEN = 0;\n/// @dev Constant value representing a filled order in storage\nuint8 constant ORDER_STATE_FILLED = 1;\n/// @dev Constant value representing a cancelled order in storage\nuint8 constant ORDER_STATE_CANCELLED = 2;\n\n/// @dev Constant value representing the ERC721 token type for signatures and transfer hooks\nuint256 constant TOKEN_TYPE_ERC721 = 721;\n/// @dev Constant value representing the ERC1155 token type for signatures and transfer hooks\nuint256 constant TOKEN_TYPE_ERC1155 = 1155;\n/// @dev Constant value representing the ERC20 token type for signatures and transfer hooks\nuint256 constant TOKEN_TYPE_ERC20 = 20;\n\n/// @dev Constant value to mask the upper bits of a signature that uses a packed `vs` value to extract `s`\nbytes32 constant UPPER_BIT_MASK = 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;\n\n/// @dev EIP-712 typehash used for validating signature based stored approvals\nbytes32 constant UPDATE_APPROVAL_TYPEHASH =\n    keccak256(\"UpdateApprovalBySignature(uint256 tokenType,address token,uint256 id,uint256 amount,uint256 nonce,address operator,uint256 approvalExpiration,uint256 sigDeadline,uint256 masterNonce)\");\n\n/// @dev EIP-712 typehash used for validating a single use permit without additional data\nbytes32 constant SINGLE_USE_PERMIT_TYPEHASH =\n    keccak256(\"PermitTransferFrom(uint256 tokenType,address token,uint256 id,uint256 amount,uint256 nonce,address operator,uint256 expiration,uint256 masterNonce)\");\n\n/// @dev EIP-712 typehash used for validating a single use permit with additional data\nstring constant SINGLE_USE_PERMIT_TRANSFER_ADVANCED_TYPEHASH_STUB =\n    \"PermitTransferFromWithAdditionalData(uint256 tokenType,address token,uint256 id,uint256 amount,uint256 nonce,address operator,uint256 expiration,uint256 masterNonce,\";\n\n/// @dev EIP-712 typehash used for validating an order permit that updates storage as it fills\nstring constant PERMIT_ORDER_ADVANCED_TYPEHASH_STUB =\n    \"PermitOrderWithAdditionalData(uint256 tokenType,address token,uint256 id,uint256 amount,uint256 salt,address operator,uint256 expiration,uint256 masterNonce,\";\n\n/// @dev Pausable flag for stored approval transfers of ERC721 assets\nuint256 constant PAUSABLE_APPROVAL_TRANSFER_FROM_ERC721 = 1 << 0;\n/// @dev Pausable flag for stored approval transfers of ERC1155 assets\nuint256 constant PAUSABLE_APPROVAL_TRANSFER_FROM_ERC1155 = 1 << 1;\n/// @dev Pausable flag for stored approval transfers of ERC20 assets\nuint256 constant PAUSABLE_APPROVAL_TRANSFER_FROM_ERC20 = 1 << 2;\n\n/// @dev Pausable flag for single use permit transfers of ERC721 assets\nuint256 constant PAUSABLE_PERMITTED_TRANSFER_FROM_ERC721 = 1 << 3;\n/// @dev Pausable flag for single use permit transfers of ERC1155 assets\nuint256 constant PAUSABLE_PERMITTED_TRANSFER_FROM_ERC1155 = 1 << 4;\n/// @dev Pausable flag for single use permit transfers of ERC20 assets\nuint256 constant PAUSABLE_PERMITTED_TRANSFER_FROM_ERC20 = 1 << 5;\n\n/// @dev Pausable flag for order fill transfers of ERC1155 assets\nuint256 constant PAUSABLE_ORDER_TRANSFER_FROM_ERC1155 = 1 << 6;\n/// @dev Pausable flag for order fill transfers of ERC20 assets\nuint256 constant PAUSABLE_ORDER_TRANSFER_FROM_ERC20 = 1 << 7;"
      },
      "lib/creator-token-standards/src/minting/MintTokenBase.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/**\n * @title MintTokenBase\n * @author Limit Break, Inc.\n * @dev Standard mint token interface for mixins to mint tokens.\n */\nabstract contract MintTokenBase {\n    /// @dev Inheriting contracts must implement the token minting logic - inheriting contract should use _mint, or something equivalent\n    /// The minting function should throw if `to` is address(0)\n    function _mintToken(address to, uint256 tokenId) internal virtual;\n}"
      },
      "lib/creator-token-standards/src/minting/SequentialMintBase.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/**\n * @title SequentialMintBase\n * @author Limit Break, Inc.\n * @dev In order to support multiple sequential mint mix-ins in a single contract, the token id counter has been moved to this based contract.\n */\nabstract contract SequentialMintBase {\n\n    /// @dev The next token id that will be minted - if zero, the next minted token id will be 1\n    uint256 private nextTokenIdCounter;\n\n    /// @dev Minting mixins must use this function to advance the next token id counter.\n    function _initializeNextTokenIdCounter() internal {\n        if(nextTokenIdCounter == 0) {\n            nextTokenIdCounter = 1;\n        }\n    }\n\n    /// @dev Minting mixins must use this function to advance the next token id counter.\n    function _advanceNextTokenIdCounter(uint256 amount) internal {\n        nextTokenIdCounter += amount;\n    }\n\n    /// @dev Returns the next token id counter value\n    function getNextTokenId() public view returns (uint256) {\n        return nextTokenIdCounter;\n    }\n}"
      },
      "lib/openzeppelin-contracts/contracts/utils/Context.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n}\n"
      },
      "lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30 000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"
      },
      "lib/creator-token-standards/src/interfaces/ICreatorToken.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\ninterface ICreatorToken {\n    event TransferValidatorUpdated(address oldValidator, address newValidator);\n    function getTransferValidator() external view returns (address validator);\n    function setTransferValidator(address validator) external;\n    function getTransferValidationFunction() external view returns (bytes4 functionSignature, bool isViewFunction);\n}"
      },
      "lib/creator-token-standards/src/interfaces/ICreatorTokenLegacy.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\ninterface ICreatorTokenLegacy {\n    event TransferValidatorUpdated(address oldValidator, address newValidator);\n    function getTransferValidator() external view returns (address validator);\n    function setTransferValidator(address validator) external;\n}\n"
      },
      "lib/creator-token-standards/src/interfaces/ITransferValidator.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\ninterface ITransferValidator {\n    function applyCollectionTransferPolicy(address caller, address from, address to) external view;\n    function validateTransfer(address caller, address from, address to) external view;\n    function validateTransfer(address caller, address from, address to, uint256 tokenId) external view;\n    function validateTransfer(address caller, address from, address to, uint256 tokenId, uint256 amount) external;\n\n    function beforeAuthorizedTransfer(address operator, address token, uint256 tokenId) external;\n    function afterAuthorizedTransfer(address token, uint256 tokenId) external;\n    function beforeAuthorizedTransfer(address operator, address token) external;\n    function afterAuthorizedTransfer(address token) external;\n    function beforeAuthorizedTransfer(address token, uint256 tokenId) external;\n    function beforeAuthorizedTransferWithAmount(address token, uint256 tokenId, uint256 amount) external;\n    function afterAuthorizedTransferWithAmount(address token, uint256 tokenId) external;\n}"
      },
      "lib/creator-token-standards/src/utils/TransferValidation.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\";\n\n/**\n * @title TransferValidation\n * @author Limit Break, Inc.\n * @notice A mix-in that can be combined with ERC-721 contracts to provide more granular hooks.\n * Openzeppelin's ERC721 contract only provides hooks for before and after transfer.  This allows\n * developers to validate or customize transfers within the context of a mint, a burn, or a transfer.\n */\nabstract contract TransferValidation is Context {\n    \n    /// @dev Thrown when the from and to address are both the zero address.\n    error ShouldNotMintToBurnAddress();\n\n    /*************************************************************************/\n    /*                      Transfers Without Amounts                        */\n    /*************************************************************************/\n\n    /// @dev Inheriting contracts should call this function in the _beforeTokenTransfer function to get more granular hooks.\n    function _validateBeforeTransfer(address from, address to, uint256 tokenId) internal virtual {\n        bool fromZeroAddress = from == address(0);\n        bool toZeroAddress = to == address(0);\n\n        if(fromZeroAddress && toZeroAddress) {\n            revert ShouldNotMintToBurnAddress();\n        } else if(fromZeroAddress) {\n            _preValidateMint(_msgSender(), to, tokenId, msg.value);\n        } else if(toZeroAddress) {\n            _preValidateBurn(_msgSender(), from, tokenId, msg.value);\n        } else {\n            _preValidateTransfer(_msgSender(), from, to, tokenId, msg.value);\n        }\n    }\n\n    /// @dev Inheriting contracts should call this function in the _afterTokenTransfer function to get more granular hooks.\n    function _validateAfterTransfer(address from, address to, uint256 tokenId) internal virtual {\n        bool fromZeroAddress = from == address(0);\n        bool toZeroAddress = to == address(0);\n\n        if(fromZeroAddress && toZeroAddress) {\n            revert ShouldNotMintToBurnAddress();\n        } else if(fromZeroAddress) {\n            _postValidateMint(_msgSender(), to, tokenId, msg.value);\n        } else if(toZeroAddress) {\n            _postValidateBurn(_msgSender(), from, tokenId, msg.value);\n        } else {\n            _postValidateTransfer(_msgSender(), from, to, tokenId, msg.value);\n        }\n    }\n\n    /// @dev Optional validation hook that fires before a mint\n    function _preValidateMint(address caller, address to, uint256 tokenId, uint256 value) internal virtual {}\n\n    /// @dev Optional validation hook that fires after a mint\n    function _postValidateMint(address caller, address to, uint256 tokenId, uint256 value) internal virtual {}\n\n    /// @dev Optional validation hook that fires before a burn\n    function _preValidateBurn(address caller, address from, uint256 tokenId, uint256 value) internal virtual {}\n\n    /// @dev Optional validation hook that fires after a burn\n    function _postValidateBurn(address caller, address from, uint256 tokenId, uint256 value) internal virtual {}\n\n    /// @dev Optional validation hook that fires before a transfer\n    function _preValidateTransfer(address caller, address from, address to, uint256 tokenId, uint256 value) internal virtual {}\n\n    /// @dev Optional validation hook that fires after a transfer\n    function _postValidateTransfer(address caller, address from, address to, uint256 tokenId, uint256 value) internal virtual {}\n\n    /*************************************************************************/\n    /*                         Transfers With Amounts                        */\n    /*************************************************************************/\n\n    /// @dev Inheriting contracts should call this function in the _beforeTokenTransfer function to get more granular hooks.\n    function _validateBeforeTransfer(address from, address to, uint256 tokenId, uint256 amount) internal virtual {\n        bool fromZeroAddress = from == address(0);\n        bool toZeroAddress = to == address(0);\n\n        if(fromZeroAddress && toZeroAddress) {\n            revert ShouldNotMintToBurnAddress();\n        } else if(fromZeroAddress) {\n            _preValidateMint(_msgSender(), to, tokenId, amount, msg.value);\n        } else if(toZeroAddress) {\n            _preValidateBurn(_msgSender(), from, tokenId, amount, msg.value);\n        } else {\n            _preValidateTransfer(_msgSender(), from, to, tokenId, amount, msg.value);\n        }\n    }\n\n    /// @dev Inheriting contracts should call this function in the _afterTokenTransfer function to get more granular hooks.\n    function _validateAfterTransfer(address from, address to, uint256 tokenId, uint256 amount) internal virtual {\n        bool fromZeroAddress = from == address(0);\n        bool toZeroAddress = to == address(0);\n\n        if(fromZeroAddress && toZeroAddress) {\n            revert ShouldNotMintToBurnAddress();\n        } else if(fromZeroAddress) {\n            _postValidateMint(_msgSender(), to, tokenId, amount, msg.value);\n        } else if(toZeroAddress) {\n            _postValidateBurn(_msgSender(), from, tokenId, amount, msg.value);\n        } else {\n            _postValidateTransfer(_msgSender(), from, to, tokenId, amount, msg.value);\n        }\n    }\n\n    /// @dev Optional validation hook that fires before a mint\n    function _preValidateMint(address caller, address to, uint256 tokenId, uint256 amount, uint256 value) internal virtual {}\n\n    /// @dev Optional validation hook that fires after a mint\n    function _postValidateMint(address caller, address to, uint256 tokenId, uint256 amount, uint256 value) internal virtual {}\n\n    /// @dev Optional validation hook that fires before a burn\n    function _preValidateBurn(address caller, address from, uint256 tokenId, uint256 amount, uint256 value) internal virtual {}\n\n    /// @dev Optional validation hook that fires after a burn\n    function _postValidateBurn(address caller, address from, uint256 tokenId, uint256 amount, uint256 value) internal virtual {}\n\n    /// @dev Optional validation hook that fires before a transfer\n    function _preValidateTransfer(address caller, address from, address to, uint256 tokenId, uint256 amount, uint256 value) internal virtual {}\n\n    /// @dev Optional validation hook that fires after a transfer\n    function _postValidateTransfer(address caller, address from, address to, uint256 tokenId, uint256 amount, uint256 value) internal virtual {}\n}\n"
      },
      "lib/openzeppelin-contracts/contracts/token/ERC721/ERC721.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.2) (token/ERC721/ERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC721.sol\";\nimport \"./IERC721Receiver.sol\";\nimport \"./extensions/IERC721Metadata.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/Context.sol\";\nimport \"../../utils/Strings.sol\";\nimport \"../../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\n * {ERC721Enumerable}.\n */\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata {\n    using Address for address;\n    using Strings for uint256;\n\n    // Token name\n    string private _name;\n\n    // Token symbol\n    string private _symbol;\n\n    // Mapping from token ID to owner address\n    mapping(uint256 => address) private _owners;\n\n    // Mapping owner address to token count\n    mapping(address => uint256) private _balances;\n\n    // Mapping from token ID to approved address\n    mapping(uint256 => address) private _tokenApprovals;\n\n    // Mapping from owner to operator approvals\n    mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n    /**\n     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\n     */\n    constructor(string memory name_, string memory symbol_) {\n        _name = name_;\n        _symbol = symbol_;\n    }\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n        return\n            interfaceId == type(IERC721).interfaceId ||\n            interfaceId == type(IERC721Metadata).interfaceId ||\n            super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev See {IERC721-balanceOf}.\n     */\n    function balanceOf(address owner) public view virtual override returns (uint256) {\n        require(owner != address(0), \"ERC721: address zero is not a valid owner\");\n        return _balances[owner];\n    }\n\n    /**\n     * @dev See {IERC721-ownerOf}.\n     */\n    function ownerOf(uint256 tokenId) public view virtual override returns (address) {\n        address owner = _ownerOf(tokenId);\n        require(owner != address(0), \"ERC721: invalid token ID\");\n        return owner;\n    }\n\n    /**\n     * @dev See {IERC721Metadata-name}.\n     */\n    function name() public view virtual override returns (string memory) {\n        return _name;\n    }\n\n    /**\n     * @dev See {IERC721Metadata-symbol}.\n     */\n    function symbol() public view virtual override returns (string memory) {\n        return _symbol;\n    }\n\n    /**\n     * @dev See {IERC721Metadata-tokenURI}.\n     */\n    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\n        _requireMinted(tokenId);\n\n        string memory baseURI = _baseURI();\n        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \"\";\n    }\n\n    /**\n     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\n     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\n     * by default, can be overridden in child contracts.\n     */\n    function _baseURI() internal view virtual returns (string memory) {\n        return \"\";\n    }\n\n    /**\n     * @dev See {IERC721-approve}.\n     */\n    function approve(address to, uint256 tokenId) public virtual override {\n        address owner = ERC721.ownerOf(tokenId);\n        require(to != owner, \"ERC721: approval to current owner\");\n\n        require(\n            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),\n            \"ERC721: approve caller is not token owner or approved for all\"\n        );\n\n        _approve(to, tokenId);\n    }\n\n    /**\n     * @dev See {IERC721-getApproved}.\n     */\n    function getApproved(uint256 tokenId) public view virtual override returns (address) {\n        _requireMinted(tokenId);\n\n        return _tokenApprovals[tokenId];\n    }\n\n    /**\n     * @dev See {IERC721-setApprovalForAll}.\n     */\n    function setApprovalForAll(address operator, bool approved) public virtual override {\n        _setApprovalForAll(_msgSender(), operator, approved);\n    }\n\n    /**\n     * @dev See {IERC721-isApprovedForAll}.\n     */\n    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\n        return _operatorApprovals[owner][operator];\n    }\n\n    /**\n     * @dev See {IERC721-transferFrom}.\n     */\n    function transferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) public virtual override {\n        //solhint-disable-next-line max-line-length\n        require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: caller is not token owner or approved\");\n\n        _transfer(from, to, tokenId);\n    }\n\n    /**\n     * @dev See {IERC721-safeTransferFrom}.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) public virtual override {\n        safeTransferFrom(from, to, tokenId, \"\");\n    }\n\n    /**\n     * @dev See {IERC721-safeTransferFrom}.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId,\n        bytes memory data\n    ) public virtual override {\n        require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: caller is not token owner or approved\");\n        _safeTransfer(from, to, tokenId, data);\n    }\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     * `data` is additional data, it has no specified format and it is sent in call to `to`.\n     *\n     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\n     * implement alternative mechanisms to perform token transfer, such as signature-based.\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 `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _safeTransfer(\n        address from,\n        address to,\n        uint256 tokenId,\n        bytes memory data\n    ) internal virtual {\n        _transfer(from, to, tokenId);\n        require(_checkOnERC721Received(from, to, tokenId, data), \"ERC721: transfer to non ERC721Receiver implementer\");\n    }\n\n    /**\n     * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist\n     */\n    function _ownerOf(uint256 tokenId) internal view virtual returns (address) {\n        return _owners[tokenId];\n    }\n\n    /**\n     * @dev Returns whether `tokenId` exists.\n     *\n     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\n     *\n     * Tokens start existing when they are minted (`_mint`),\n     * and stop existing when they are burned (`_burn`).\n     */\n    function _exists(uint256 tokenId) internal view virtual returns (bool) {\n        return _ownerOf(tokenId) != address(0);\n    }\n\n    /**\n     * @dev Returns whether `spender` is allowed to manage `tokenId`.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\n        address owner = ERC721.ownerOf(tokenId);\n        return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);\n    }\n\n    /**\n     * @dev Safely mints `tokenId` and transfers it to `to`.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must not exist.\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _safeMint(address to, uint256 tokenId) internal virtual {\n        _safeMint(to, tokenId, \"\");\n    }\n\n    /**\n     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\n     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\n     */\n    function _safeMint(\n        address to,\n        uint256 tokenId,\n        bytes memory data\n    ) internal virtual {\n        _mint(to, tokenId);\n        require(\n            _checkOnERC721Received(address(0), to, tokenId, data),\n            \"ERC721: transfer to non ERC721Receiver implementer\"\n        );\n    }\n\n    /**\n     * @dev Mints `tokenId` and transfers it to `to`.\n     *\n     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\n     *\n     * Requirements:\n     *\n     * - `tokenId` must not exist.\n     * - `to` cannot be the zero address.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _mint(address to, uint256 tokenId) internal virtual {\n        require(to != address(0), \"ERC721: mint to the zero address\");\n        require(!_exists(tokenId), \"ERC721: token already minted\");\n\n        _beforeTokenTransfer(address(0), to, tokenId, 1);\n\n        // Check that tokenId was not minted by `_beforeTokenTransfer` hook\n        require(!_exists(tokenId), \"ERC721: token already minted\");\n\n        unchecked {\n            // Will not overflow unless all 2**256 token ids are minted to the same owner.\n            // Given that tokens are minted one by one, it is impossible in practice that\n            // this ever happens. Might change if we allow batch minting.\n            // The ERC fails to describe this case.\n            _balances[to] += 1;\n        }\n\n        _owners[tokenId] = to;\n\n        emit Transfer(address(0), to, tokenId);\n\n        _afterTokenTransfer(address(0), to, tokenId, 1);\n    }\n\n    /**\n     * @dev Destroys `tokenId`.\n     * The approval is cleared when the token is burned.\n     * This is an internal function that does not check if the sender is authorized to operate on the token.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _burn(uint256 tokenId) internal virtual {\n        address owner = ERC721.ownerOf(tokenId);\n\n        _beforeTokenTransfer(owner, address(0), tokenId, 1);\n\n        // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook\n        owner = ERC721.ownerOf(tokenId);\n\n        // Clear approvals\n        delete _tokenApprovals[tokenId];\n\n        unchecked {\n            // Cannot overflow, as that would require more tokens to be burned/transferred\n            // out than the owner initially received through minting and transferring in.\n            _balances[owner] -= 1;\n        }\n        delete _owners[tokenId];\n\n        emit Transfer(owner, address(0), tokenId);\n\n        _afterTokenTransfer(owner, address(0), tokenId, 1);\n    }\n\n    /**\n     * @dev Transfers `tokenId` from `from` to `to`.\n     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must be owned by `from`.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _transfer(\n        address from,\n        address to,\n        uint256 tokenId\n    ) internal virtual {\n        require(ERC721.ownerOf(tokenId) == from, \"ERC721: transfer from incorrect owner\");\n        require(to != address(0), \"ERC721: transfer to the zero address\");\n\n        _beforeTokenTransfer(from, to, tokenId, 1);\n\n        // Check that tokenId was not transferred by `_beforeTokenTransfer` hook\n        require(ERC721.ownerOf(tokenId) == from, \"ERC721: transfer from incorrect owner\");\n\n        // Clear approvals from the previous owner\n        delete _tokenApprovals[tokenId];\n\n        unchecked {\n            // `_balances[from]` cannot overflow for the same reason as described in `_burn`:\n            // `from`'s balance is the number of token held, which is at least one before the current\n            // transfer.\n            // `_balances[to]` could overflow in the conditions described in `_mint`. That would require\n            // all 2**256 token ids to be minted, which in practice is impossible.\n            _balances[from] -= 1;\n            _balances[to] += 1;\n        }\n        _owners[tokenId] = to;\n\n        emit Transfer(from, to, tokenId);\n\n        _afterTokenTransfer(from, to, tokenId, 1);\n    }\n\n    /**\n     * @dev Approve `to` to operate on `tokenId`\n     *\n     * Emits an {Approval} event.\n     */\n    function _approve(address to, uint256 tokenId) internal virtual {\n        _tokenApprovals[tokenId] = to;\n        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);\n    }\n\n    /**\n     * @dev Approve `operator` to operate on all of `owner` tokens\n     *\n     * Emits an {ApprovalForAll} event.\n     */\n    function _setApprovalForAll(\n        address owner,\n        address operator,\n        bool approved\n    ) internal virtual {\n        require(owner != operator, \"ERC721: approve to caller\");\n        _operatorApprovals[owner][operator] = approved;\n        emit ApprovalForAll(owner, operator, approved);\n    }\n\n    /**\n     * @dev Reverts if the `tokenId` has not been minted yet.\n     */\n    function _requireMinted(uint256 tokenId) internal view virtual {\n        require(_exists(tokenId), \"ERC721: invalid token ID\");\n    }\n\n    /**\n     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\n     * The call is not executed if the target address is not a contract.\n     *\n     * @param from address representing the previous owner of the given token ID\n     * @param to target address that will receive the tokens\n     * @param tokenId uint256 ID of the token to be transferred\n     * @param data bytes optional data to send along with the call\n     * @return bool whether the call correctly returned the expected magic value\n     */\n    function _checkOnERC721Received(\n        address from,\n        address to,\n        uint256 tokenId,\n        bytes memory data\n    ) private returns (bool) {\n        if (to.isContract()) {\n            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\n                return retval == IERC721Receiver.onERC721Received.selector;\n            } catch (bytes memory reason) {\n                if (reason.length == 0) {\n                    revert(\"ERC721: transfer to non ERC721Receiver implementer\");\n                } else {\n                    /// @solidity memory-safe-assembly\n                    assembly {\n                        revert(add(32, reason), mload(reason))\n                    }\n                }\n            }\n        } else {\n            return true;\n        }\n    }\n\n    /**\n     * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is\n     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\n     *\n     * Calling conditions:\n     *\n     * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.\n     * - When `from` is zero, the tokens will be minted for `to`.\n     * - When `to` is zero, ``from``'s tokens will be burned.\n     * - `from` and `to` are never both zero.\n     * - `batchSize` is non-zero.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _beforeTokenTransfer(\n        address from,\n        address to,\n        uint256 firstTokenId,\n        uint256 batchSize\n    ) internal virtual {}\n\n    /**\n     * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is\n     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\n     *\n     * Calling conditions:\n     *\n     * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.\n     * - When `from` is zero, the tokens were minted for `to`.\n     * - When `to` is zero, ``from``'s tokens were burned.\n     * - `from` and `to` are never both zero.\n     * - `batchSize` is non-zero.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _afterTokenTransfer(\n        address from,\n        address to,\n        uint256 firstTokenId,\n        uint256 batchSize\n    ) internal virtual {}\n\n    /**\n     * @dev Unsafe write access to the balances, used by extensions that \"mint\" tokens using an {ownerOf} override.\n     *\n     * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant\n     * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such\n     * that `ownerOf(tokenId)` is `a`.\n     */\n    // solhint-disable-next-line func-name-mixedcase\n    function __unsafe_increaseBalance(address account, uint256 amount) internal {\n        _balances[account] += amount;\n    }\n}\n"
      },
      "lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../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 a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId,\n        bytes calldata data\n    ) external;\n\n    /**\n     * @dev 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 {setApprovalForAll}.\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) 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(\n        address from,\n        address to,\n        uint256 tokenId\n    ) external;\n\n    /**\n     * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n     * The approval is cleared when the token is transferred.\n     *\n     * Only a single account can be approved at a time, so approving the 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 caller.\n     *\n     * Emits an {ApprovalForAll} event.\n     */\n    function setApprovalForAll(address operator, bool _approved) external;\n\n    /**\n     * @dev Returns the account approved for `tokenId` token.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function getApproved(uint256 tokenId) external view returns (address operator);\n\n    /**\n     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n     *\n     * See {setApprovalForAll}\n     */\n    function isApprovedForAll(address owner, address operator) external view returns (bool);\n}\n"
      },
      "lib/openzeppelin-contracts/contracts/token/ERC721/IERC721Receiver.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * from ERC721 asset contracts.\n */\ninterface IERC721Receiver {\n    /**\n     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\n     * by `operator` from `from`, this function is called.\n     *\n     * It must return its Solidity selector to confirm the token transfer.\n     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\n     *\n     * The selector can be obtained in Solidity with `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"
      },
      "lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Metadata.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721Metadata is IERC721 {\n    /**\n     * @dev Returns the token collection name.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the token collection symbol.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\n     */\n    function tokenURI(uint256 tokenId) external view returns (string memory);\n}\n"
      },
      "lib/openzeppelin-contracts/contracts/utils/Address.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n    /**\n     * @dev Returns true if `account` is a contract.\n     *\n     * [IMPORTANT]\n     * ====\n     * It is unsafe to assume that an address for which this function returns\n     * false is an externally-owned account (EOA) and not a contract.\n     *\n     * Among others, `isContract` will return false for the following\n     * types of addresses:\n     *\n     *  - an externally-owned account\n     *  - a contract in construction\n     *  - an address where a contract will be created\n     *  - an address where a contract lived, but was destroyed\n     * ====\n     *\n     * [IMPORTANT]\n     * ====\n     * You shouldn't rely on `isContract` to protect against flash loan attacks!\n     *\n     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n     * constructor.\n     * ====\n     */\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize/address.code.length, which returns 0\n        // for contracts in construction, since the code is only stored at the end\n        // of the constructor execution.\n\n        return account.code.length > 0;\n    }\n\n    /**\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n     * `recipient`, forwarding all available gas and reverting on errors.\n     *\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\n     * imposed by `transfer`, making them unable to receive funds via\n     * `transfer`. {sendValue} removes this limitation.\n     *\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n     *\n     * IMPORTANT: because control is transferred to `recipient`, care must be\n     * taken to not create reentrancy vulnerabilities. Consider using\n     * {ReentrancyGuard} or the\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n    /**\n     * @dev Performs a Solidity function call using a low level `call`. A\n     * plain `call` is an unsafe replacement for a function call: use this\n     * function instead.\n     *\n     * If `target` reverts with a revert reason, it is bubbled up by this\n     * function (like regular Solidity function calls).\n     *\n     * Returns the raw returned data. To convert to the expected return value,\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n     *\n     * Requirements:\n     *\n     * - `target` must be a contract.\n     * - calling `target` with `data` must not revert.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n     * `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but also transferring `value` wei to `target`.\n     *\n     * Requirements:\n     *\n     * - the calling contract must have an ETH balance of at least `value`.\n     * - the called Solidity function must be `payable`.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance >= value, \"Address: insufficient balance for call\");\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a delegate call.\n     *\n     * _Available since v3.4._\n     */\n    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a delegate call.\n     *\n     * _Available since v3.4._\n     */\n    function functionDelegateCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        (bool success, bytes memory returndata) = target.delegatecall(data);\n        return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n     *\n     * _Available since v4.8._\n     */\n    function verifyCallResultFromTarget(\n        address target,\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        if (success) {\n            if (returndata.length == 0) {\n                // only check isContract if the call was successful and the return data is empty\n                // otherwise we already know that it was a contract\n                require(isContract(target), \"Address: call to non-contract\");\n            }\n            return returndata;\n        } else {\n            _revert(returndata, errorMessage);\n        }\n    }\n\n    /**\n     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n     * revert reason or using the provided one.\n     *\n     * _Available since v4.3._\n     */\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            _revert(returndata, errorMessage);\n        }\n    }\n\n    function _revert(bytes memory returndata, string memory errorMessage) private pure {\n        // Look for revert reason and bubble it up if present\n        if (returndata.length > 0) {\n            // The easiest way to bubble the revert reason is using memory via assembly\n            /// @solidity memory-safe-assembly\n            assembly {\n                let returndata_size := mload(returndata)\n                revert(add(32, returndata), returndata_size)\n            }\n        } else {\n            revert(errorMessage);\n        }\n    }\n}\n"
      },
      "lib/openzeppelin-contracts/contracts/utils/Strings.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/Math.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n    bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n    uint8 private constant _ADDRESS_LENGTH = 20;\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), _SYMBOLS))\n                }\n                value /= 10;\n                if (value == 0) break;\n            }\n            return buffer;\n        }\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        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] = _SYMBOLS[value & 0xf];\n            value >>= 4;\n        }\n        require(value == 0, \"Strings: hex length insufficient\");\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 representation.\n     */\n    function toHexString(address addr) internal pure returns (string memory) {\n        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n    }\n}\n"
      },
      "lib/openzeppelin-contracts/contracts/utils/math/Math.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n    enum Rounding {\n        Down, // Toward negative infinity\n        Up, // Toward infinity\n        Zero // Toward zero\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 up instead\n     * of rounding down.\n     */\n    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\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 denominator == 0\n     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n     * with further edits by Uniswap Labs also under MIT license.\n     */\n    function mulDiv(\n        uint256 x,\n        uint256 y,\n        uint256 denominator\n    ) 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; // 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                prod0 := mul(x, y)\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                return prod0 / denominator;\n            }\n\n            // Make sure the result is less than 2^256. Also prevents denominator == 0.\n            require(denominator > prod1);\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. Always >= 1.\n            // See https://cs.stackexchange.com/q/138556/92363.\n\n            // Does not overflow because the denominator cannot be zero at this stage in the function.\n            uint256 twos = denominator & (~denominator + 1);\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 works\n            // 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(\n        uint256 x,\n        uint256 y,\n        uint256 denominator,\n        Rounding rounding\n    ) internal pure returns (uint256) {\n        uint256 result = mulDiv(x, y, denominator);\n        if (rounding == Rounding.Up && 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 down.\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 + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 2, rounded down, of a positive value.\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 + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 10, rounded down, of a positive value.\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 + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 256, rounded down, of a positive value.\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 10, 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 + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\n        }\n    }\n}\n"
      }
    },
    "settings": {
      "remappings": [
        "ds-test/=lib/forge-std/lib/ds-test/src/",
        "forge-std/=lib/forge-std/src/",
        "erc721a/=lib/erc721a/",
        "@openzeppelin/=lib/openzeppelin-contracts/",
        "@limitbreak/creator-token-standards/=lib/creator-token-standards/src/",
        "@limitbreak/permit-c/=lib/creator-token-standards/lib/PermitC/src/",
        "@opensea/tstorish/=lib/creator-token-standards/lib/tstorish/src/",
        "@rari-capital/solmate/=lib/creator-token-standards/lib/PermitC/lib/solmate/",
        "ERC721A/=lib/creator-token-standards/lib/ERC721A/contracts/",
        "PermitC/=lib/creator-token-standards/lib/PermitC/",
        "creator-token-standards/=lib/creator-token-standards/",
        "erc4626-tests/=lib/creator-token-standards/lib/PermitC/lib/openzeppelin-contracts/lib/erc4626-tests/",
        "forge-gas-metering/=lib/creator-token-standards/lib/PermitC/lib/forge-gas-metering/",
        "murky/=lib/murky/",
        "openzeppelin-contracts/=lib/openzeppelin-contracts/",
        "openzeppelin/=lib/creator-token-standards/lib/PermitC/lib/openzeppelin-contracts/contracts/",
        "solady/=lib/creator-token-standards/lib/PermitC/lib/forge-gas-metering/lib/solady/",
        "solmate/=lib/creator-token-standards/lib/PermitC/lib/solmate/src/",
        "tstorish/=lib/creator-token-standards/lib/tstorish/src/"
      ],
      "optimizer": {
        "enabled": true,
        "runs": 800
      },
      "metadata": {
        "useLiteralContent": false,
        "bytecodeHash": "ipfs",
        "appendCBOR": true
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "evmVersion": "paris",
      "viaIR": false,
      "libraries": {}
    }
  }}