creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "node_modules/@zoralabs/zora-1155-contracts/src/nft/ZoraCreator1155Impl.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\nimport {ERC1155Upgradeable} from \"@zoralabs/openzeppelin-contracts-upgradeable/contracts/token/ERC1155/ERC1155Upgradeable.sol\";\nimport {ReentrancyGuardUpgradeable} from \"@zoralabs/openzeppelin-contracts-upgradeable/contracts/security/ReentrancyGuardUpgradeable.sol\";\nimport {UUPSUpgradeable} from \"@zoralabs/openzeppelin-contracts-upgradeable/contracts/proxy/utils/UUPSUpgradeable.sol\";\nimport {IERC1155MetadataURIUpgradeable} from \"@zoralabs/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC1155MetadataURIUpgradeable.sol\";\nimport {IERC165Upgradeable} from \"@zoralabs/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC165Upgradeable.sol\";\nimport {IProtocolRewards} from \"@zoralabs/protocol-rewards/src/interfaces/IProtocolRewards.sol\";\nimport {RewardSplits, RewardSplitsLib} from \"@zoralabs/protocol-rewards/src/abstract/RewardSplits.sol\";\nimport {ERC1155RewardsStorageV1} from \"@zoralabs/protocol-rewards/src/abstract/ERC1155/ERC1155RewardsStorageV1.sol\";\nimport {ReentrancyGuardUpgradeable} from \"@zoralabs/openzeppelin-contracts-upgradeable/contracts/security/ReentrancyGuardUpgradeable.sol\";\nimport {UUPSUpgradeable} from \"@zoralabs/openzeppelin-contracts-upgradeable/contracts/proxy/utils/UUPSUpgradeable.sol\";\nimport {MathUpgradeable} from \"@zoralabs/openzeppelin-contracts-upgradeable/contracts/utils/math/MathUpgradeable.sol\";\n\nimport {IZoraCreator1155} from \"../interfaces/IZoraCreator1155.sol\";\nimport {IZoraCreator1155Initializer} from \"../interfaces/IZoraCreator1155Initializer.sol\";\nimport {IERC7572} from \"../interfaces/IERC7572.sol\";\nimport {ContractVersionBase} from \"../version/ContractVersionBase.sol\";\nimport {CreatorPermissionControl} from \"../permissions/CreatorPermissionControl.sol\";\nimport {CreatorRendererControl} from \"../renderer/CreatorRendererControl.sol\";\nimport {CreatorRoyaltiesControl} from \"../royalties/CreatorRoyaltiesControl.sol\";\nimport {ICreatorCommands} from \"../interfaces/ICreatorCommands.sol\";\nimport {IMinter1155} from \"../interfaces/IMinter1155.sol\";\nimport {IRenderer1155} from \"../interfaces/IRenderer1155.sol\";\nimport {ITransferHookReceiver} from \"../interfaces/ITransferHookReceiver.sol\";\nimport {IUpgradeGate} from \"../interfaces/IUpgradeGate.sol\";\nimport {IZoraCreator1155} from \"../interfaces/IZoraCreator1155.sol\";\nimport {LegacyNamingControl} from \"../legacy-naming/LegacyNamingControl.sol\";\nimport {PublicMulticall} from \"../utils/PublicMulticall.sol\";\nimport {SharedBaseConstants} from \"../shared/SharedBaseConstants.sol\";\nimport {TransferHelperUtils} from \"../utils/TransferHelperUtils.sol\";\nimport {ZoraCreator1155StorageV1} from \"./ZoraCreator1155StorageV1.sol\";\nimport {IZoraCreator1155Errors} from \"../interfaces/IZoraCreator1155Errors.sol\";\nimport {ERC1155DelegationStorageV1} from \"../delegation/ERC1155DelegationStorageV1.sol\";\nimport {IZoraCreator1155DelegatedCreation, ISupportsAABasedDelegatedTokenCreation, IHasSupportedPremintSignatureVersions} from \"../interfaces/IZoraCreator1155DelegatedCreation.sol\";\nimport {IMintWithRewardsRecipients} from \"../interfaces/IMintWithRewardsRecipients.sol\";\nimport {ZoraCreator1155Attribution, DecodedCreatorAttribution, PremintTokenSetup, PremintConfigV2, DelegatedTokenCreation, DelegatedTokenSetup} from \"../delegation/ZoraCreator1155Attribution.sol\";\nimport {ContractCreationConfig, PremintConfig} from \"@zoralabs/shared-contracts/entities/Premint.sol\";\nimport {IZoraMintsMinterManager} from \"@zoralabs/mints-contracts/src/interfaces/IZoraMintsMinterManager.sol\";\nimport {IZoraMints1155} from \"@zoralabs/mints-contracts/src/interfaces/IZoraMints1155.sol\";\nimport {IERC1155} from \"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\";\nimport {IERC1155Receiver} from \"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol\";\nimport {IMintWithMints} from \"@zoralabs/mints-contracts/src/IMintWithMints.sol\";\nimport {Redemption} from \"@zoralabs/mints-contracts/src/ZoraMintsTypes.sol\";\n\n/// Imagine. Mint. Enjoy.\n/// @title ZoraCreator1155Impl\n/// @notice The core implementation contract for a creator's 1155 token\n/// @author @iainnash / @tbtstl\ncontract ZoraCreator1155Impl is\n    IZoraCreator1155,\n    IZoraCreator1155Initializer,\n    ContractVersionBase,\n    ReentrancyGuardUpgradeable,\n    PublicMulticall,\n    ERC1155Upgradeable,\n    UUPSUpgradeable,\n    CreatorRendererControl,\n    LegacyNamingControl,\n    ZoraCreator1155StorageV1,\n    CreatorPermissionControl,\n    CreatorRoyaltiesControl,\n    RewardSplits,\n    ERC1155RewardsStorageV1,\n    IERC7572,\n    ERC1155DelegationStorageV1\n{\n    /// @notice This user role allows for any action to be performed\n    uint256 public constant PERMISSION_BIT_ADMIN = 2 ** 1;\n    /// @notice This user role allows for only mint actions to be performed\n    uint256 public constant PERMISSION_BIT_MINTER = 2 ** 2;\n\n    /// @notice This user role allows for only managing sales configurations\n    uint256 public constant PERMISSION_BIT_SALES = 2 ** 3;\n    /// @notice This user role allows for only managing metadata configuration\n    uint256 public constant PERMISSION_BIT_METADATA = 2 ** 4;\n    /// @notice This user role allows for only withdrawing funds and setting funds withdraw address\n    uint256 public constant PERMISSION_BIT_FUNDS_MANAGER = 2 ** 5;\n    /// @notice Factory contract\n    IUpgradeGate internal immutable upgradeGate;\n    /// @notice The mint token contract\n    IZoraMintsMinterManager internal immutable mintsManager;\n\n    bytes4 constant ON_ERC1155_RECEIVED_HASH = IERC1155Receiver.onERC1155Received.selector;\n    bytes4 constant ON_ERC1155_BATCH_RECEIVED_HASH = IERC1155Receiver.onERC1155BatchReceived.selector;\n\n    constructor(\n        address _mintFeeRecipient,\n        address _upgradeGate,\n        address _protocolRewards,\n        address _mints\n    ) RewardSplits(_protocolRewards, _mintFeeRecipient) initializer {\n        upgradeGate = IUpgradeGate(_upgradeGate);\n        mintsManager = IZoraMintsMinterManager(_mints);\n    }\n\n    /// @notice Initializes the contract\n    /// @param contractName the legacy on-chain contract name\n    /// @param newContractURI The contract URI\n    /// @param defaultRoyaltyConfiguration The default royalty configuration\n    /// @param defaultAdmin The default admin to manage the token\n    /// @param setupActions The setup actions to run, if any\n    function initialize(\n        string memory contractName,\n        string memory newContractURI,\n        RoyaltyConfiguration memory defaultRoyaltyConfiguration,\n        address payable defaultAdmin,\n        bytes[] calldata setupActions\n    ) external nonReentrant initializer {\n        // We are not initalizing the OZ 1155 implementation\n        // to save contract storage space and runtime\n        // since the only thing affected here is the uri.\n        // __ERC1155_init(\"\");\n\n        // Setup uups\n        __UUPSUpgradeable_init();\n\n        // Setup re-entracy guard\n        __ReentrancyGuard_init();\n\n        // Setup contract-default token ID\n        _setupDefaultToken(defaultAdmin, newContractURI, defaultRoyaltyConfiguration);\n\n        // Set owner to default admin\n        _setOwner(defaultAdmin);\n\n        _setFundsRecipient(defaultAdmin);\n\n        _setName(contractName);\n\n        // Run Setup actions\n        if (setupActions.length > 0) {\n            // Temporarily make sender admin\n            _addPermission(CONTRACT_BASE_ID, msg.sender, PERMISSION_BIT_ADMIN);\n\n            // Make calls\n            multicall(setupActions);\n\n            // Remove admin\n            _removePermission(CONTRACT_BASE_ID, msg.sender, PERMISSION_BIT_ADMIN);\n        }\n    }\n\n    /// @notice sets up the global configuration for the 1155 contract\n    /// @param newContractURI The contract URI\n    /// @param defaultRoyaltyConfiguration The default royalty configuration\n    function _setupDefaultToken(address defaultAdmin, string memory newContractURI, RoyaltyConfiguration memory defaultRoyaltyConfiguration) internal {\n        // Add admin permission to default admin to manage contract\n        _addPermission(CONTRACT_BASE_ID, defaultAdmin, PERMISSION_BIT_ADMIN);\n\n        // Mint token ID 0 / don't allow any user mints\n        _setupNewToken(newContractURI, 0);\n\n        // Update default royalties\n        _updateRoyalties(CONTRACT_BASE_ID, defaultRoyaltyConfiguration);\n    }\n\n    /// @notice Updates the royalty configuration for a token\n    /// @param tokenId The token ID to update\n    /// @param newConfiguration The new royalty configuration\n    function updateRoyaltiesForToken(\n        uint256 tokenId,\n        RoyaltyConfiguration memory newConfiguration\n    ) external onlyAdminOrRole(tokenId, PERMISSION_BIT_FUNDS_MANAGER) {\n        _updateRoyalties(tokenId, newConfiguration);\n    }\n\n    /// @notice remove this function from openzeppelin impl\n    /// @dev This makes this internal function a no-op\n    function _setURI(string memory newuri) internal virtual override {}\n\n    /// @notice This gets the next token in line to be minted when minting linearly (default behavior) and updates the counter\n    function _getAndUpdateNextTokenId() internal returns (uint256) {\n        unchecked {\n            return nextTokenId++;\n        }\n    }\n\n    /// @notice Ensure that the next token ID is correct\n    /// @dev This reverts if the invariant doesn't match. This is used for multil token id assumptions\n    /// @param lastTokenId The last token ID\n    function assumeLastTokenIdMatches(uint256 lastTokenId) external view {\n        unchecked {\n            if (nextTokenId - 1 != lastTokenId) {\n                revert TokenIdMismatch(lastTokenId, nextTokenId - 1);\n            }\n        }\n    }\n\n    /// @notice Checks if a user either has a role for a token or if they are the admin\n    /// @dev This is an internal function that is called by the external getter and internal functions\n    /// @param user The user to check\n    /// @param tokenId The token ID to check\n    /// @param role The role to check\n    /// @return true or false if the permission exists for the user given the token id\n    function _isAdminOrRole(address user, uint256 tokenId, uint256 role) internal view returns (bool) {\n        return _hasAnyPermission(tokenId, user, PERMISSION_BIT_ADMIN | role);\n    }\n\n    /// @notice Checks if a user either has a role for a token or if they are the admin\n    /// @param user The user to check\n    /// @param tokenId The token ID to check\n    /// @param role The role to check\n    /// @return true or false if the permission exists for the user given the token id\n    function isAdminOrRole(address user, uint256 tokenId, uint256 role) external view returns (bool) {\n        return _isAdminOrRole(user, tokenId, role);\n    }\n\n    /// @notice Checks if the user is an admin for the given tokenId\n    /// @dev This function reverts if the permission does not exist for the given user and tokenId\n    /// @param user user to check\n    /// @param tokenId tokenId to check\n    /// @param role role to check for admin\n    function _requireAdminOrRole(address user, uint256 tokenId, uint256 role) internal view {\n        if (!(_hasAnyPermission(tokenId, user, PERMISSION_BIT_ADMIN | role) || _hasAnyPermission(CONTRACT_BASE_ID, user, PERMISSION_BIT_ADMIN | role))) {\n            revert UserMissingRoleForToken(user, tokenId, role);\n        }\n    }\n\n    /// @notice Checks if the user is an admin\n    /// @dev This reverts if the user is not an admin for the given token id or contract\n    /// @param user user to check\n    /// @param tokenId tokenId to check\n    function _requireAdmin(address user, uint256 tokenId) internal view {\n        if (!(_hasAnyPermission(tokenId, user, PERMISSION_BIT_ADMIN) || _hasAnyPermission(CONTRACT_BASE_ID, user, PERMISSION_BIT_ADMIN))) {\n            revert UserMissingRoleForToken(user, tokenId, PERMISSION_BIT_ADMIN);\n        }\n    }\n\n    modifier onlyMints() {\n        if (msg.sender != address(mintsManager.zoraMints1155())) {\n            revert OnlyTransfersFromZoraMints();\n        }\n\n        _;\n    }\n\n    /// @notice Modifier checking if the user is an admin or has a role\n    /// @dev This reverts if the msg.sender is not an admin for the given token id or contract\n    /// @param tokenId tokenId to check\n    /// @param role role to check\n    modifier onlyAdminOrRole(uint256 tokenId, uint256 role) {\n        _requireAdminOrRole(msg.sender, tokenId, role);\n        _;\n    }\n\n    /// @notice Modifier checking if the user is an admin\n    /// @dev This reverts if the msg.sender is not an admin for the given token id or contract\n    /// @param tokenId tokenId to check\n    modifier onlyAdmin(uint256 tokenId) {\n        _requireAdmin(msg.sender, tokenId);\n        _;\n    }\n\n    /// @notice Modifier checking if the requested quantity of tokens can be minted for the tokenId\n    /// @dev This reverts if the number that can be minted is exceeded\n    /// @param tokenId token id to check available allowed quantity\n    /// @param quantity requested to be minted\n    modifier canMintQuantity(uint256 tokenId, uint256 quantity) {\n        _requireCanMintQuantity(tokenId, quantity);\n        _;\n    }\n\n    /// @notice Only from approved address for burn\n    /// @param from address that the tokens will be burned from, validate that this is msg.sender or that msg.sender is approved\n    modifier onlyFromApprovedForBurn(address from) {\n        if (from != msg.sender && !isApprovedForAll(from, msg.sender)) {\n            revert Burn_NotOwnerOrApproved(msg.sender, from);\n        }\n\n        _;\n    }\n\n    /// @notice Checks if a user can mint a quantity of a token\n    /// @dev Reverts if the mint exceeds the allowed quantity (or if the token does not exist)\n    /// @param tokenId The token ID to check\n    /// @param quantity The quantity of tokens to mint to check\n    function _requireCanMintQuantity(uint256 tokenId, uint256 quantity) internal view {\n        TokenData storage tokenInformation = tokens[tokenId];\n        if (tokenInformation.totalMinted + quantity > tokenInformation.maxSupply) {\n            revert CannotMintMoreTokens(tokenId, quantity, tokenInformation.totalMinted, tokenInformation.maxSupply);\n        }\n    }\n\n    /// @notice Set up a new token\n    /// @param newURI The URI for the token\n    /// @param maxSupply The maximum supply of the token\n    function setupNewToken(\n        string calldata newURI,\n        uint256 maxSupply\n    ) public onlyAdminOrRole(CONTRACT_BASE_ID, PERMISSION_BIT_MINTER) nonReentrant returns (uint256) {\n        uint256 tokenId = _setupNewTokenAndPermission(newURI, maxSupply, msg.sender, PERMISSION_BIT_ADMIN);\n\n        return tokenId;\n    }\n\n    /// @notice Set up a new token with a create referral\n    /// @param newURI The URI for the token\n    /// @param maxSupply The maximum supply of the token\n    /// @param createReferral The address of the create referral\n    function setupNewTokenWithCreateReferral(\n        string calldata newURI,\n        uint256 maxSupply,\n        address createReferral\n    ) public onlyAdminOrRole(CONTRACT_BASE_ID, PERMISSION_BIT_MINTER) nonReentrant returns (uint256) {\n        uint256 tokenId = _setupNewTokenAndPermission(newURI, maxSupply, msg.sender, PERMISSION_BIT_ADMIN);\n\n        _setCreateReferral(tokenId, createReferral);\n\n        return tokenId;\n    }\n\n    function _setupNewTokenAndPermission(string memory newURI, uint256 maxSupply, address user, uint256 permission) internal returns (uint256) {\n        uint256 tokenId = _setupNewToken(newURI, maxSupply);\n\n        _addPermission(tokenId, user, permission);\n\n        if (bytes(newURI).length > 0) {\n            emit URI(newURI, tokenId);\n        }\n\n        emit SetupNewToken(tokenId, user, newURI, maxSupply);\n\n        return tokenId;\n    }\n\n    /// @notice Update the token URI for a token\n    /// @param tokenId The token ID to update the URI for\n    /// @param _newURI The new URI\n    function updateTokenURI(uint256 tokenId, string memory _newURI) external onlyAdminOrRole(tokenId, PERMISSION_BIT_METADATA) {\n        if (tokenId == CONTRACT_BASE_ID) {\n            revert();\n        }\n        emit URI(_newURI, tokenId);\n        tokens[tokenId].uri = _newURI;\n    }\n\n    /// @notice Update the global contract metadata\n    /// @param _newURI The new contract URI\n    /// @param _newName The new contract name\n    function updateContractMetadata(string memory _newURI, string memory _newName) external onlyAdminOrRole(0, PERMISSION_BIT_METADATA) {\n        tokens[CONTRACT_BASE_ID].uri = _newURI;\n        _setName(_newName);\n        emit ContractMetadataUpdated(msg.sender, _newURI, _newName);\n        emit ContractURIUpdated();\n    }\n\n    function _setupNewToken(string memory newURI, uint256 maxSupply) internal returns (uint256 tokenId) {\n        tokenId = _getAndUpdateNextTokenId();\n        TokenData memory tokenData = TokenData({uri: newURI, maxSupply: maxSupply, totalMinted: 0});\n        tokens[tokenId] = tokenData;\n        emit UpdatedToken(msg.sender, tokenId, tokenData);\n    }\n\n    /// @notice Add a role to a user for a token\n    /// @param tokenId The token ID to add the role to\n    /// @param user The user to add the role to\n    /// @param permissionBits The permission bit to add\n    function addPermission(uint256 tokenId, address user, uint256 permissionBits) external onlyAdmin(tokenId) {\n        _addPermission(tokenId, user, permissionBits);\n    }\n\n    /// @notice Remove a role from a user for a token\n    /// @param tokenId The token ID to remove the role from\n    /// @param user The user to remove the role from\n    /// @param permissionBits The permission bit to remove\n    function removePermission(uint256 tokenId, address user, uint256 permissionBits) external onlyAdmin(tokenId) {\n        _removePermission(tokenId, user, permissionBits);\n\n        // Clear owner field\n        if (tokenId == CONTRACT_BASE_ID && user == config.owner && !_hasAnyPermission(CONTRACT_BASE_ID, user, PERMISSION_BIT_ADMIN)) {\n            _setOwner(address(0));\n        }\n    }\n\n    /// @notice Set the owner of the contract\n    /// @param newOwner The new owner of the contract\n    function setOwner(address newOwner) external onlyAdmin(CONTRACT_BASE_ID) {\n        if (!_hasAnyPermission(CONTRACT_BASE_ID, newOwner, PERMISSION_BIT_ADMIN)) {\n            revert NewOwnerNeedsToBeAdmin();\n        }\n\n        // Update owner field\n        _setOwner(newOwner);\n    }\n\n    /// @notice Getter for the owner singleton of the contract for outside interfaces\n    /// @return the owner of the contract singleton for compat.\n    function owner() external view returns (address) {\n        return config.owner;\n    }\n\n    /// @notice Mint a token to a user as the admin or minter\n    /// @param recipient The recipient of the token\n    /// @param tokenId The token ID to mint\n    /// @param quantity The quantity of tokens to mint\n    /// @param data The data to pass to the onERC1155Received function\n    function adminMint(\n        address recipient,\n        uint256 tokenId,\n        uint256 quantity,\n        bytes memory data\n    ) external nonReentrant onlyAdminOrRole(tokenId, PERMISSION_BIT_MINTER) {\n        // Mint the specified tokens\n        _mint(recipient, tokenId, quantity, data);\n    }\n\n    /// @custom:deprecated mintWithRewards has been deprecated use mint instead\n    /// @notice Mint tokens and payout rewards given a minter contract, minter arguments, and a mint referral\n    /// @param minter The minter contract to use\n    /// @param tokenId The token ID to mint\n    /// @param quantity The quantity of tokens to mint\n    /// @param minterArguments The arguments to pass to the minter\n    /// @param mintReferral The referrer of the mint\n    function mintWithRewards(\n        IMinter1155 minter,\n        uint256 tokenId,\n        uint256 quantity,\n        bytes calldata minterArguments,\n        address mintReferral\n    ) external payable nonReentrant {\n        address[] memory rewardsRecipients = new address[](1);\n        rewardsRecipients[0] = mintReferral;\n        return _mint(minter, tokenId, quantity, rewardsRecipients, minterArguments);\n    }\n\n    /// @notice Mint tokens and payout rewards given a minter contract, minter arguments, and rewards arguments\n    /// @param minter The minter contract to use\n    /// @param tokenId The token ID to mint\n    /// @param quantity The quantity of tokens to mint\n    /// @param rewardsRecipients The addresses of rewards arguments - rewardsRecipients[0] = mintReferral, rewardsRecipients[1] = platformReferral\n    /// @param minterArguments The arguments to pass to the minter\n    function mint(\n        IMinter1155 minter,\n        uint256 tokenId,\n        uint256 quantity,\n        address[] calldata rewardsRecipients,\n        bytes calldata minterArguments\n    ) external payable nonReentrant {\n        _mint(minter, tokenId, quantity, rewardsRecipients, minterArguments);\n    }\n\n    function _mintAndHandleRewards(\n        IMinter1155 minter,\n        address[] memory rewardsRecipients,\n        uint256 valueSent,\n        uint256 totalReward,\n        uint256 tokenId,\n        uint256 quantity,\n        bytes calldata minterArguments\n    ) private {\n        uint256 ethValueSent = _handleRewardsAndGetValueRemaining(valueSent, totalReward, tokenId, rewardsRecipients);\n\n        _executeCommands(minter.requestMint(msg.sender, tokenId, quantity, ethValueSent, minterArguments).commands, ethValueSent, tokenId);\n        emit Purchased(msg.sender, address(minter), tokenId, quantity, valueSent);\n    }\n\n    function _handleRewardsAndGetValueRemaining(\n        uint256 totalSentValue,\n        uint256 totalReward,\n        uint256 tokenId,\n        address[] memory rewardsRecipients\n    ) internal returns (uint256 valueRemaining) {\n        // 1. Get rewards recipients\n\n        // create referral is pulled from storage, if it's not set, defaults to zora reward recipient\n        address createReferral = createReferrals[tokenId];\n        if (createReferral == address(0)) {\n            createReferral = zoraRewardRecipient;\n        }\n\n        // mint referral is passed in arguments to minting functions; if it's not set, defaults to zora reward recipient\n        address mintReferral = rewardsRecipients.length > 0 ? rewardsRecipients[0] : zoraRewardRecipient;\n        if (mintReferral == address(0)) {\n            mintReferral = zoraRewardRecipient;\n        }\n\n        // creator reward recipient is pulled from storage, if it's not set, defaults to zora reward recipient\n        address creatorRewardRecipient = getCreatorRewardRecipient(tokenId);\n        if (creatorRewardRecipient == address(0)) {\n            creatorRewardRecipient = zoraRewardRecipient;\n        }\n\n        // first minter is pulled from storage, if it's not set, defaults to creator reward recipient (which is zora if there is no creator reward recipient set)\n        address firstMinter = firstMinters[tokenId];\n        if (firstMinter == address(0)) {\n            firstMinter = creatorRewardRecipient;\n        }\n\n        // 2. Get rewards amounts - which varies if its a paid or free mint\n\n        RewardsSettings memory settings;\n        if (totalSentValue < totalReward) {\n            revert INVALID_ETH_AMOUNT();\n            // if value sent is the same as the reward amount, we assume its a free mint\n        } else if (totalSentValue == totalReward) {\n            settings = RewardSplitsLib.getRewards(false, totalReward);\n            // otherwise, we assume its a paid mint\n        } else {\n            settings = RewardSplitsLib.getRewards(true, totalReward);\n\n            unchecked {\n                valueRemaining = totalSentValue - totalReward;\n            }\n        }\n\n        // 3. Deposit rewards rewards\n\n        protocolRewards.depositRewards{value: totalReward}(\n            // if there was no creator reward amount, 0 out that address\n            settings.creatorReward == 0 ? address(0) : creatorRewardRecipient,\n            settings.creatorReward,\n            createReferral,\n            settings.createReferralReward,\n            mintReferral,\n            settings.mintReferralReward,\n            firstMinter,\n            settings.firstMinterReward,\n            zoraRewardRecipient,\n            settings.zoraReward\n        );\n    }\n\n    function _mint(IMinter1155 minter, uint256 tokenId, uint256 quantity, address[] memory rewardsRecipients, bytes calldata minterArguments) private {\n        // Require admin from the minter to mint\n        _requireAdminOrRole(address(minter), tokenId, PERMISSION_BIT_MINTER);\n\n        uint256 totalReward = mintsManager.getEthPrice() * quantity;\n\n        _mintAndHandleRewards(minter, rewardsRecipients, msg.value, totalReward, tokenId, quantity, minterArguments);\n    }\n\n    function _getTotalMintsQuantity(uint256[] calldata mintTokenIds, uint256[] calldata quantities) private pure returns (uint256 totalQuantity) {\n        if (mintTokenIds.length != quantities.length) {\n            revert Mint_InvalidMintArrayLength();\n        }\n\n        for (uint256 i = 0; i < mintTokenIds.length; i++) {\n            totalQuantity += quantities[i];\n        }\n    }\n\n    /// @notice Mint tokens and payout rewards given a minter contract, minter arguments, and rewards arguments,\n    /// while MINTs are redeemed to pay for the mint fee, instead of paying with ETH directly.\n    /// The MINTs must have been approved to be transferred to this contract from the msg.sender before calling this function.\n    /// Value sent is used for paid mints, if this is a paid mint\n    /// @param mintTokenIds The MINT token IDs that are to be redeemed\n    /// @param quantities The quantities of each MINT token id to redeem\n    /// @param minter The minter contract to use\n    /// @param tokenId The token ID to mint\n    /// @param rewardsRecipients The addresses of rewards arguments - rewardsRecipients[0] = mintReferral, rewardsRecipients[1] = platformReferral\n    /// @param minterArguments The arguments to pass to the minter\n    /// @param quantityMinted The total quantity of tokens minted\n    function mintWithMints(\n        uint256[] calldata mintTokenIds,\n        uint256[] calldata quantities,\n        IMinter1155 minter,\n        uint256 tokenId,\n        address[] memory rewardsRecipients,\n        bytes calldata minterArguments\n    ) external payable returns (uint256 quantityMinted) {\n        // Require admin from the minter to mint\n        _requireAdminOrRole(address(minter), tokenId, PERMISSION_BIT_MINTER);\n\n        quantityMinted = _getTotalMintsQuantity(mintTokenIds, quantities);\n        IZoraMints1155 mints = mintsManager.zoraMints1155();\n        mints.safeBatchTransferFrom(msg.sender, address(this), mintTokenIds, quantities, \"\");\n        Redemption[] memory redemptions = mints.redeemBatch(mintTokenIds, quantities, address(this));\n\n        uint256 totalEthReward = _getEthRedemptionTotal(redemptions);\n\n        _mintAndHandleRewards(minter, rewardsRecipients, msg.value + totalEthReward, totalEthReward, tokenId, quantityMinted, minterArguments);\n    }\n\n    function _getEthRedemptionTotal(Redemption[] memory redemptions) private pure returns (uint256 totalEth) {\n        for (uint256 i = 0; i < redemptions.length; i++) {\n            if (redemptions[i].tokenAddress != address(0)) {\n                revert NonEthRedemption();\n            }\n\n            totalEth += redemptions[i].valueRedeemed;\n        }\n    }\n\n    function mintFee() external view returns (uint256) {\n        return mintsManager.getEthPrice();\n    }\n\n    /// @notice Get the creator reward recipient address for a specific token.\n    /// @param tokenId The token id to get the creator reward recipient for\n    /// @dev Returns the royalty recipient address for the token if set; otherwise uses the fundsRecipient.\n    /// If both are not set, this contract will be set as the recipient, and an account with\n    /// `PERMISSION_BIT_FUNDS_MANAGER` will be able to withdraw via the `withdrawFor` function.\n    function getCreatorRewardRecipient(uint256 tokenId) public view returns (address) {\n        address royaltyRecipient = getRoyalties(tokenId).royaltyRecipient;\n\n        if (royaltyRecipient != address(0)) {\n            return royaltyRecipient;\n        }\n\n        if (config.fundsRecipient != address(0)) {\n            return config.fundsRecipient;\n        }\n\n        return address(this);\n    }\n\n    /// @notice Set a metadata renderer for a token\n    /// @param tokenId The token ID to set the renderer for\n    /// @param renderer The renderer to set\n    function setTokenMetadataRenderer(uint256 tokenId, IRenderer1155 renderer) external nonReentrant onlyAdminOrRole(tokenId, PERMISSION_BIT_METADATA) {\n        _setRenderer(tokenId, renderer);\n\n        if (tokenId == 0) {\n            emit ContractRendererUpdated(renderer);\n        } else {\n            // We don't know the uri from the renderer but can emit a notification to the indexer here\n            emit URI(\"\", tokenId);\n        }\n    }\n\n    /// Execute Minter Commands ///\n\n    /// @notice Internal functions to execute commands returned by the minter\n    /// @param commands list of command structs\n    /// @param ethValueSent the ethereum value sent in the mint transaction into the contract\n    /// @param tokenId the token id the user requested to mint (0 if the token id is set by the minter itself across the whole contract)\n    function _executeCommands(ICreatorCommands.Command[] memory commands, uint256 ethValueSent, uint256 tokenId) internal {\n        for (uint256 i = 0; i < commands.length; ++i) {\n            ICreatorCommands.CreatorActions method = commands[i].method;\n            if (method == ICreatorCommands.CreatorActions.SEND_ETH) {\n                (address recipient, uint256 amount) = abi.decode(commands[i].args, (address, uint256));\n                if (ethValueSent > amount) {\n                    revert Mint_InsolventSaleTransfer();\n                }\n                if (!TransferHelperUtils.safeSendETH(recipient, amount, TransferHelperUtils.FUNDS_SEND_NORMAL_GAS_LIMIT)) {\n                    revert Mint_ValueTransferFail();\n                }\n            } else if (method == ICreatorCommands.CreatorActions.MINT) {\n                (address recipient, uint256 mintTokenId, uint256 quantity) = abi.decode(commands[i].args, (address, uint256, uint256));\n                if (tokenId != 0 && mintTokenId != tokenId) {\n                    revert Mint_TokenIDMintNotAllowed();\n                }\n                _mint(recipient, tokenId, quantity, \"\");\n            } else {\n                // no-op\n            }\n        }\n    }\n\n    /// @notice Token info getter\n    /// @param tokenId token id to get info for\n    /// @return TokenData struct returned\n    function getTokenInfo(uint256 tokenId) external view returns (TokenData memory) {\n        return tokens[tokenId];\n    }\n\n    /// @notice Proxy setter for sale contracts (only callable by SALES permission or admin)\n    /// @param tokenId The token ID to call the sale contract with\n    /// @param salesConfig The sales config contract to call\n    /// @param data The data to pass to the sales config contract\n    function callSale(uint256 tokenId, IMinter1155 salesConfig, bytes calldata data) external onlyAdminOrRole(tokenId, PERMISSION_BIT_SALES) {\n        _requireAdminOrRole(address(salesConfig), tokenId, PERMISSION_BIT_MINTER);\n        if (!salesConfig.supportsInterface(type(IMinter1155).interfaceId)) {\n            revert Sale_CannotCallNonSalesContract(address(salesConfig));\n        }\n\n        // Get the token id encoded in the calldata for the sales config\n        // Assume that it is the first 32 bytes following the function selector\n        uint256 encodedTokenId = uint256(bytes32(data[4:36]));\n\n        // Ensure the encoded token id matches the passed token id\n        if (encodedTokenId != tokenId) {\n            revert IZoraCreator1155Errors.Call_TokenIdMismatch();\n        }\n\n        (bool success, bytes memory why) = address(salesConfig).call(data);\n        if (!success) {\n            revert CallFailed(why);\n        }\n    }\n\n    /// @notice Proxy setter for renderer contracts (only callable by METADATA permission or admin)\n    /// @param tokenId The token ID to call the renderer contract with\n    /// @param data The data to pass to the renderer contract\n    function callRenderer(uint256 tokenId, bytes memory data) external onlyAdminOrRole(tokenId, PERMISSION_BIT_METADATA) {\n        // We assume any renderers set are checked for EIP165 signature during write stage.\n        (bool success, bytes memory why) = address(getCustomRenderer(tokenId)).call(data);\n        if (!success) {\n            revert CallFailed(why);\n        }\n    }\n\n    /// @notice Returns true if the contract implements the interface defined by interfaceId\n    /// @param interfaceId The interface to check for\n    /// @return if the interfaceId is marked as supported\n    function supportsInterface(\n        bytes4 interfaceId\n    ) public view virtual override(CreatorRoyaltiesControl, ERC1155Upgradeable, IERC165Upgradeable) returns (bool) {\n        return\n            super.supportsInterface(interfaceId) ||\n            interfaceId == type(IZoraCreator1155).interfaceId ||\n            ERC1155Upgradeable.supportsInterface(interfaceId) ||\n            interfaceId == type(IHasSupportedPremintSignatureVersions).interfaceId ||\n            interfaceId == type(ISupportsAABasedDelegatedTokenCreation).interfaceId ||\n            interfaceId == type(IMintWithRewardsRecipients).interfaceId ||\n            interfaceId == type(IMintWithMints).interfaceId;\n    }\n\n    /// Generic 1155 function overrides ///\n\n    /// @notice Mint function that 1) checks quantity 2) keeps track of allowed tokens\n    /// @param to to mint to\n    /// @param id token id to mint\n    /// @param amount of tokens to mint\n    /// @param data as specified by 1155 standard\n    function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual override {\n        _requireCanMintQuantity(id, amount);\n\n        tokens[id].totalMinted += amount;\n\n        super._mint(to, id, amount, data);\n    }\n\n    /// @notice Burns a batch of tokens\n    /// @dev Only the current owner is allowed to burn\n    /// @param from the user to burn from\n    /// @param tokenIds The token ID to burn\n    /// @param amounts The amount of tokens to burn\n    function burnBatch(address from, uint256[] calldata tokenIds, uint256[] calldata amounts) external {\n        if (from != msg.sender && !isApprovedForAll(from, msg.sender)) {\n            revert Burn_NotOwnerOrApproved(msg.sender, from);\n        }\n\n        _burnBatch(from, tokenIds, amounts);\n    }\n\n    function setTransferHook(ITransferHookReceiver transferHook) external onlyAdmin(CONTRACT_BASE_ID) {\n        if (address(transferHook) != address(0)) {\n            if (!transferHook.supportsInterface(type(ITransferHookReceiver).interfaceId)) {\n                revert Config_TransferHookNotSupported(address(transferHook));\n            }\n        }\n\n        config.transferHook = transferHook;\n        emit ConfigUpdated(msg.sender, ConfigUpdate.TRANSFER_HOOK, config);\n    }\n\n    /// @notice Hook before token transfer that checks for a transfer hook integration\n    /// @param operator operator moving the tokens\n    /// @param from from address\n    /// @param to to address\n    /// @param id token id to move\n    /// @param amount amount of token\n    /// @param data data of token\n    function _beforeTokenTransfer(address operator, address from, address to, uint256 id, uint256 amount, bytes memory data) internal override {\n        super._beforeTokenTransfer(operator, from, to, id, amount, data);\n        if (address(config.transferHook) != address(0)) {\n            config.transferHook.onTokenTransfer(address(this), operator, from, to, id, amount, data);\n        }\n    }\n\n    /// @notice Hook before token transfer that checks for a transfer hook integration\n    /// @param operator operator moving the tokens\n    /// @param from from address\n    /// @param to to address\n    /// @param ids token ids to move\n    /// @param amounts amounts of tokens\n    /// @param data data of tokens\n    function _beforeBatchTokenTransfer(\n        address operator,\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) internal override {\n        super._beforeBatchTokenTransfer(operator, from, to, ids, amounts, data);\n        if (address(config.transferHook) != address(0)) {\n            config.transferHook.onTokenTransferBatch({target: address(this), operator: operator, from: from, to: to, ids: ids, amounts: amounts, data: data});\n        }\n    }\n\n    /// @notice Returns the URI for the contract\n    function contractURI() external view override(IERC7572, IZoraCreator1155) returns (string memory) {\n        IRenderer1155 customRenderer = getCustomRenderer(CONTRACT_BASE_ID);\n        if (address(customRenderer) != address(0)) {\n            return customRenderer.contractURI();\n        }\n        return uri(0);\n    }\n\n    /// @notice Returns the URI for a token\n    /// @param tokenId The token ID to return the URI for\n    function uri(uint256 tokenId) public view override(ERC1155Upgradeable, IERC1155MetadataURIUpgradeable) returns (string memory) {\n        if (bytes(tokens[tokenId].uri).length > 0) {\n            return tokens[tokenId].uri;\n        }\n        return _render(tokenId);\n    }\n\n    /// @notice Internal setter for contract admin with no access checks\n    /// @param newOwner new owner address\n    function _setOwner(address newOwner) internal {\n        address lastOwner = config.owner;\n        config.owner = newOwner;\n\n        emit OwnershipTransferred(lastOwner, newOwner);\n        emit ConfigUpdated(msg.sender, ConfigUpdate.OWNER, config);\n    }\n\n    /// @notice Set funds recipient address\n    /// @param fundsRecipient new funds recipient address\n    function setFundsRecipient(address payable fundsRecipient) external onlyAdminOrRole(CONTRACT_BASE_ID, PERMISSION_BIT_FUNDS_MANAGER) {\n        _setFundsRecipient(fundsRecipient);\n    }\n\n    /// @notice Internal no-checks set funds recipient address\n    /// @param fundsRecipient new funds recipient address\n    function _setFundsRecipient(address payable fundsRecipient) internal {\n        config.fundsRecipient = fundsRecipient;\n        emit ConfigUpdated(msg.sender, ConfigUpdate.FUNDS_RECIPIENT, config);\n    }\n\n    /// @notice Allows the create referral to update the address that can claim their rewards\n    function updateCreateReferral(uint256 tokenId, address recipient) external {\n        if (msg.sender != createReferrals[tokenId]) revert ONLY_CREATE_REFERRAL();\n\n        _setCreateReferral(tokenId, recipient);\n    }\n\n    function _setCreateReferral(uint256 tokenId, address recipient) internal {\n        createReferrals[tokenId] = recipient;\n    }\n\n    /// @notice Withdraws all ETH from the contract to the funds recipient address\n    function withdraw() public onlyAdminOrRole(CONTRACT_BASE_ID, PERMISSION_BIT_FUNDS_MANAGER) {\n        uint256 contractValue = address(this).balance;\n        if (!TransferHelperUtils.safeSendETH(config.fundsRecipient, contractValue, TransferHelperUtils.FUNDS_SEND_NORMAL_GAS_LIMIT)) {\n            revert ETHWithdrawFailed(config.fundsRecipient, contractValue);\n        }\n    }\n\n    receive() external payable {}\n\n    ///                                                          ///\n    ///                         MANAGER UPGRADE                  ///\n    ///                                                          ///\n\n    /// @notice Ensures the caller is authorized to upgrade the contract\n    /// @dev This function is called in `upgradeTo` & `upgradeToAndCall`\n    /// @param _newImpl The new implementation address\n    function _authorizeUpgrade(address _newImpl) internal view override onlyAdmin(CONTRACT_BASE_ID) {\n        if (!upgradeGate.isRegisteredUpgradePath(_getImplementation(), _newImpl)) {\n            revert();\n        }\n    }\n\n    /// @notice Returns the current implementation address\n    function implementation() external view returns (address) {\n        return _getImplementation();\n    }\n\n    function supportedPremintSignatureVersions() external pure returns (string[] memory) {\n        return DelegatedTokenCreation.supportedPremintSignatureVersions();\n    }\n\n    /// Sets up a new token using a token configuration and a signature created for the token creation parameters.\n    /// The signature must be created by an account with the PERMISSION_BIT_MINTER role on the contract.\n    /// @param premintConfig abi encoded configuration of token to be created\n    /// @param premintVersion version of the premint configuration\n    /// @param signature EIP-712 Signature created on the premintConfig by an account with the PERMISSION_BIT_MINTER role on the contract.\n    /// @param firstMinter original sender of the transaction, used to set the firstMinter\n    /// @param premintSignerContract if an EIP-1271 based premint, the contract that signed the premint\n    function delegateSetupNewToken(\n        bytes memory premintConfig,\n        bytes32 premintVersion,\n        bytes calldata signature,\n        address firstMinter,\n        address premintSignerContract\n    ) external nonReentrant returns (uint256 newTokenId) {\n        if (firstMinter == address(0)) {\n            revert FirstMinterAddressZero();\n        }\n        (DelegatedTokenSetup memory params, DecodedCreatorAttribution memory attribution, bytes[] memory tokenSetupActions) = DelegatedTokenCreation\n            .decodeAndRecoverDelegatedTokenSetup(premintConfig, premintVersion, signature, address(this), nextTokenId, premintSignerContract);\n\n        // if a token has already been created for a premint config with this uid:\n        if (delegatedTokenId[params.uid] != 0) {\n            // return its token id\n            return delegatedTokenId[params.uid];\n        }\n\n        // this is what attributes this token to have been created by the original creator\n        emit CreatorAttribution(attribution.structHash, attribution.domainName, attribution.version, attribution.creator, attribution.signature);\n\n        return _delegateSetupNewToken(params, attribution.creator, tokenSetupActions, firstMinter);\n    }\n\n    function _delegateSetupNewToken(\n        DelegatedTokenSetup memory params,\n        address creator,\n        bytes[] memory tokenSetupActions,\n        address sender\n    ) internal returns (uint256 newTokenId) {\n        // require that the signer can create new tokens (is a valid creator)\n        _requireAdminOrRole(creator, CONTRACT_BASE_ID, PERMISSION_BIT_MINTER);\n\n        // create the new token; msg sender will have PERMISSION_BIT_ADMIN on the new token\n        newTokenId = _setupNewTokenAndPermission(params.tokenURI, params.maxSupply, msg.sender, PERMISSION_BIT_ADMIN);\n\n        _setCreateReferral(newTokenId, params.createReferral);\n\n        delegatedTokenId[params.uid] = newTokenId;\n\n        firstMinters[newTokenId] = sender;\n\n        // then invoke them, calling account should be original msg.sender, which has admin on the new token\n        _multicallInternal(tokenSetupActions);\n\n        // remove the token creator as admin of the newly created token:\n        _removePermission(newTokenId, msg.sender, PERMISSION_BIT_ADMIN);\n\n        // grant the token creator as admin of the newly created token\n        _addPermission(newTokenId, creator, PERMISSION_BIT_ADMIN);\n    }\n\n    // /// Allows receiving ERC1155 tokens\n    function onERC1155Received(address, address, uint256, uint256, bytes calldata) external view onlyMints returns (bytes4) {\n        return ON_ERC1155_RECEIVED_HASH;\n    }\n\n    function onERC1155BatchReceived(address, address, uint256[] calldata, uint256[] calldata, bytes calldata) external view onlyMints returns (bytes4) {\n        return ON_ERC1155_BATCH_RECEIVED_HASH;\n    }\n}\n"
      },
      "node_modules/@zoralabs/openzeppelin-contracts-upgradeable/contracts/token/ERC1155/ERC1155Upgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// Modifications from OpenZeppelin Contracts (last updated v4.8.0) (token/ERC1155/ERC1155.sol):\n// - Revert strings replaced with custom errors\n// - Decoupled hooks \n//   - `_beforeTokenTransfer` --> `_beforeTokenTransfer` & `_beforeBatchTokenTransfer`\n//   - `_afterTokenTransfer` --> `_afterTokenTransfer` & `_afterBatchTokenTransfer`\n// - Minor gas optimizations (eg. array length caching, unchecked loop iteration)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC1155Upgradeable.sol\";\nimport \"./IERC1155ReceiverUpgradeable.sol\";\nimport \"./extensions/IERC1155MetadataURIUpgradeable.sol\";\nimport \"../../utils/AddressUpgradeable.sol\";\nimport \"../../utils/ContextUpgradeable.sol\";\nimport \"../../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\nerror ERC1155_ADDRESS_ZERO_IS_NOT_A_VALID_OWNER();\nerror ERC1155_ACCOUNTS_AND_IDS_LENGTH_MISMATCH();\nerror ERC1155_IDS_AND_AMOUNTS_LENGTH_MISMATCH();\nerror ERC1155_CALLER_IS_NOT_TOKEN_OWNER_OR_APPROVED();\nerror ERC1155_TRANSFER_TO_ZERO_ADDRESS();\nerror ERC1155_INSUFFICIENT_BALANCE_FOR_TRANSFER();\nerror ERC1155_MINT_TO_ZERO_ADDRESS();\nerror ERC1155_BURN_FROM_ZERO_ADDRESS();\nerror ERC1155_BURN_AMOUNT_EXCEEDS_BALANCE();\nerror ERC1155_SETTING_APPROVAL_FOR_SELF();\nerror ERC1155_ERC1155RECEIVER_REJECTED_TOKENS();\nerror ERC1155_TRANSFER_TO_NON_ERC1155RECEIVER_IMPLEMENTER();\n\n/**\n * @dev Implementation of the basic standard multi-token.\n * See https://eips.ethereum.org/EIPS/eip-1155\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\n *\n * _Available since v3.1._\n */\ncontract ERC1155Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC1155Upgradeable, IERC1155MetadataURIUpgradeable {\n    using AddressUpgradeable for address;\n\n    // Mapping from token ID to account balances\n    mapping(uint256 => mapping(address => uint256)) private _balances;\n\n    // Mapping from account to operator approvals\n    mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n    // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\n    string private _uri;\n\n    /**\n     * @dev See {_setURI}.\n     */\n    function __ERC1155_init(string memory uri_) internal onlyInitializing {\n        __ERC1155_init_unchained(uri_);\n    }\n\n    function __ERC1155_init_unchained(string memory uri_) internal onlyInitializing {\n        _setURI(uri_);\n    }\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) {\n        return\n            interfaceId == type(IERC1155Upgradeable).interfaceId ||\n            interfaceId == type(IERC1155MetadataURIUpgradeable).interfaceId ||\n            super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev See {IERC1155MetadataURI-uri}.\n     *\n     * This implementation returns the same URI for *all* token types. It relies\n     * on the token type ID substitution mechanism\n     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\n     *\n     * Clients calling this function must replace the `\\{id\\}` substring with the\n     * actual token type ID.\n     */\n    function uri(uint256) public view virtual override returns (string memory) {\n        return _uri;\n    }\n\n    /**\n     * @dev See {IERC1155-balanceOf}.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     */\n    function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\n        if (account == address(0)) {\n            revert ERC1155_ADDRESS_ZERO_IS_NOT_A_VALID_OWNER();\n        }\n        return _balances[id][account];\n    }\n\n    /**\n     * @dev See {IERC1155-balanceOfBatch}.\n     *\n     * Requirements:\n     *\n     * - `accounts` and `ids` must have the same length.\n     */\n    function balanceOfBatch(\n        address[] memory accounts,\n        uint256[] memory ids\n    ) public view virtual override returns (uint256[] memory batchBalances) {\n        uint256 numAccounts = accounts.length;\n\n        if (numAccounts != ids.length) {\n            revert ERC1155_ACCOUNTS_AND_IDS_LENGTH_MISMATCH();\n        }\n\n        batchBalances = new uint256[](numAccounts);\n\n        unchecked {\n            for (uint256 i; i < numAccounts; ++i) {\n                batchBalances[i] = balanceOf(accounts[i], ids[i]);\n            }\n        }\n    }\n\n    /**\n     * @dev See {IERC1155-setApprovalForAll}.\n     */\n    function setApprovalForAll(address operator, bool approved) public virtual override {\n        _setApprovalForAll(_msgSender(), operator, approved);\n    }\n\n    /**\n     * @dev See {IERC1155-isApprovedForAll}.\n     */\n    function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\n        return _operatorApprovals[account][operator];\n    }\n\n    /**\n     * @dev See {IERC1155-safeTransferFrom}.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes memory data\n    ) public virtual override {\n        if (from != _msgSender() && !isApprovedForAll(from, _msgSender())) {\n            revert ERC1155_CALLER_IS_NOT_TOKEN_OWNER_OR_APPROVED();\n        }\n        _safeTransferFrom(from, to, id, amount, data);\n    }\n\n    /**\n     * @dev See {IERC1155-safeBatchTransferFrom}.\n     */\n    function safeBatchTransferFrom(\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) public virtual override {\n        if (from != _msgSender() && !isApprovedForAll(from, _msgSender())) {\n            revert ERC1155_CALLER_IS_NOT_TOKEN_OWNER_OR_APPROVED();\n        }\n        _safeBatchTransferFrom(from, to, ids, amounts, data);\n    }\n\n    /**\n     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n     *\n     * Emits a {TransferSingle} event.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     * - `from` must have a balance of tokens of type `id` of at least `amount`.\n     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n     * acceptance magic value.\n     */\n    function _safeTransferFrom(\n        address from,\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes memory data\n    ) internal virtual {\n        if (to == address(0)) {\n            revert ERC1155_TRANSFER_TO_ZERO_ADDRESS();\n        }\n\n        address operator = _msgSender();\n\n        _beforeTokenTransfer(operator, from, to, id, amount, data);\n\n        uint256 fromBalance = _balances[id][from];\n        if (fromBalance < amount) {\n            revert ERC1155_INSUFFICIENT_BALANCE_FOR_TRANSFER();\n        }\n        unchecked {\n            _balances[id][from] = fromBalance - amount;\n        }\n        _balances[id][to] += amount;\n\n        emit TransferSingle(operator, from, to, id, amount);\n\n        _afterTokenTransfer(operator, from, to, id, amount, data);\n\n        _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\n    }\n\n    /**\n     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\n     *\n     * Emits a {TransferBatch} event.\n     *\n     * Requirements:\n     *\n     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n     * acceptance magic value.\n     */\n    function _safeBatchTransferFrom(\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) internal virtual {\n        uint256 numIds = ids.length;\n\n        if (numIds != amounts.length) {\n            revert ERC1155_ACCOUNTS_AND_IDS_LENGTH_MISMATCH();\n        }\n        if (to == address(0)) {\n            revert ERC1155_TRANSFER_TO_ZERO_ADDRESS();\n        }\n\n        address operator = _msgSender();\n\n        _beforeBatchTokenTransfer(operator, from, to, ids, amounts, data);\n\n        uint256 id;\n        uint256 amount;\n        uint256 fromBalance;\n\n        for (uint256 i; i < numIds; ) {\n            id = ids[i];\n            amount = amounts[i];\n            fromBalance = _balances[id][from];\n\n            if (fromBalance < amount) {\n                revert ERC1155_INSUFFICIENT_BALANCE_FOR_TRANSFER();\n            }\n\n            _balances[id][to] += amount;\n\n            unchecked {\n                _balances[id][from] = fromBalance - amount;\n\n                ++i;\n            }\n\n\n        }\n\n        emit TransferBatch(operator, from, to, ids, amounts);\n\n        _afterBatchTokenTransfer(operator, from, to, ids, amounts, data);\n\n        _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\n    }\n\n    /**\n     * @dev Sets a new URI for all token types, by relying on the token type ID\n     * substitution mechanism\n     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\n     *\n     * By this mechanism, any occurrence of the `\\{id\\}` substring in either the\n     * URI or any of the amounts in the JSON file at said URI will be replaced by\n     * clients with the token type ID.\n     *\n     * For example, the `https://token-cdn-domain/\\{id\\}.json` URI would be\n     * interpreted by clients as\n     * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\n     * for token type ID 0x4cce0.\n     *\n     * See {uri}.\n     *\n     * Because these URIs cannot be meaningfully represented by the {URI} event,\n     * this function emits no events.\n     */\n    function _setURI(string memory newuri) internal virtual {\n        _uri = newuri;\n    }\n\n    /**\n     * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\n     *\n     * Emits a {TransferSingle} event.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n     * acceptance magic value.\n     */\n    function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual {\n        if (to == address(0)) {\n            revert ERC1155_MINT_TO_ZERO_ADDRESS();\n        }\n\n        address operator = _msgSender();\n\n        _beforeTokenTransfer(operator, address(0), to, id, amount, data);\n\n        _balances[id][to] += amount;\n\n        emit TransferSingle(operator, address(0), to, id, amount);\n\n        _afterTokenTransfer(operator, address(0), to, id, amount, data);\n\n        _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\n    }\n\n    /**\n     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\n     *\n     * Emits a {TransferBatch} event.\n     *\n     * Requirements:\n     *\n     * - `ids` and `amounts` must have the same length.\n     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n     * acceptance magic value.\n     */\n    function _mintBatch(\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) internal virtual {\n        if (to == address(0)) {\n            revert ERC1155_MINT_TO_ZERO_ADDRESS();\n        }\n\n        uint256 numIds = ids.length;\n\n        if (numIds != amounts.length) {\n            revert ERC1155_IDS_AND_AMOUNTS_LENGTH_MISMATCH();\n        }\n\n        address operator = _msgSender();\n\n        _beforeBatchTokenTransfer(operator, address(0), to, ids, amounts, data);\n\n        for (uint256 i; i < numIds; ) {\n            _balances[ids[i]][to] += amounts[i];\n\n            unchecked {\n                ++i;\n            }\n        }\n\n        emit TransferBatch(operator, address(0), to, ids, amounts);\n\n        _afterBatchTokenTransfer(operator, address(0), to, ids, amounts, data);\n\n        _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\n    }\n\n    /**\n     * @dev Destroys `amount` tokens of token type `id` from `from`\n     *\n     * Emits a {TransferSingle} event.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `from` must have at least `amount` tokens of token type `id`.\n     */\n    function _burn(address from, uint256 id, uint256 amount) internal virtual {\n        if (from == address(0)) {\n            revert ERC1155_BURN_FROM_ZERO_ADDRESS();\n        }\n\n        address operator = _msgSender();\n\n        _beforeTokenTransfer(operator, from, address(0), id, amount, \"\");\n\n        uint256 fromBalance = _balances[id][from];\n\n        if (fromBalance < amount) {\n            revert ERC1155_BURN_AMOUNT_EXCEEDS_BALANCE();\n        }\n        unchecked {\n            _balances[id][from] = fromBalance - amount;\n        }\n\n        emit TransferSingle(operator, from, address(0), id, amount);\n\n        _afterTokenTransfer(operator, from, address(0), id, amount, \"\");\n    }\n\n    /**\n     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\n     *\n     * Emits a {TransferBatch} event.\n     *\n     * Requirements:\n     *\n     * - `ids` and `amounts` must have the same length.\n     */\n    function _burnBatch(address from, uint256[] memory ids, uint256[] memory amounts) internal virtual {\n        if (from == address(0)) {\n            revert ERC1155_BURN_FROM_ZERO_ADDRESS();\n        }\n\n        uint256 numIds = ids.length;\n\n        if (numIds != amounts.length) {\n            revert ERC1155_IDS_AND_AMOUNTS_LENGTH_MISMATCH();\n        }\n\n        address operator = _msgSender();\n\n        _beforeBatchTokenTransfer(operator, from, address(0), ids, amounts, \"\");\n\n        uint256 id;\n        uint256 amount;\n        uint256 fromBalance;\n        for (uint256 i; i < numIds; ) {\n            id = ids[i];\n            amount = amounts[i];\n\n            fromBalance = _balances[id][from];\n\n            if (fromBalance < amount) {\n                revert ERC1155_BURN_AMOUNT_EXCEEDS_BALANCE();\n            }\n\n            unchecked {\n                _balances[id][from] = fromBalance - amount;\n\n                ++i;\n            }\n        }\n\n        emit TransferBatch(operator, from, address(0), ids, amounts);\n\n        _afterBatchTokenTransfer(operator, from, address(0), ids, amounts, \"\");\n    }\n\n    /**\n     * @dev Approve `operator` to operate on all of `owner` tokens\n     *\n     * Emits an {ApprovalForAll} event.\n     */\n    function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\n        if (owner == operator) {\n            revert ERC1155_SETTING_APPROVAL_FOR_SELF();\n        }\n        _operatorApprovals[owner][operator] = approved;\n        emit ApprovalForAll(owner, operator, approved);\n    }\n\n    /**\n     * @dev Hook that is called before a single token transfer.\n     */\n    function _beforeTokenTransfer(\n        address operator,\n        address from,\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes memory data\n    ) internal virtual { }\n\n\n    /**\n     * @dev Hook that is called before a batch token transfer.\n     */\n    function _beforeBatchTokenTransfer(\n        address operator,\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) internal virtual {}\n\n    /**\n     * @dev Hook that is called after a single token transfer.\n     */\n    function _afterTokenTransfer(\n        address operator,\n        address from,\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes memory data\n    ) internal virtual {}\n\n    /**\n     * @dev Hook that is called after a batch token transfer.\n     */\n    function _afterBatchTokenTransfer(\n        address operator,\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) internal virtual {}\n\n    function _doSafeTransferAcceptanceCheck(\n        address operator,\n        address from,\n        address to,\n        uint256 id,\n        uint256 amount,\n        bytes memory data\n    ) private {\n        if (to.isContract()) {\n            try IERC1155ReceiverUpgradeable(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\n                if (response != IERC1155ReceiverUpgradeable.onERC1155Received.selector) {\n                    revert ERC1155_ERC1155RECEIVER_REJECTED_TOKENS();\n                }\n            } catch Error(string memory reason) {\n                revert(reason);\n            } catch {\n                revert ERC1155_TRANSFER_TO_NON_ERC1155RECEIVER_IMPLEMENTER();\n            }\n        }\n    }\n\n    function _doSafeBatchTransferAcceptanceCheck(\n        address operator,\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) private {\n        if (to.isContract()) {\n            try IERC1155ReceiverUpgradeable(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\n                bytes4 response\n            ) {\n                if (response != IERC1155ReceiverUpgradeable.onERC1155BatchReceived.selector) {\n                    revert ERC1155_ERC1155RECEIVER_REJECTED_TOKENS();\n                }\n            } catch Error(string memory reason) {\n                revert(reason);\n            } catch {\n                revert ERC1155_TRANSFER_TO_NON_ERC1155RECEIVER_IMPLEMENTER();\n            }\n        }\n    }\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[47] private __gap;\n}\n"
      },
      "node_modules/@zoralabs/openzeppelin-contracts-upgradeable/contracts/security/ReentrancyGuardUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuardUpgradeable is Initializable {\n    // Booleans are more expensive than uint256 or any type that takes up a full\n    // word because each write operation emits an extra SLOAD to first read the\n    // slot's contents, replace the bits taken up by the boolean, and then write\n    // back. This is the compiler's defense against contract upgrades and\n    // pointer aliasing, and it cannot be disabled.\n\n    // The values being non-zero value makes deployment a bit more expensive,\n    // but in exchange the refund on every call to nonReentrant will be lower in\n    // amount. Since refunds are capped to a percentage of the total\n    // transaction's gas, it is best to keep them low in cases like this one, to\n    // increase the likelihood of the full refund coming into effect.\n    uint256 private constant _NOT_ENTERED = 1;\n    uint256 private constant _ENTERED = 2;\n\n    uint256 private _status;\n\n    function __ReentrancyGuard_init() internal onlyInitializing {\n        __ReentrancyGuard_init_unchained();\n    }\n\n    function __ReentrancyGuard_init_unchained() internal onlyInitializing {\n        _status = _NOT_ENTERED;\n    }\n\n    /**\n     * @dev Prevents a contract from calling itself, directly or indirectly.\n     * Calling a `nonReentrant` function from another `nonReentrant`\n     * function is not supported. It is possible to prevent this from happening\n     * by making the `nonReentrant` function external, and making it call a\n     * `private` function that does the actual work.\n     */\n    modifier nonReentrant() {\n        _nonReentrantBefore();\n        _;\n        _nonReentrantAfter();\n    }\n\n    function _nonReentrantBefore() private {\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\n        require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n        // Any calls to nonReentrant after this point will fail\n        _status = _ENTERED;\n    }\n\n    function _nonReentrantAfter() private {\n        // By storing the original value once again, a refund is triggered (see\n        // https://eips.ethereum.org/EIPS/eip-2200)\n        _status = _NOT_ENTERED;\n    }\n\n    /**\n     * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n     * `nonReentrant` function in the call stack.\n     */\n    function _reentrancyGuardEntered() internal view returns (bool) {\n        return _status == _ENTERED;\n    }\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[49] private __gap;\n}\n"
      },
      "node_modules/@zoralabs/openzeppelin-contracts-upgradeable/contracts/proxy/utils/UUPSUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/UUPSUpgradeable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../interfaces/draft-IERC1822Upgradeable.sol\";\nimport \"../ERC1967/ERC1967UpgradeUpgradeable.sol\";\nimport \"./Initializable.sol\";\n\nerror FUNCTION_MUST_BE_CALLED_THROUGH_DELEGATECALL();\nerror FUNCTION_MUST_BE_CALLED_THROUGH_ACTIVE_PROXY();\nerror UUPS_UPGRADEABLE_MUST_NOT_BE_CALLED_THROUGH_DELEGATECALL();\n\n/**\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\n *\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\n * `UUPSUpgradeable` with a custom implementation of upgrades.\n *\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\n *\n * _Available since v4.1._\n */\nabstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {\n    function __UUPSUpgradeable_init() internal onlyInitializing {\n    }\n\n    function __UUPSUpgradeable_init_unchained() internal onlyInitializing {\n    }\n    /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\n    address private immutable __self = address(this);\n\n    /**\n     * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\n     * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case\n     * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\n     * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\n     * fail.\n     */\n    modifier onlyProxy() {\n        if (address(this) == __self) {\n            revert FUNCTION_MUST_BE_CALLED_THROUGH_DELEGATECALL();\n        }\n        if (_getImplementation() != __self) {\n            revert FUNCTION_MUST_BE_CALLED_THROUGH_ACTIVE_PROXY();\n        }\n        _;\n    }\n\n    /**\n     * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\n     * callable on the implementing contract but not through proxies.\n     */\n    modifier notDelegated() {\n        if (address(this) != __self) {\n            revert UUPS_UPGRADEABLE_MUST_NOT_BE_CALLED_THROUGH_DELEGATECALL();\n        }\n        _;\n    }\n\n    /**\n     * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the\n     * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\n     *\n     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n     * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\n     */\n    function proxiableUUID() external view virtual override notDelegated returns (bytes32) {\n        return _IMPLEMENTATION_SLOT;\n    }\n\n    /**\n     * @dev Upgrade the implementation of the proxy to `newImplementation`.\n     *\n     * Calls {_authorizeUpgrade}.\n     *\n     * Emits an {Upgraded} event.\n     *\n     * @custom:oz-upgrades-unsafe-allow-reachable delegatecall\n     */\n    function upgradeTo(address newImplementation) public virtual onlyProxy {\n        _authorizeUpgrade(newImplementation);\n        _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);\n    }\n\n    /**\n     * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\n     * encoded in `data`.\n     *\n     * Calls {_authorizeUpgrade}.\n     *\n     * Emits an {Upgraded} event.\n     *\n     * @custom:oz-upgrades-unsafe-allow-reachable delegatecall\n     */\n    function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy {\n        _authorizeUpgrade(newImplementation);\n        _upgradeToAndCallUUPS(newImplementation, data, true);\n    }\n\n    /**\n     * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\n     * {upgradeTo} and {upgradeToAndCall}.\n     *\n     * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\n     *\n     * ```solidity\n     * function _authorizeUpgrade(address) internal override onlyOwner {}\n     * ```\n     */\n    function _authorizeUpgrade(address newImplementation) internal virtual;\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[50] private __gap;\n}\n"
      },
      "node_modules/@zoralabs/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC1155MetadataURIUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155MetadataURI.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC1155/extensions/IERC1155MetadataURIUpgradeable.sol\";\n"
      },
      "node_modules/@zoralabs/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC165Upgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/introspection/IERC165Upgradeable.sol\";\n"
      },
      "node_modules/@zoralabs/protocol-rewards/src/interfaces/IProtocolRewards.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\n/// @title IProtocolRewards\n/// @notice The interface for deposits & withdrawals for Protocol Rewards\ninterface IProtocolRewards {\n    /// @notice Rewards Deposit Event\n    /// @param creator Creator for NFT rewards\n    /// @param createReferral Creator referral\n    /// @param mintReferral Mint referral user\n    /// @param firstMinter First minter reward recipient\n    /// @param zora ZORA recipient\n    /// @param from The caller of the deposit\n    /// @param creatorReward Creator reward amount\n    /// @param createReferralReward Creator referral reward\n    /// @param mintReferralReward Mint referral amount\n    /// @param firstMinterReward First minter reward amount\n    /// @param zoraReward ZORA amount\n    event RewardsDeposit(\n        address indexed creator,\n        address indexed createReferral,\n        address indexed mintReferral,\n        address firstMinter,\n        address zora,\n        address from,\n        uint256 creatorReward,\n        uint256 createReferralReward,\n        uint256 mintReferralReward,\n        uint256 firstMinterReward,\n        uint256 zoraReward\n    );\n\n    /// @notice Deposit Event\n    /// @param from From user\n    /// @param to To user (within contract)\n    /// @param reason Optional bytes4 reason for indexing\n    /// @param amount Amount of deposit\n    /// @param comment Optional user comment\n    event Deposit(address indexed from, address indexed to, bytes4 indexed reason, uint256 amount, string comment);\n\n    /// @notice Withdraw Event\n    /// @param from From user\n    /// @param to To user (within contract)\n    /// @param amount Amount of deposit\n    event Withdraw(address indexed from, address indexed to, uint256 amount);\n\n    /// @notice Cannot send to address zero\n    error ADDRESS_ZERO();\n\n    /// @notice Function argument array length mismatch\n    error ARRAY_LENGTH_MISMATCH();\n\n    /// @notice Invalid deposit\n    error INVALID_DEPOSIT();\n\n    /// @notice Invalid signature for deposit\n    error INVALID_SIGNATURE();\n\n    /// @notice Invalid withdraw\n    error INVALID_WITHDRAW();\n\n    /// @notice Signature for withdraw is too old and has expired\n    error SIGNATURE_DEADLINE_EXPIRED();\n\n    /// @notice Low-level ETH transfer has failed\n    error TRANSFER_FAILED();\n\n    /// @notice Generic function to deposit ETH for a recipient, with an optional comment\n    /// @param to Address to deposit to\n    /// @param to Reason system reason for deposit (used for indexing)\n    /// @param comment Optional comment as reason for deposit\n    function deposit(address to, bytes4 why, string calldata comment) external payable;\n\n    /// @notice Generic function to deposit ETH for multiple recipients, with an optional comment\n    /// @param recipients recipients to send the amount to, array aligns with amounts\n    /// @param amounts amounts to send to each recipient, array aligns with recipients\n    /// @param reasons optional bytes4 hash for indexing\n    /// @param comment Optional comment to include with mint\n    function depositBatch(address[] calldata recipients, uint256[] calldata amounts, bytes4[] calldata reasons, string calldata comment) external payable;\n\n    /// @notice Used by Zora ERC-721 & ERC-1155 contracts to deposit protocol rewards\n    /// @param creator Creator for NFT rewards\n    /// @param creatorReward Creator reward amount\n    /// @param createReferral Creator referral\n    /// @param createReferralReward Creator referral reward\n    /// @param mintReferral Mint referral user\n    /// @param mintReferralReward Mint referral amount\n    /// @param firstMinter First minter reward\n    /// @param firstMinterReward First minter reward amount\n    /// @param zora ZORA recipient\n    /// @param zoraReward ZORA amount\n    function depositRewards(\n        address creator,\n        uint256 creatorReward,\n        address createReferral,\n        uint256 createReferralReward,\n        address mintReferral,\n        uint256 mintReferralReward,\n        address firstMinter,\n        uint256 firstMinterReward,\n        address zora,\n        uint256 zoraReward\n    ) external payable;\n\n    /// @notice Withdraw protocol rewards\n    /// @param to Withdraws from msg.sender to this address\n    /// @param amount amount to withdraw\n    function withdraw(address to, uint256 amount) external;\n\n    /// @notice Execute a withdraw of protocol rewards via signature\n    /// @param from Withdraw from this address\n    /// @param to Withdraw to this address\n    /// @param amount Amount to withdraw\n    /// @param deadline Deadline for the signature to be valid\n    /// @param v V component of signature\n    /// @param r R component of signature\n    /// @param s S component of signature\n    function withdrawWithSig(address from, address to, uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external;\n}\n"
      },
      "node_modules/@zoralabs/protocol-rewards/src/abstract/RewardSplits.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\nimport {IProtocolRewards} from \"../interfaces/IProtocolRewards.sol\";\nimport {IRewardSplits} from \"../interfaces/IRewardSplits.sol\";\n\nlibrary RewardSplitsLib {\n    uint256 internal constant BPS_TO_PERCENT = 10_0000000;\n    uint256 internal constant TOTAL_REWARD_PER_MINT_PCT = 10_0000000;\n\n    uint256 internal constant CREATOR_REWARD_PCT = 42_857100; // 42.8571%, roughly 0.000333 ETH at a 0.000777 value\n    uint256 internal constant FIRST_MINTER_REWARD_PCT = 14_228500; // 14.2285%, roughly 0.000111 ETH at a 0.000777 value\n\n    uint256 internal constant CREATE_REFERRAL_FREE_MINT_REWARD_PCT = 14_228500; // 14.2285%, roughly 0.000111 ETH at a 0.000777 value\n    uint256 internal constant MINT_REFERRAL_FREE_MINT_REWARD_PCT = 14_228500; // 14.2285%, roughly 0.000111 ETH at a 0.000777 value\n    uint256 internal constant ZORA_FREE_MINT_REWARD_PCT = 14_228500; // 14.2285%, roughly 0.000111 ETH at a 0.000777 value\n\n    uint256 internal constant CREATE_REFERRAL_PAID_MINT_REWARD_PCT = 28_571400; // 28.5714%, roughly 0.000222 ETH at a 0.000777 value\n    uint256 internal constant MINT_REFERRAL_PAID_MINT_REWARD_PCT = 28_571400; // 28.5714%, roughly 0.000222 ETH at a 0.000777 value\n    uint256 internal constant ZORA_PAID_MINT_REWARD_PCT = 28_571400; // 28.5714%, roughly 0.000222 ETH at a 0.000777 value\n\n    function computeRewardsPct(uint256 totalReward, uint256 rewardPct) internal pure returns (uint256) {\n        return (totalReward * rewardPct) / BPS_TO_PERCENT;\n    }\n\n    function getRewardsSettingsPct(bool paidMint) private pure returns (IRewardSplits.RewardsSettings memory rewardSettings) {\n        rewardSettings.creatorReward = paidMint ? 0 : CREATOR_REWARD_PCT;\n        rewardSettings.createReferralReward = paidMint ? CREATE_REFERRAL_PAID_MINT_REWARD_PCT : CREATE_REFERRAL_FREE_MINT_REWARD_PCT;\n        rewardSettings.mintReferralReward = paidMint ? MINT_REFERRAL_PAID_MINT_REWARD_PCT : MINT_REFERRAL_FREE_MINT_REWARD_PCT;\n        rewardSettings.firstMinterReward = FIRST_MINTER_REWARD_PCT;\n        // do we need this? since its recalculated below?\n        // rewardSettings.zoraReward = totalReward - (rewardSettings.creatorReward + rewardSettings.createReferralReward + rewardSettings.mintReferralReward + rewardSettings.firstMinterReward);\n    }\n\n    function getRewards(bool paidMint, uint256 totalReward) internal pure returns (IRewardSplits.RewardsSettings memory rewardSettings) {\n        rewardSettings = getRewardsSettingsPct(paidMint);\n        rewardSettings.creatorReward = computeRewardsPct(totalReward, rewardSettings.creatorReward);\n        rewardSettings.createReferralReward = computeRewardsPct(totalReward, rewardSettings.createReferralReward);\n        rewardSettings.mintReferralReward = computeRewardsPct(totalReward, rewardSettings.mintReferralReward);\n        rewardSettings.firstMinterReward = computeRewardsPct(totalReward, rewardSettings.firstMinterReward);\n        rewardSettings.zoraReward =\n            totalReward -\n            (rewardSettings.creatorReward + rewardSettings.createReferralReward + rewardSettings.mintReferralReward + rewardSettings.firstMinterReward);\n    }\n}\n\n/// @notice Common logic for between Zora ERC-721 & ERC-1155 contracts for protocol reward splits & deposits\nabstract contract RewardSplits is IRewardSplits {\n    address internal immutable zoraRewardRecipient;\n    IProtocolRewards internal immutable protocolRewards;\n\n    constructor(address _protocolRewards, address _zoraRewardRecipient) payable {\n        if (_protocolRewards == address(0) || _zoraRewardRecipient == address(0)) {\n            revert INVALID_ADDRESS_ZERO();\n        }\n\n        protocolRewards = IProtocolRewards(_protocolRewards);\n        zoraRewardRecipient = _zoraRewardRecipient;\n    }\n\n    function computeTotalReward(uint256 mintPrice, uint256 quantity) public pure returns (uint256) {\n        return mintPrice * quantity;\n    }\n}\n"
      },
      "node_modules/@zoralabs/protocol-rewards/src/abstract/ERC1155/ERC1155RewardsStorageV1.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\ncontract ERC1155RewardsStorageV1 {\n    mapping(uint256 => address) public createReferrals;\n\n    mapping(uint256 => address) public firstMinters;\n}\n"
      },
      "node_modules/@zoralabs/openzeppelin-contracts-upgradeable/contracts/utils/math/MathUpgradeable.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 MathUpgradeable {\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(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n        unchecked {\n            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n            // variables such that product = prod1 * 2^256 + prod0.\n            uint256 prod0; // 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, \"Math: mulDiv overflow\");\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(uint256 x, uint256 y, uint256 denominator, Rounding rounding) 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 256, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log256(value);\n            return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\n        }\n    }\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/interfaces/IZoraCreator1155.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport {IERC165Upgradeable} from \"@zoralabs/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC165Upgradeable.sol\";\nimport {IERC1155MetadataURIUpgradeable} from \"@zoralabs/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC1155MetadataURIUpgradeable.sol\";\nimport {IZoraCreator1155TypesV1} from \"../nft/IZoraCreator1155TypesV1.sol\";\nimport {IZoraCreator1155Errors} from \"./IZoraCreator1155Errors.sol\";\nimport {IRenderer1155} from \"../interfaces/IRenderer1155.sol\";\nimport {IMinter1155} from \"../interfaces/IMinter1155.sol\";\nimport {IOwnable} from \"../interfaces/IOwnable.sol\";\nimport {IVersionedContract} from \"@zoralabs/shared-contracts/interfaces/IVersionedContract.sol\";\nimport {ICreatorRoyaltiesControl} from \"../interfaces/ICreatorRoyaltiesControl.sol\";\nimport {IZoraCreator1155DelegatedCreation} from \"./IZoraCreator1155DelegatedCreation.sol\";\nimport {IMintWithRewardsRecipients} from \"./IMintWithRewardsRecipients.sol\";\nimport {IMintWithMints} from \"@zoralabs/mints-contracts/src/IMintWithMints.sol\";\n\n/*\n\n\n             ░░░░░░░░░░░░░░              \n        ░░▒▒░░░░░░░░░░░░░░░░░░░░        \n      ░░▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░      \n    ░░▒▒▒▒░░░░░░░░░░░░░░    ░░░░░░░░    \n   ░▓▓▒▒▒▒░░░░░░░░░░░░        ░░░░░░░    \n  ░▓▓▓▒▒▒▒░░░░░░░░░░░░        ░░░░░░░░  \n  ░▓▓▓▒▒▒▒░░░░░░░░░░░░░░    ░░░░░░░░░░  \n  ░▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░  \n  ░▓▓▓▓▓▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░  \n   ░▓▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░  \n    ░░▓▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░    \n    ░░▓▓▓▓▓▓▒▒▒▒▒▒▒▒░░░░░░░░░▒▒▒▒▒░░    \n      ░░▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░      \n          ░░▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░░          \n\n               OURS TRULY,\n\n */\n\n/// @notice Main interface for the ZoraCreator1155 contract\n/// @author @iainnash / @tbtstl\ninterface IZoraCreator1155 is\n    IZoraCreator1155TypesV1,\n    IZoraCreator1155Errors,\n    IVersionedContract,\n    IOwnable,\n    IERC1155MetadataURIUpgradeable,\n    IZoraCreator1155DelegatedCreation,\n    IMintWithRewardsRecipients,\n    IMintWithMints\n{\n    function PERMISSION_BIT_ADMIN() external returns (uint256);\n\n    /// @notice This user role allows for only mint actions to be performed\n    function PERMISSION_BIT_MINTER() external returns (uint256);\n\n    /// @notice This user role allows for only managing sales configurations\n    function PERMISSION_BIT_SALES() external returns (uint256);\n\n    /// @notice This user role allows for only managing metadata configuration\n    function PERMISSION_BIT_METADATA() external returns (uint256);\n\n    /// @notice This user role allows for only withdrawing funds and setting funds withdraw address\n    function PERMISSION_BIT_FUNDS_MANAGER() external returns (uint256);\n\n    /// @notice Used to label the configuration update type\n    enum ConfigUpdate {\n        OWNER,\n        FUNDS_RECIPIENT,\n        TRANSFER_HOOK\n    }\n    event ConfigUpdated(address indexed updater, ConfigUpdate indexed updateType, ContractConfig newConfig);\n\n    event UpdatedToken(address indexed from, uint256 indexed tokenId, TokenData tokenData);\n    event SetupNewToken(uint256 indexed tokenId, address indexed sender, string newURI, uint256 maxSupply);\n\n    function setOwner(address newOwner) external;\n\n    function owner() external view returns (address);\n\n    event ContractRendererUpdated(IRenderer1155 renderer);\n    event ContractMetadataUpdated(address indexed updater, string uri, string name);\n    event Purchased(address indexed sender, address indexed minter, uint256 indexed tokenId, uint256 quantity, uint256 value);\n\n    /// @dev Deprecated: call mint\n    function mintWithRewards(IMinter1155 minter, uint256 tokenId, uint256 quantity, bytes calldata minterArguments, address mintReferral) external payable;\n\n    function adminMint(address recipient, uint256 tokenId, uint256 quantity, bytes memory data) external;\n\n    function burnBatch(address user, uint256[] calldata tokenIds, uint256[] calldata amounts) external;\n\n    /// @notice Contract call to setupNewToken\n    /// @param tokenURI URI for the token\n    /// @param maxSupply maxSupply for the token, set to 0 for open edition\n    function setupNewToken(string memory tokenURI, uint256 maxSupply) external returns (uint256 tokenId);\n\n    function setupNewTokenWithCreateReferral(string calldata newURI, uint256 maxSupply, address createReferral) external returns (uint256);\n\n    function getCreatorRewardRecipient(uint256 tokenId) external view returns (address);\n\n    function updateTokenURI(uint256 tokenId, string memory _newURI) external;\n\n    function updateContractMetadata(string memory _newURI, string memory _newName) external;\n\n    // Public interface for `setTokenMetadataRenderer(uint256, address) has been deprecated.\n\n    function contractURI() external view returns (string memory);\n\n    function assumeLastTokenIdMatches(uint256 tokenId) external;\n\n    function updateRoyaltiesForToken(uint256 tokenId, ICreatorRoyaltiesControl.RoyaltyConfiguration memory royaltyConfiguration) external;\n\n    /// @notice Set funds recipient address\n    /// @param fundsRecipient new funds recipient address\n    function setFundsRecipient(address payable fundsRecipient) external;\n\n    /// @notice Allows the create referral to update the address that can claim their rewards\n    function updateCreateReferral(uint256 tokenId, address recipient) external;\n\n    function addPermission(uint256 tokenId, address user, uint256 permissionBits) external;\n\n    function removePermission(uint256 tokenId, address user, uint256 permissionBits) external;\n\n    function isAdminOrRole(address user, uint256 tokenId, uint256 role) external view returns (bool);\n\n    function getTokenInfo(uint256 tokenId) external view returns (TokenData memory);\n\n    function callRenderer(uint256 tokenId, bytes memory data) external;\n\n    function callSale(uint256 tokenId, IMinter1155 salesConfig, bytes memory data) external;\n\n    function mintFee() external view returns (uint256);\n\n    /// @notice Withdraws all ETH from the contract to the funds recipient address\n    function withdraw() external;\n\n    /// @notice Returns the current implementation address\n    function implementation() external view returns (address);\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/interfaces/IZoraCreator1155Initializer.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport {ICreatorRoyaltiesControl} from \"../interfaces/ICreatorRoyaltiesControl.sol\";\n\ninterface IZoraCreator1155Initializer {\n    function initialize(\n        string memory contractName,\n        string memory newContractURI,\n        ICreatorRoyaltiesControl.RoyaltyConfiguration memory defaultRoyaltyConfiguration,\n        address payable defaultAdmin,\n        bytes[] calldata setupActions\n    ) external;\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/interfaces/IERC7572.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\ninterface IERC7572 {\n    function contractURI() external view returns (string memory);\n\n    event ContractURIUpdated();\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/version/ContractVersionBase.sol": {
        "content": "// This file is automatically generated by code; do not manually update\n// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\nimport {IVersionedContract} from \"@zoralabs/shared-contracts/interfaces/IVersionedContract.sol\";\n\n/// @title ContractVersionBase\n/// @notice Base contract for versioning contracts\ncontract ContractVersionBase is IVersionedContract {\n    /// @notice The version of the contract\n    function contractVersion() external pure override returns (string memory) {\n        return \"2.9.0\";\n    }\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/permissions/CreatorPermissionControl.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\nimport {CreatorPermissionStorageV1} from \"./CreatorPermissionStorageV1.sol\";\nimport {ICreatorPermissionControl} from \"../interfaces/ICreatorPermissionControl.sol\";\n\n/// Imagine. Mint. Enjoy.\n/// @author @iainnash / @tbtstl\ncontract CreatorPermissionControl is CreatorPermissionStorageV1, ICreatorPermissionControl {\n    /// @notice Check if the user has any of the given permissions\n    /// @dev if multiple permissions are passed in this checks for any one of those permissions\n    /// @return true or false if any of the passed in permissions apply\n    function _hasAnyPermission(uint256 tokenId, address user, uint256 permissionBits) internal view returns (bool) {\n        // Does a bitwise and and checks if any of those permissions match\n        return permissions[tokenId][user] & permissionBits > 0;\n    }\n\n    /// @notice addPermission – internal function to add a set of permission bits to a user\n    /// @param tokenId token id to add the permission to (0 indicates contract-wide add)\n    /// @param user user to update permissions for\n    /// @param permissionBits bits to add permissions to\n    function _addPermission(uint256 tokenId, address user, uint256 permissionBits) internal {\n        uint256 tokenPermissions = permissions[tokenId][user];\n        tokenPermissions |= permissionBits;\n        permissions[tokenId][user] = tokenPermissions;\n        emit UpdatedPermissions(tokenId, user, tokenPermissions);\n    }\n\n    /// @notice _clearPermission clear permissions for user\n    /// @param tokenId token id to clear permission from (0 indicates contract-wide action)\n    function _clearPermissions(uint256 tokenId, address user) internal {\n        permissions[tokenId][user] = 0;\n        emit UpdatedPermissions(tokenId, user, 0);\n    }\n\n    /// @notice _removePermission removes permissions for user\n    /// @param tokenId token id to clear permission from (0 indicates contract-wide action)\n    /// @param user user to manage permissions for\n    /// @param permissionBits set of permission bits to remove\n    function _removePermission(uint256 tokenId, address user, uint256 permissionBits) internal {\n        uint256 tokenPermissions = permissions[tokenId][user];\n        tokenPermissions &= ~permissionBits;\n        permissions[tokenId][user] = tokenPermissions;\n        emit UpdatedPermissions(tokenId, user, tokenPermissions);\n    }\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/renderer/CreatorRendererControl.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\nimport {CreatorRendererStorageV1} from \"./CreatorRendererStorageV1.sol\";\nimport {IRenderer1155} from \"../interfaces/IRenderer1155.sol\";\nimport {ITransferHookReceiver} from \"../interfaces/ITransferHookReceiver.sol\";\nimport {SharedBaseConstants} from \"../shared/SharedBaseConstants.sol\";\n\n/// @title CreatorRendererControl\n/// @notice Contract for managing the renderer of an 1155 contract\nabstract contract CreatorRendererControl is CreatorRendererStorageV1, SharedBaseConstants {\n    function _setRenderer(uint256 tokenId, IRenderer1155 renderer) internal {\n        customRenderers[tokenId] = renderer;\n        if (address(renderer) != address(0)) {\n            if (!renderer.supportsInterface(type(IRenderer1155).interfaceId)) {\n                revert RendererNotValid(address(renderer));\n            }\n        }\n\n        emit RendererUpdated({tokenId: tokenId, renderer: address(renderer), user: msg.sender});\n    }\n\n    /// @notice Return the renderer for a given token\n    /// @dev Returns address 0 for no results\n    /// @param tokenId The token to get the renderer for\n    function getCustomRenderer(uint256 tokenId) public view returns (IRenderer1155 customRenderer) {\n        customRenderer = customRenderers[tokenId];\n        if (address(customRenderer) == address(0)) {\n            customRenderer = customRenderers[CONTRACT_BASE_ID];\n        }\n    }\n\n    /// @notice Function called to render when an empty tokenURI exists on the contract\n    function _render(uint256 tokenId) internal view returns (string memory) {\n        return getCustomRenderer(tokenId).uri(tokenId);\n    }\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/royalties/CreatorRoyaltiesControl.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\nimport {CreatorRoyaltiesStorageV1} from \"./CreatorRoyaltiesStorageV1.sol\";\nimport {ICreatorRoyaltiesControl} from \"../interfaces/ICreatorRoyaltiesControl.sol\";\nimport {SharedBaseConstants} from \"../shared/SharedBaseConstants.sol\";\nimport {ICreatorRoyaltyErrors} from \"../interfaces/ICreatorRoyaltiesControl.sol\";\nimport {IERC2981} from \"@openzeppelin/contracts/interfaces/IERC2981.sol\";\n\n/// Imagine. Mint. Enjoy.\n/// @title CreatorRoyaltiesControl\n/// @author ZORA @iainnash / @tbtstl\n/// @notice Contract for managing the royalties of an 1155 contract\nabstract contract CreatorRoyaltiesControl is CreatorRoyaltiesStorageV1, SharedBaseConstants {\n    uint256 immutable ROYALTY_BPS_TO_PERCENT = 10_000;\n\n    /// @notice The royalty information for a given token.\n    /// @param tokenId The token ID to get the royalty information for.\n    function getRoyalties(uint256 tokenId) public view returns (RoyaltyConfiguration memory) {\n        if (royalties[tokenId].royaltyRecipient != address(0)) {\n            return royalties[tokenId];\n        }\n        // Otherwise, return default.\n        return royalties[CONTRACT_BASE_ID];\n    }\n\n    /// @notice Returns the royalty information for a given token.\n    /// @param tokenId The token ID to get the royalty information for.\n    /// @param salePrice The sale price of the NFT asset specified by tokenId\n    function royaltyInfo(uint256 tokenId, uint256 salePrice) public view returns (address receiver, uint256 royaltyAmount) {\n        RoyaltyConfiguration memory config = getRoyalties(tokenId);\n        royaltyAmount = (config.royaltyBPS * salePrice) / ROYALTY_BPS_TO_PERCENT;\n        receiver = config.royaltyRecipient;\n    }\n\n    function _updateRoyalties(uint256 tokenId, RoyaltyConfiguration memory configuration) internal {\n        // If a nonzero royalty mint schedule is set:\n        if (configuration.royaltyMintSchedule != 0) {\n            // Set the value to zero\n            configuration.royaltyMintSchedule = 0;\n        }\n        // Don't allow setting royalties to burn address\n        if (configuration.royaltyRecipient == address(0) && configuration.royaltyBPS > 0) {\n            revert ICreatorRoyaltyErrors.InvalidMintSchedule();\n        }\n        royalties[tokenId] = configuration;\n\n        emit UpdatedRoyalties(tokenId, msg.sender, configuration);\n    }\n\n    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n        return interfaceId == type(IERC2981).interfaceId;\n    }\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/interfaces/ICreatorCommands.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport {ICreatorCommands} from \"@zoralabs/shared-contracts/interfaces/ICreatorCommands.sol\";\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/interfaces/IMinter1155.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport {IMinter1155} from \"@zoralabs/shared-contracts/interfaces/IMinter1155.sol\";\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/interfaces/IRenderer1155.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport {IERC165Upgradeable} from \"@zoralabs/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC165Upgradeable.sol\";\n\n/// @dev IERC165 type required\ninterface IRenderer1155 is IERC165Upgradeable {\n    /// @notice Called for assigned tokenId, or when token id is globally set to a renderer\n    /// @dev contract target is assumed to be msg.sender\n    /// @param tokenId token id to get uri for\n    function uri(uint256 tokenId) external view returns (string memory);\n\n    /// @notice Only called for tokenId == 0\n    /// @dev contract target is assumed to be msg.sender\n    function contractURI() external view returns (string memory);\n\n    /// @notice Sets up renderer from contract\n    /// @param initData data to setup renderer with\n    /// @dev contract target is assumed to be msg.sender\n    function setup(bytes memory initData) external;\n\n    // IERC165 type required – set in base helper\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/interfaces/ITransferHookReceiver.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport {IERC165Upgradeable} from \"@zoralabs/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC165Upgradeable.sol\";\n\ninterface ITransferHookReceiver is IERC165Upgradeable {\n    /// @notice Token transfer batch callback\n    /// @param target target contract for transfer\n    /// @param operator operator address for transfer\n    /// @param from user address for amount transferred\n    /// @param to user address for amount transferred\n    /// @param ids list of token ids transferred\n    /// @param amounts list of values transferred\n    /// @param data data as perscribed by 1155 standard\n    function onTokenTransferBatch(\n        address target,\n        address operator,\n        address from,\n        address to,\n        uint256[] memory ids,\n        uint256[] memory amounts,\n        bytes memory data\n    ) external;\n\n    /// @notice Token transfer batch callback\n    /// @param target target contract for transfer\n    /// @param operator operator address for transfer\n    /// @param from user address for amount transferred\n    /// @param to user address for amount transferred\n    /// @param id token id transferred\n    /// @param amount value transferred\n    /// @param data data as perscribed by 1155 standard\n    function onTokenTransfer(address target, address operator, address from, address to, uint256 id, uint256 amount, bytes memory data) external;\n    // IERC165 type required\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/interfaces/IUpgradeGate.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\n/// @notice Factory Upgrade Gate Admin Factory Implementation – Allows specific contract upgrades as a safety measure\ninterface IUpgradeGate {\n    /// @notice Event emitted when upgrade gate is emitted\n    event UpgradeGateSetup();\n\n    /// @notice If an implementation is registered by the Builder DAO as an optional upgrade\n    /// @param baseImpl The base implementation address\n    /// @param upgradeImpl The upgrade implementation address\n    function isRegisteredUpgradePath(address baseImpl, address upgradeImpl) external view returns (bool);\n\n    /// @notice Called by the Builder DAO to offer implementation upgrades for created DAOs\n    /// @param baseImpls The base implementation addresses\n    /// @param upgradeImpl The upgrade implementation address\n    function registerUpgradePath(address[] memory baseImpls, address upgradeImpl) external;\n\n    /// @notice Called by the Builder DAO to remove an upgrade\n    /// @param baseImpl The base implementation address\n    /// @param upgradeImpl The upgrade implementation address\n    function removeUpgradePath(address baseImpl, address upgradeImpl) external;\n\n    event UpgradeRegistered(address indexed baseImpl, address indexed upgradeImpl);\n    event UpgradeRemoved(address indexed baseImpl, address indexed upgradeImpl);\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/legacy-naming/LegacyNamingControl.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\nimport {ILegacyNaming} from \"@zoralabs/shared-contracts/interfaces/ILegacyNaming.sol\";\nimport {LegacyNamingStorageV1} from \"./LegacyNamingStorageV1.sol\";\n\n/// @title LegacyNamingControl\n/// @notice Contract for managing the name and symbol of an 1155 contract in the legacy naming scheme\ncontract LegacyNamingControl is LegacyNamingStorageV1, ILegacyNaming {\n    /// @notice The name of the contract\n    function name() external view returns (string memory) {\n        return _name;\n    }\n\n    /// @notice The token symbol of the contract\n    function symbol() external pure returns (string memory) {}\n\n    function _setName(string memory _newName) internal {\n        _name = _newName;\n    }\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/utils/PublicMulticall.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport \"@openzeppelin/contracts/utils/Address.sol\";\n\n/// @title PublicMulticall\n/// @notice Contract for executing a batch of function calls on this contract\nabstract contract PublicMulticall {\n    /**\n     * @notice Receives and executes a batch of function calls on this contract.\n     */\n    function multicall(bytes[] calldata data) public virtual returns (bytes[] memory results) {\n        results = new bytes[](data.length);\n        for (uint256 i = 0; i < data.length; i++) {\n            results[i] = Address.functionDelegateCall(address(this), data[i]);\n        }\n    }\n\n    /**\n     * @notice Receives and executes a batch of function calls on this contract.\n     */\n    function _multicallInternal(bytes[] memory data) internal virtual returns (bytes[] memory results) {\n        results = new bytes[](data.length);\n        for (uint256 i = 0; i < data.length; i++) {\n            results[i] = Address.functionDelegateCall(address(this), data[i]);\n        }\n    }\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/shared/SharedBaseConstants.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\ncontract SharedBaseConstants {\n    uint256 public constant CONTRACT_BASE_ID = 0;\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/utils/TransferHelperUtils.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\n/// @title TransferHelperUtils\n/// @notice Helper functions for sending ETH\nlibrary TransferHelperUtils {\n    /// @dev Gas limit to send funds\n    uint256 internal constant FUNDS_SEND_LOW_GAS_LIMIT = 110_000;\n\n    // @dev Gas limit to send funds – usable for splits, can use with withdraws\n    uint256 internal constant FUNDS_SEND_NORMAL_GAS_LIMIT = 310_000;\n\n    /// @notice Sends ETH to a recipient, making conservative estimates to not run out of gas\n    /// @param recipient The address to send ETH to\n    /// @param value The amount of ETH to send\n    function safeSendETH(address recipient, uint256 value, uint256 gasLimit) internal returns (bool success) {\n        (success, ) = recipient.call{value: value, gas: gasLimit}(\"\");\n    }\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/nft/ZoraCreator1155StorageV1.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\nimport {IZoraCreator1155TypesV1} from \"./IZoraCreator1155TypesV1.sol\";\n\n/*\n\n\n             ░░░░░░░░░░░░░░              \n        ░░▒▒░░░░░░░░░░░░░░░░░░░░        \n      ░░▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░      \n    ░░▒▒▒▒░░░░░░░░░░░░░░    ░░░░░░░░    \n   ░▓▓▒▒▒▒░░░░░░░░░░░░        ░░░░░░░    \n  ░▓▓▓▒▒▒▒░░░░░░░░░░░░        ░░░░░░░░  \n  ░▓▓▓▒▒▒▒░░░░░░░░░░░░░░    ░░░░░░░░░░  \n  ░▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░  \n  ░▓▓▓▓▓▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░  \n   ░▓▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░  \n    ░░▓▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░    \n    ░░▓▓▓▓▓▓▒▒▒▒▒▒▒▒░░░░░░░░░▒▒▒▒▒░░    \n      ░░▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░      \n          ░░▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░░          \n\n               OURS TRULY,\n\n\n    github.com/ourzora/zora-1155-contracts\n\n */\n\n/// Imagine. Mint. Enjoy.\n/// @notice Storage for 1155 contract\n/// @author @iainnash / @tbtstl\ncontract ZoraCreator1155StorageV1 is IZoraCreator1155TypesV1 {\n    /// @notice token data stored for each token\n    mapping(uint256 => TokenData) internal tokens;\n\n    /// @notice metadata renderer contract for each token\n    mapping(uint256 => address) public metadataRendererContract;\n\n    /// @notice next token id available when using a linear mint style (default for launch)\n    uint256 public nextTokenId;\n\n    /// @notice Global contract configuration\n    ContractConfig public config;\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[50] private __gap;\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/interfaces/IZoraCreator1155Errors.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\nimport {IZoraCreator1155Errors} from \"@zoralabs/shared-contracts/interfaces/errors/IZoraCreator1155Errors.sol\";\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/delegation/ERC1155DelegationStorageV1.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\ncontract ERC1155DelegationStorageV1 {\n    mapping(uint32 => uint256) public delegatedTokenId;\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/interfaces/IZoraCreator1155DelegatedCreation.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\ninterface IHasCreatorAttribution {\n    event CreatorAttribution(bytes32 structHash, string domainName, string version, address creator, bytes signature);\n}\n\ninterface IHasSupportedPremintSignatureVersions {\n    function supportedPremintSignatureVersions() external pure returns (string[] memory);\n}\n\n// this is the current version of the Zora Token contract creation\ninterface ISupportsAABasedDelegatedTokenCreation {\n    function delegateSetupNewToken(\n        bytes memory premintConfigEncoded,\n        bytes32 premintVersion,\n        bytes calldata signature,\n        address sender,\n        address premintSignerContract\n    ) external returns (uint256 newTokenId);\n}\n\ninterface IZoraCreator1155DelegatedCreation is IHasCreatorAttribution, IHasSupportedPremintSignatureVersions, ISupportsAABasedDelegatedTokenCreation {}\n\n// this was the legacy interface which has both functions bundled in it - ideally these would be defined in their\n// own interfaces that can be checked if the interface method is supported.  going forward (above) they are separate\ninterface IZoraCreator1155DelegatedCreationLegacy {\n    event CreatorAttribution(bytes32 structHash, string domainName, string version, address creator, bytes signature);\n\n    function supportedPremintSignatureVersions() external pure returns (string[] memory);\n\n    function delegateSetupNewToken(\n        bytes memory premintConfigEncoded,\n        bytes32 premintVersion,\n        bytes calldata signature,\n        address sender\n    ) external returns (uint256 newTokenId);\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/interfaces/IMintWithRewardsRecipients.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport {IMinter1155} from \"./IMinter1155.sol\";\n\ninterface IMintWithRewardsRecipients {\n    /// @notice Mint tokens and payout rewards given a minter contract, minter arguments, and rewards arguments\n    /// @param minter The minter contract to use\n    /// @param tokenId The token ID to mint\n    /// @param quantity The quantity of tokens to mint\n    /// @param rewardsRecipients The addresses of rewards arguments - mintReferral and platformReferral\n    /// @param minterArguments The arguments to pass to the minter\n    function mint(IMinter1155 minter, uint256 tokenId, uint256 quantity, address[] memory rewardsRecipients, bytes calldata minterArguments) external payable;\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/delegation/ZoraCreator1155Attribution.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\nimport {IMinter1155} from \"../interfaces/IMinter1155.sol\";\nimport {IZoraCreator1155} from \"../interfaces/IZoraCreator1155.sol\";\nimport {IZoraCreator1155Errors} from \"@zoralabs/shared-contracts/interfaces/errors/IZoraCreator1155Errors.sol\";\nimport {ICreatorRoyaltiesControl} from \"../interfaces/ICreatorRoyaltiesControl.sol\";\nimport {ECDSAUpgradeable} from \"@zoralabs/openzeppelin-contracts-upgradeable/contracts/utils/cryptography/ECDSAUpgradeable.sol\";\nimport {ZoraCreatorFixedPriceSaleStrategy} from \"../minters/fixed-price/ZoraCreatorFixedPriceSaleStrategy.sol\";\nimport {PremintEncoding} from \"@zoralabs/shared-contracts/premint/PremintEncoding.sol\";\nimport {IERC20Minter, ERC20Minter} from \"../minters/erc20/ERC20Minter.sol\";\nimport {IERC1271} from \"../interfaces/IERC1271.sol\";\n\nimport {PremintConfig, ContractCreationConfig, TokenCreationConfig, PremintConfigV2, TokenCreationConfigV2, Erc20TokenCreationConfigV1, Erc20PremintConfigV1} from \"@zoralabs/shared-contracts/entities/Premint.sol\";\n\nlibrary ZoraCreator1155Attribution {\n    string internal constant NAME = \"Preminter\";\n    bytes32 internal constant HASHED_NAME = keccak256(bytes(NAME));\n\n    /**\n     * @dev Returns the domain separator for the specified chain.\n     */\n    function _domainSeparatorV4(uint256 chainId, address verifyingContract, bytes32 hashedName, bytes32 hashedVersion) private pure returns (bytes32) {\n        return _buildDomainSeparator(hashedName, hashedVersion, verifyingContract, chainId);\n    }\n\n    function _buildDomainSeparator(bytes32 nameHash, bytes32 versionHash, address verifyingContract, uint256 chainId) private pure returns (bytes32) {\n        return keccak256(abi.encode(TYPE_HASH, nameHash, versionHash, chainId, verifyingContract));\n    }\n\n    function _hashTypedDataV4(\n        bytes32 structHash,\n        bytes32 hashedName,\n        bytes32 hashedVersion,\n        address verifyingContract,\n        uint256 chainId\n    ) private pure returns (bytes32) {\n        return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(chainId, verifyingContract, hashedName, hashedVersion), structHash);\n    }\n\n    /// @notice Define magic value to verify smart contract signatures (ERC1271).\n    bytes4 internal constant MAGIC_VALUE = bytes4(keccak256(\"isValidSignature(bytes32,bytes)\"));\n\n    function recoverSignerHashed(\n        bytes32 hashedPremintConfig,\n        bytes calldata signature,\n        address erc1155Contract,\n        bytes32 signatureVersion,\n        uint256 chainId,\n        address premintSignerContract\n    ) internal view returns (address signatory) {\n        // first validate the signature - the creator must match the signer of the message\n        bytes32 digest = premintHashedTypeDataV4(\n            hashedPremintConfig,\n            // here we pass the current contract and chain id, ensuring that the message\n            // only works for the current chain and contract id\n            erc1155Contract,\n            signatureVersion,\n            chainId\n        );\n\n        if (premintSignerContract != address(0)) {\n            // if the smart contract wallet is set, then the signature must be validated by that address\n            if (premintSignerContract.code.length == 0) {\n                revert IZoraCreator1155Errors.premintSignerContractNotAContract();\n            }\n\n            try IERC1271(premintSignerContract).isValidSignature(digest, signature) returns (bytes4 magicValue) {\n                if (MAGIC_VALUE == magicValue) {\n                    return premintSignerContract;\n                }\n                revert IZoraCreator1155Errors.InvalidSigner(magicValue);\n            } catch {\n                revert IZoraCreator1155Errors.premintSignerContractFailedToRecoverSigner();\n            }\n        } else {\n            ECDSAUpgradeable.RecoverError recoverError;\n            // if the smart contract signer is not set, then the signature must be from the signer of the message\n            (signatory, recoverError) = ECDSAUpgradeable.tryRecover(digest, signature);\n\n            if (recoverError != ECDSAUpgradeable.RecoverError.NoError) {\n                revert IZoraCreator1155Errors.InvalidSignature();\n            }\n        }\n    }\n\n    /// Gets hash data to sign for a premint.\n    /// @param erc1155Contract Contract address that signature is to be verified against\n    /// @param chainId Chain id that signature is to be verified on\n    function premintHashedTypeDataV4(bytes32 structHash, address erc1155Contract, bytes32 signatureVersion, uint256 chainId) internal pure returns (bytes32) {\n        // build the struct hash to be signed\n        // here we pass the chain id, allowing the message to be signed for another chain\n        return _hashTypedDataV4(structHash, HASHED_NAME, signatureVersion, erc1155Contract, chainId);\n    }\n\n    bytes32 constant ATTRIBUTION_DOMAIN_V1 =\n        keccak256(\n            \"CreatorAttribution(TokenCreationConfig tokenConfig,uint32 uid,uint32 version,bool deleted)TokenCreationConfig(string tokenURI,uint256 maxSupply,uint64 maxTokensPerAddress,uint96 pricePerToken,uint64 mintStart,uint64 mintDuration,uint32 royaltyMintSchedule,uint32 royaltyBPS,address royaltyRecipient,address fixedPriceMinter)\"\n        );\n\n    function hashPremint(PremintConfig memory premintConfig) internal pure returns (bytes32) {\n        return\n            keccak256(\n                abi.encode(ATTRIBUTION_DOMAIN_V1, _hashToken(premintConfig.tokenConfig), premintConfig.uid, premintConfig.version, premintConfig.deleted)\n            );\n    }\n\n    bytes32 constant ATTRIBUTION_DOMAIN_V2 =\n        keccak256(\n            \"CreatorAttribution(TokenCreationConfig tokenConfig,uint32 uid,uint32 version,bool deleted)TokenCreationConfig(string tokenURI,uint256 maxSupply,uint64 maxTokensPerAddress,uint96 pricePerToken,uint64 mintStart,uint64 mintDuration,uint32 royaltyBPS,address payoutRecipient,address fixedPriceMinter,address createReferral)\"\n        );\n\n    function hashPremint(PremintConfigV2 memory premintConfig) internal pure returns (bytes32) {\n        return\n            keccak256(\n                abi.encode(ATTRIBUTION_DOMAIN_V2, _hashToken(premintConfig.tokenConfig), premintConfig.uid, premintConfig.version, premintConfig.deleted)\n            );\n    }\n\n    bytes32 constant ATTRIBUTION_DOMAIN_ERC20_V1 =\n        keccak256(\n            \"CreatorAttribution(TokenCreationConfig tokenConfig,uint32 uid,uint32 version,bool deleted)TokenCreationConfig(string tokenURI,uint256 maxSupply,uint32 royaltyBPS,address payoutRecipient,address createReferral,address erc20Minter,uint64 mintStart,uint64 mintDuration,uint64 maxTokensPerAddress,address currency,uint256 pricePerToken)\"\n        );\n\n    function hashPremint(Erc20PremintConfigV1 memory premintConfig) internal pure returns (bytes32) {\n        return\n            keccak256(\n                abi.encode(ATTRIBUTION_DOMAIN_ERC20_V1, _hashToken(premintConfig.tokenConfig), premintConfig.uid, premintConfig.version, premintConfig.deleted)\n            );\n    }\n\n    bytes32 constant TOKEN_DOMAIN_V1 =\n        keccak256(\n            \"TokenCreationConfig(string tokenURI,uint256 maxSupply,uint64 maxTokensPerAddress,uint96 pricePerToken,uint64 mintStart,uint64 mintDuration,uint32 royaltyMintSchedule,uint32 royaltyBPS,address royaltyRecipient,address fixedPriceMinter)\"\n        );\n\n    function _hashToken(TokenCreationConfig memory tokenConfig) private pure returns (bytes32) {\n        return\n            keccak256(\n                abi.encode(\n                    TOKEN_DOMAIN_V1,\n                    _stringHash(tokenConfig.tokenURI),\n                    tokenConfig.maxSupply,\n                    tokenConfig.maxTokensPerAddress,\n                    tokenConfig.pricePerToken,\n                    tokenConfig.mintStart,\n                    tokenConfig.mintDuration,\n                    tokenConfig.royaltyMintSchedule,\n                    tokenConfig.royaltyBPS,\n                    tokenConfig.royaltyRecipient,\n                    tokenConfig.fixedPriceMinter\n                )\n            );\n    }\n\n    bytes32 constant TOKEN_DOMAIN_V2 =\n        keccak256(\n            \"TokenCreationConfig(string tokenURI,uint256 maxSupply,uint64 maxTokensPerAddress,uint96 pricePerToken,uint64 mintStart,uint64 mintDuration,uint32 royaltyBPS,address payoutRecipient,address fixedPriceMinter,address createReferral)\"\n        );\n\n    function _hashToken(TokenCreationConfigV2 memory tokenConfig) private pure returns (bytes32) {\n        return\n            keccak256(\n                abi.encode(\n                    TOKEN_DOMAIN_V2,\n                    _stringHash(tokenConfig.tokenURI),\n                    tokenConfig.maxSupply,\n                    tokenConfig.maxTokensPerAddress,\n                    tokenConfig.pricePerToken,\n                    tokenConfig.mintStart,\n                    tokenConfig.mintDuration,\n                    tokenConfig.royaltyBPS,\n                    tokenConfig.payoutRecipient,\n                    tokenConfig.fixedPriceMinter,\n                    tokenConfig.createReferral\n                )\n            );\n    }\n\n    bytes32 constant TOKEN_DOMAIN_ERC20_V1 =\n        keccak256(\n            \"TokenCreationConfig(string tokenURI,uint256 maxSupply,uint32 royaltyBPS,address payoutRecipient,address createReferral,address erc20Minter,uint64 mintStart,uint64 mintDuration,uint64 maxTokensPerAddress,address currency,uint256 pricePerToken)\"\n        );\n\n    function _hashToken(Erc20TokenCreationConfigV1 memory tokenConfig) private pure returns (bytes32) {\n        return\n            keccak256(\n                abi.encode(\n                    TOKEN_DOMAIN_ERC20_V1,\n                    _stringHash(tokenConfig.tokenURI),\n                    tokenConfig.maxSupply,\n                    tokenConfig.royaltyBPS,\n                    tokenConfig.payoutRecipient,\n                    tokenConfig.createReferral,\n                    tokenConfig.erc20Minter,\n                    tokenConfig.mintStart,\n                    tokenConfig.mintDuration,\n                    tokenConfig.maxTokensPerAddress,\n                    tokenConfig.currency,\n                    tokenConfig.pricePerToken\n                )\n            );\n    }\n\n    bytes32 internal constant TYPE_HASH = keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n    function _stringHash(string memory value) private pure returns (bytes32) {\n        return keccak256(bytes(value));\n    }\n\n    /// @notice copied from SharedBaseConstants\n    uint256 constant CONTRACT_BASE_ID = 0;\n    /// @dev copied from ZoraCreator1155Impl\n    uint256 constant PERMISSION_BIT_MINTER = 2 ** 2;\n\n    function isAuthorizedToCreatePremint(\n        address signer,\n        address premintContractConfigContractAdmin,\n        address contractAddress\n    ) internal view returns (bool authorized) {\n        // if contract hasn't been created, signer must be the contract admin on the premint config\n        if (contractAddress.code.length == 0) {\n            return signer == premintContractConfigContractAdmin;\n        } else {\n            // if contract has been created, signer must have mint new token permission\n            authorized = IZoraCreator1155(contractAddress).isAdminOrRole(signer, CONTRACT_BASE_ID, PERMISSION_BIT_MINTER);\n        }\n    }\n}\n\n/// @notice Utility library to setup tokens created via premint.  Functions exposed as external to not increase contract size in calling contract.\n/// @author oveddan\nlibrary PremintTokenSetup {\n    uint256 constant PERMISSION_BIT_MINTER = 2 ** 2;\n\n    /// @notice Build token setup actions for a v3 preminted token\n    function makeSetupNewTokenCalls(uint256 newTokenId, Erc20TokenCreationConfigV1 memory tokenConfig) internal view returns (bytes[] memory calls) {\n        return\n            _buildCalls({\n                newTokenId: newTokenId,\n                erc20MinterAddress: tokenConfig.erc20Minter,\n                currency: tokenConfig.currency,\n                pricePerToken: tokenConfig.pricePerToken,\n                maxTokensPerAddress: tokenConfig.maxTokensPerAddress,\n                mintDuration: tokenConfig.mintDuration,\n                royaltyBPS: tokenConfig.royaltyBPS,\n                payoutRecipient: tokenConfig.payoutRecipient\n            });\n    }\n\n    /// @notice Build token setup actions for a v2 preminted token\n    function makeSetupNewTokenCalls(uint256 newTokenId, TokenCreationConfigV2 memory tokenConfig) internal view returns (bytes[] memory calls) {\n        return\n            _buildCalls({\n                newTokenId: newTokenId,\n                fixedPriceMinterAddress: tokenConfig.fixedPriceMinter,\n                pricePerToken: tokenConfig.pricePerToken,\n                maxTokensPerAddress: tokenConfig.maxTokensPerAddress,\n                mintDuration: tokenConfig.mintDuration,\n                royaltyBPS: tokenConfig.royaltyBPS,\n                payoutRecipient: tokenConfig.payoutRecipient\n            });\n    }\n\n    /// @notice Build token setup actions for a v1 preminted token\n    function makeSetupNewTokenCalls(uint256 newTokenId, TokenCreationConfig memory tokenConfig) internal view returns (bytes[] memory calls) {\n        return\n            _buildCalls({\n                newTokenId: newTokenId,\n                fixedPriceMinterAddress: tokenConfig.fixedPriceMinter,\n                pricePerToken: tokenConfig.pricePerToken,\n                maxTokensPerAddress: tokenConfig.maxTokensPerAddress,\n                mintDuration: tokenConfig.mintDuration,\n                royaltyBPS: tokenConfig.royaltyBPS,\n                payoutRecipient: tokenConfig.royaltyRecipient\n            });\n    }\n\n    function _buildCalls(\n        uint256 newTokenId,\n        address erc20MinterAddress,\n        address currency,\n        uint256 pricePerToken,\n        uint64 maxTokensPerAddress,\n        uint64 mintDuration,\n        uint32 royaltyBPS,\n        address payoutRecipient\n    ) private view returns (bytes[] memory calls) {\n        calls = new bytes[](3);\n\n        calls[0] = abi.encodeWithSelector(IZoraCreator1155.addPermission.selector, newTokenId, erc20MinterAddress, PERMISSION_BIT_MINTER);\n\n        calls[1] = abi.encodeWithSelector(\n            IZoraCreator1155.callSale.selector,\n            newTokenId,\n            IMinter1155(erc20MinterAddress),\n            abi.encodeWithSelector(\n                IERC20Minter.setSale.selector,\n                newTokenId,\n                _buildNewERC20SalesConfig(currency, pricePerToken, maxTokensPerAddress, mintDuration, payoutRecipient)\n            )\n        );\n\n        calls[2] = abi.encodeWithSelector(\n            IZoraCreator1155.updateRoyaltiesForToken.selector,\n            newTokenId,\n            ICreatorRoyaltiesControl.RoyaltyConfiguration({royaltyBPS: royaltyBPS, royaltyRecipient: payoutRecipient, royaltyMintSchedule: 0})\n        );\n    }\n\n    function _buildCalls(\n        uint256 newTokenId,\n        address fixedPriceMinterAddress,\n        uint96 pricePerToken,\n        uint64 maxTokensPerAddress,\n        uint64 mintDuration,\n        uint32 royaltyBPS,\n        address payoutRecipient\n    ) private view returns (bytes[] memory calls) {\n        calls = new bytes[](3);\n\n        // build array of the calls to make\n        // get setup actions and invoke them\n        // set up the sales strategy\n        // first, grant the fixed price sale strategy minting capabilities on the token\n        // tokenContract.addPermission(newTokenId, address(fixedPriceMinter), PERMISSION_BIT_MINTER);\n        calls[0] = abi.encodeWithSelector(IZoraCreator1155.addPermission.selector, newTokenId, fixedPriceMinterAddress, PERMISSION_BIT_MINTER);\n\n        // set the sales config on that token\n        calls[1] = abi.encodeWithSelector(\n            IZoraCreator1155.callSale.selector,\n            newTokenId,\n            IMinter1155(fixedPriceMinterAddress),\n            abi.encodeWithSelector(\n                ZoraCreatorFixedPriceSaleStrategy.setSale.selector,\n                newTokenId,\n                _buildNewSalesConfig(pricePerToken, maxTokensPerAddress, mintDuration, payoutRecipient)\n            )\n        );\n\n        // set the royalty config on that token:\n        calls[2] = abi.encodeWithSelector(\n            IZoraCreator1155.updateRoyaltiesForToken.selector,\n            newTokenId,\n            ICreatorRoyaltiesControl.RoyaltyConfiguration({royaltyBPS: royaltyBPS, royaltyRecipient: payoutRecipient, royaltyMintSchedule: 0})\n        );\n    }\n\n    function _buildNewERC20SalesConfig(\n        address currency,\n        uint256 pricePerToken,\n        uint64 maxTokensPerAddress,\n        uint64 duration,\n        address payoutRecipient\n    ) private view returns (ERC20Minter.SalesConfig memory) {\n        uint64 saleStart = uint64(block.timestamp);\n        uint64 saleEnd = duration == 0 ? type(uint64).max : saleStart + duration;\n\n        return\n            IERC20Minter.SalesConfig({\n                saleStart: saleStart,\n                saleEnd: saleEnd,\n                maxTokensPerAddress: maxTokensPerAddress,\n                pricePerToken: pricePerToken,\n                fundsRecipient: payoutRecipient,\n                currency: currency\n            });\n    }\n\n    function _buildNewSalesConfig(\n        uint96 pricePerToken,\n        uint64 maxTokensPerAddress,\n        uint64 duration,\n        address payoutRecipient\n    ) private view returns (ZoraCreatorFixedPriceSaleStrategy.SalesConfig memory) {\n        uint64 saleStart = uint64(block.timestamp);\n        uint64 saleEnd = duration == 0 ? type(uint64).max : saleStart + duration;\n\n        return\n            ZoraCreatorFixedPriceSaleStrategy.SalesConfig({\n                pricePerToken: pricePerToken,\n                saleStart: saleStart,\n                saleEnd: saleEnd,\n                maxTokensPerAddress: maxTokensPerAddress,\n                fundsRecipient: payoutRecipient\n            });\n    }\n}\n\nstruct DecodedCreatorAttribution {\n    bytes32 structHash;\n    string domainName;\n    string version;\n    address creator;\n    bytes signature;\n}\n\nstruct DelegatedTokenSetup {\n    DecodedCreatorAttribution attribution;\n    uint32 uid;\n    string tokenURI;\n    uint256 maxSupply;\n    address createReferral;\n}\n\n/// @notice Utility library to decode and recover delegated token setup data from a signature.\n/// Function called by the erc1155 contract is marked external to reduce contract size in calling contract.\nlibrary DelegatedTokenCreation {\n    /// @notice Decode and recover delegated token setup data from a signature. Works with multiple versions of\n    /// a signature.  Takes an abi encoded premint config, version of the encoded premint config, and a signature,\n    /// decodes the config, and recoveres the signer of the config.  Based on the premint config, builds\n    /// setup actions for the token to be created.\n    /// @param premintConfigEncoded The abi encoded premint config\n    /// @param premintVersion The version of the premint config\n    /// @param signature The signature of the premint config\n    /// @param tokenContract The address of the token contract that the premint config is for\n    /// @param newTokenId The id of the token to be created\n    function decodeAndRecoverDelegatedTokenSetup(\n        bytes memory premintConfigEncoded,\n        bytes32 premintVersion,\n        bytes calldata signature,\n        address tokenContract,\n        uint256 newTokenId,\n        address premintSignerContract\n    ) external view returns (DelegatedTokenSetup memory params, DecodedCreatorAttribution memory creatorAttribution, bytes[] memory tokenSetupActions) {\n        // based on version of encoded premint config, decode corresponding premint config,\n        // and then recover signer from the signature, and then build token setup actions based\n        // on the decoded premint config.\n        if (premintVersion == PremintEncoding.HASHED_VERSION_1) {\n            PremintConfig memory premintConfig = abi.decode(premintConfigEncoded, (PremintConfig));\n\n            creatorAttribution = recoverCreatorAttribution(\n                PremintEncoding.VERSION_1,\n                ZoraCreator1155Attribution.hashPremint(premintConfig),\n                tokenContract,\n                signature,\n                premintSignerContract\n            );\n\n            (params, tokenSetupActions) = _recoverDelegatedTokenSetup(premintConfig, newTokenId);\n        } else if (premintVersion == PremintEncoding.HASHED_VERSION_2) {\n            PremintConfigV2 memory premintConfig = abi.decode(premintConfigEncoded, (PremintConfigV2));\n\n            creatorAttribution = recoverCreatorAttribution(\n                PremintEncoding.VERSION_2,\n                ZoraCreator1155Attribution.hashPremint(premintConfig),\n                tokenContract,\n                signature,\n                premintSignerContract\n            );\n\n            (params, tokenSetupActions) = _recoverDelegatedTokenSetup(premintConfig, newTokenId);\n        } else if (premintVersion == PremintEncoding.HASHED_ERC20_VERSION_1) {\n            Erc20PremintConfigV1 memory premintConfig = abi.decode(premintConfigEncoded, (Erc20PremintConfigV1));\n\n            creatorAttribution = recoverCreatorAttribution(\n                PremintEncoding.ERC20_VERSION_1,\n                ZoraCreator1155Attribution.hashPremint(premintConfig),\n                tokenContract,\n                signature,\n                premintSignerContract\n            );\n\n            (params, tokenSetupActions) = _recoverDelegatedTokenSetup(premintConfig, newTokenId);\n        } else {\n            revert IZoraCreator1155Errors.InvalidPremintVersion();\n        }\n    }\n\n    function supportedPremintSignatureVersions() external pure returns (string[] memory versions) {\n        return _supportedPremintSignatureVersions();\n    }\n\n    function _supportedPremintSignatureVersions() internal pure returns (string[] memory versions) {\n        versions = new string[](3);\n        versions[0] = PremintEncoding.VERSION_1;\n        versions[1] = PremintEncoding.VERSION_2;\n        versions[2] = PremintEncoding.ERC20_VERSION_1;\n    }\n\n    function recoverCreatorAttribution(\n        string memory version,\n        bytes32 structHash,\n        address tokenContract,\n        bytes calldata signature,\n        address premintSignerContract\n    ) internal view returns (DecodedCreatorAttribution memory attribution) {\n        attribution.structHash = structHash;\n        attribution.version = version;\n\n        attribution.creator = ZoraCreator1155Attribution.recoverSignerHashed(\n            structHash,\n            signature,\n            tokenContract,\n            keccak256(bytes(version)),\n            block.chainid,\n            premintSignerContract\n        );\n\n        attribution.signature = signature;\n        attribution.domainName = ZoraCreator1155Attribution.NAME;\n    }\n\n    function _recoverDelegatedTokenSetup(\n        Erc20PremintConfigV1 memory premintConfig,\n        uint256 nextTokenId\n    ) private view returns (DelegatedTokenSetup memory params, bytes[] memory tokenSetupActions) {\n        validatePremint(premintConfig.tokenConfig.mintStart, premintConfig.deleted);\n\n        params.uid = premintConfig.uid;\n\n        tokenSetupActions = PremintTokenSetup.makeSetupNewTokenCalls({newTokenId: nextTokenId, tokenConfig: premintConfig.tokenConfig});\n\n        params.tokenURI = premintConfig.tokenConfig.tokenURI;\n        params.maxSupply = premintConfig.tokenConfig.maxSupply;\n        params.createReferral = premintConfig.tokenConfig.createReferral;\n    }\n\n    function _recoverDelegatedTokenSetup(\n        PremintConfigV2 memory premintConfig,\n        uint256 nextTokenId\n    ) private view returns (DelegatedTokenSetup memory params, bytes[] memory tokenSetupActions) {\n        validatePremint(premintConfig.tokenConfig.mintStart, premintConfig.deleted);\n\n        params.uid = premintConfig.uid;\n\n        tokenSetupActions = PremintTokenSetup.makeSetupNewTokenCalls({newTokenId: nextTokenId, tokenConfig: premintConfig.tokenConfig});\n\n        params.tokenURI = premintConfig.tokenConfig.tokenURI;\n        params.maxSupply = premintConfig.tokenConfig.maxSupply;\n        params.createReferral = premintConfig.tokenConfig.createReferral;\n    }\n\n    function _recoverDelegatedTokenSetup(\n        PremintConfig memory premintConfig,\n        uint256 nextTokenId\n    ) private view returns (DelegatedTokenSetup memory params, bytes[] memory tokenSetupActions) {\n        validatePremint(premintConfig.tokenConfig.mintStart, premintConfig.deleted);\n\n        params.uid = premintConfig.uid;\n\n        tokenSetupActions = PremintTokenSetup.makeSetupNewTokenCalls(nextTokenId, premintConfig.tokenConfig);\n\n        params.tokenURI = premintConfig.tokenConfig.tokenURI;\n        params.maxSupply = premintConfig.tokenConfig.maxSupply;\n    }\n\n    function validatePremint(uint64 mintStart, bool deleted) private view {\n        if (mintStart != 0 && mintStart > block.timestamp) {\n            // if the mint start is in the future, then revert\n            revert IZoraCreator1155Errors.MintNotYetStarted();\n        }\n        if (deleted) {\n            // if the signature says to be deleted, then dont execute any further minting logic;\n            // return 0\n            revert IZoraCreator1155Errors.PremintDeleted();\n        }\n    }\n}\n"
      },
      "node_modules/@zoralabs/shared-contracts/src/entities/Premint.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nstruct ContractCreationConfig {\n    // Creator/admin of the created contract.  Must match the account that signed the message\n    address contractAdmin;\n    // Metadata URI for the created contract\n    string contractURI;\n    // Name of the created contract\n    string contractName;\n}\n\nstruct PremintConfig {\n    // The config for the token to be created\n    TokenCreationConfig tokenConfig;\n    // Unique id of the token, used to ensure that multiple signatures can't be used to create the same intended token.\n    // only one signature per token id, scoped to the contract hash can be executed.\n    uint32 uid;\n    // Version of this premint, scoped to the uid and contract.  Not used for logic in the contract, but used externally to track the newest version\n    uint32 version;\n    // If executing this signature results in preventing any signature with this uid from being minted.\n    bool deleted;\n}\n\nstruct TokenCreationConfig {\n    // Metadata URI for the created token\n    string tokenURI;\n    // Max supply of the created token\n    uint256 maxSupply;\n    // Max tokens that can be minted for an address, 0 if unlimited\n    uint64 maxTokensPerAddress;\n    // Price per token in eth wei. 0 for a free mint.\n    uint96 pricePerToken;\n    // The start time of the mint, 0 for immediate.  Prevents signatures from being used until the start time.\n    uint64 mintStart;\n    // The duration of the mint, starting from the first mint of this token. 0 for infinite\n    uint64 mintDuration;\n    // deperecated field; will be ignored.\n    uint32 royaltyMintSchedule;\n    // RoyaltyBPS for created tokens. The royalty amount in basis points for secondary sales.\n    uint32 royaltyBPS;\n    // This is the address that will be set on the `royaltyRecipient` for the created token on the 1155 contract,\n    // which is the address that receives creator rewards and secondary royalties for the token,\n    // and on the `fundsRecipient` on the ZoraCreatorFixedPriceSaleStrategy contract for the token,\n    // which is the address that receives paid mint funds for the token.\n    address royaltyRecipient;\n    // Fixed price minter address\n    address fixedPriceMinter;\n}\n\nstruct PremintConfigV2 {\n    // The config for the token to be created\n    TokenCreationConfigV2 tokenConfig;\n    // Unique id of the token, used to ensure that multiple signatures can't be used to create the same intended token.\n    // only one signature per token id, scoped to the contract hash can be executed.\n    uint32 uid;\n    // Version of this premint, scoped to the uid and contract.  Not used for logic in the contract, but used externally to track the newest version\n    uint32 version;\n    // If executing this signature results in preventing any signature with this uid from being minted.\n    bool deleted;\n}\n\nstruct TokenCreationConfigV2 {\n    // Metadata URI for the created token\n    string tokenURI;\n    // Max supply of the created token\n    uint256 maxSupply;\n    // Max tokens that can be minted for an address, 0 if unlimited\n    uint64 maxTokensPerAddress;\n    // Price per token in eth wei. 0 for a free mint.\n    uint96 pricePerToken;\n    // The start time of the mint, 0 for immediate.  Prevents signatures from being used until the start time.\n    uint64 mintStart;\n    // The duration of the mint, starting from the first mint of this token. 0 for infinite\n    uint64 mintDuration;\n    // RoyaltyBPS for created tokens. The royalty amount in basis points for secondary sales.\n    uint32 royaltyBPS;\n    // This is the address that will be set on the `royaltyRecipient` for the created token on the 1155 contract,\n    // which is the address that receives creator rewards and secondary royalties for the token,\n    // and on the `fundsRecipient` on the ZoraCreatorFixedPriceSaleStrategy contract for the token,\n    // which is the address that receives paid mint funds for the token.\n    address payoutRecipient;\n    // Fixed price minter address\n    address fixedPriceMinter;\n    // create referral\n    address createReferral;\n}\n\nstruct Erc20PremintConfigV1 {\n    // The config for the token to be created\n    Erc20TokenCreationConfigV1 tokenConfig;\n    // Unique id of the token, used to ensure that multiple signatures can't be used to create the same intended token.\n    // only one signature per token id, scoped to the contract hash can be executed.\n    uint32 uid;\n    // Version of this premint, scoped to the uid and contract.  Not used for logic in the contract, but used externally to track the newest version\n    uint32 version;\n    // If executing this signature results in preventing any signature with this uid from being minted.\n    bool deleted;\n}\n\nstruct Erc20TokenCreationConfigV1 {\n    // Metadata URI for the created token\n    string tokenURI;\n    // Max supply of the created token\n    uint256 maxSupply;\n    // RoyaltyBPS for created tokens. The royalty amount in basis points for secondary sales.\n    uint32 royaltyBPS;\n    // The address that the will receive rewards/funds/royalties.\n    address payoutRecipient;\n    // The address that referred the creation of the token.\n    address createReferral;\n    // The address of the ERC20 minter module.\n    address erc20Minter;\n    // The start time of the mint, 0 for immediate.\n    uint64 mintStart;\n    // The duration of the mint, starting from the first mint of this token. 0 for infinite\n    uint64 mintDuration;\n    // Max tokens that can be minted for an address, 0 if unlimited\n    uint64 maxTokensPerAddress;\n    // The ERC20 currency address\n    address currency;\n    // Price per token in ERC20 currency\n    uint256 pricePerToken;\n}\n\nstruct MintArguments {\n    address mintRecipient;\n    string mintComment;\n    /// array of accounts to receive rewards - mintReferral is first argument, and platformReferral is second.  platformReferral isn't supported as of now but will be in a future release.\n    address[] mintRewardsRecipients;\n}\n\nstruct PremintResult {\n    address contractAddress;\n    uint256 tokenId;\n    bool createdNewContract;\n}\n"
      },
      "node_modules/@zoralabs/mints-contracts/src/interfaces/IZoraMintsMinterManager.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport {IZoraMints1155} from \"../interfaces/IZoraMints1155.sol\";\n\ninterface IZoraMintsMinterManager {\n    /**\n     * @dev Mints the currently mintable ETH-based token and sends it to the specified recipient.\n     *      The total value sent must match the product of the currently mintable ETH token's price and the quantity to mint.\n     * @param quantity The quantity of tokens to mint.\n     * @param recipient The address to receive the minted tokens.\n     * @return The ID of the token that was minted.\n     */\n    function mintWithEth(uint256 quantity, address recipient) external payable returns (uint256);\n\n    /// @notice Retrieves the price in ETH of the currently mintable ETH-based token.\n    function getEthPrice() external view returns (uint256);\n\n    /// @notice Gets the token id of the current mintable ETH-based token.\n    function mintableEthToken() external view returns (uint256);\n\n    function zoraMints1155() external view returns (IZoraMints1155);\n}\n"
      },
      "node_modules/@zoralabs/mints-contracts/src/interfaces/IZoraMints1155.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport {IERC1155} from \"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\";\nimport {TokenConfig, Redemption} from \"../ZoraMintsTypes.sol\";\nimport {IZoraMints1155Errors} from \"./IZoraMints1155Errors.sol\";\nimport {IUpdateableTokenURI} from \"./IUpdateableTokenURI.sol\";\n\n/**\n * @title IZoraMints1155 interface\n * @dev The IZoraMints1155 interface defines an implementation of the ERC1155 standard with additional features:\n *\n * Accounts can mint new tokens by sending ETH to the contract based on the current mintable token's\n * price in ETH. The amount of ETH sent must match the total price for the quantity of tokens being minted.\n * The price of a token cannot be changed, ensuring that the value of each token is fixed.\n *\n * Accounts can also redeem tokens by burning them and receiving their equivalent value in ETH.\n * The amount of ETH received is based on the quantity of tokens burned and the price per token.\n *\n */\ninterface IZoraMints1155 is IZoraMints1155Errors, IERC1155 {\n    /// @notice Event emitted when a mint token is created\n    /// @param tokenId The ID of the token\n    /// @param price The price of the token\n    /// @param tokenAddress The address of the token\n    event TokenCreated(uint256 indexed tokenId, uint256 indexed price, address indexed tokenAddress);\n\n    /**\n     * @dev Redeems the equivalent value of a specified quantity of tokens and sends it to the recipient.\n     *      This function can only be called by the current owner of the tokens. It unwraps the value of the tokens,\n     *      sends it to the recipient, and then burns the tokens.\n     * @param tokenId The ID of the token to redeem.\n     * @param quantity The quantity of tokens to redeem.\n     * @param recipient The address to receive the unwrapped funds.\n     */\n    function redeem(uint tokenId, uint quantity, address recipient) external returns (Redemption memory);\n\n    function redeemBatch(uint[] calldata tokenIds, uint[] calldata quantities, address recipient) external returns (Redemption[] memory redemptions);\n\n    // only callable by mints manager\n    function mintTokenWithEth(uint256 tokenId, uint256 quantity, address recipient, bytes memory data) external payable;\n\n    // only callable by mints manager\n    function mintTokenWithERC20(uint256 tokenId, address tokenAddress, uint quantity, address recipient, bytes memory data) external;\n\n    function createToken(uint256 tokenId, TokenConfig calldata tokenConfig) external;\n\n    /**\n     * Gets if token with the specific id has been created\n     * @param tokenId The ID of the token to check.\n     */\n    function tokenExists(uint tokenId) external view returns (bool);\n\n    /// @notice Helper to get the user's total balance of mints\n    /// @param user User to query for balances\n    function balanceOfAccount(address user) external returns (uint256);\n\n    /**\n     * Gets the price of a token\n     * @param tokenId The id of the token to check\n     */\n    function tokenPrice(uint tokenId) external view returns (uint);\n\n    function getTokenConfig(uint256 tokeId) external returns (TokenConfig memory);\n\n    function MINIMUM_ETH_PRICE() external view returns (uint256);\n\n    function MINIMUM_ERC20_PRICE() external view returns (uint256);\n}\n"
      },
      "node_modules/@openzeppelin/contracts/token/ERC1155/IERC1155.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155 is IERC165 {\n    /**\n     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\n     */\n    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\n\n    /**\n     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\n     * transfers.\n     */\n    event TransferBatch(\n        address indexed operator,\n        address indexed from,\n        address indexed to,\n        uint256[] ids,\n        uint256[] values\n    );\n\n    /**\n     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\n     * `approved`.\n     */\n    event ApprovalForAll(address indexed account, address indexed operator, bool approved);\n\n    /**\n     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\n     *\n     * If an {URI} event was emitted for `id`, the standard\n     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\n     * returned by {IERC1155MetadataURI-uri}.\n     */\n    event URI(string value, uint256 indexed id);\n\n    /**\n     * @dev Returns the amount of tokens of token type `id` owned by `account`.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     */\n    function balanceOf(address account, uint256 id) external view returns (uint256);\n\n    /**\n     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\n     *\n     * Requirements:\n     *\n     * - `accounts` and `ids` must have the same length.\n     */\n    function balanceOfBatch(\n        address[] calldata accounts,\n        uint256[] calldata ids\n    ) external view returns (uint256[] memory);\n\n    /**\n     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\n     *\n     * Emits an {ApprovalForAll} event.\n     *\n     * Requirements:\n     *\n     * - `operator` cannot be the caller.\n     */\n    function setApprovalForAll(address operator, bool approved) external;\n\n    /**\n     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\n     *\n     * See {setApprovalForAll}.\n     */\n    function isApprovedForAll(address account, address operator) external view returns (bool);\n\n    /**\n     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n     *\n     * Emits a {TransferSingle} event.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\n     * - `from` must have a balance of tokens of type `id` of at least `amount`.\n     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n     * acceptance magic value.\n     */\n    function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\n\n    /**\n     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\n     *\n     * Emits a {TransferBatch} event.\n     *\n     * Requirements:\n     *\n     * - `ids` and `amounts` must have the same length.\n     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n     * acceptance magic value.\n     */\n    function safeBatchTransferFrom(\n        address from,\n        address to,\n        uint256[] calldata ids,\n        uint256[] calldata amounts,\n        bytes calldata data\n    ) external;\n}\n"
      },
      "node_modules/@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\ninterface IERC1155Receiver is IERC165 {\n    /**\n     * @dev Handles the receipt of a single ERC1155 token type. This function is\n     * called at the end of a `safeTransferFrom` after the balance has been updated.\n     *\n     * NOTE: To accept the transfer, this must return\n     * `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n     * (i.e. 0xf23a6e61, or its own function selector).\n     *\n     * @param operator The address which initiated the transfer (i.e. msg.sender)\n     * @param from The address which previously owned the token\n     * @param id The ID of the token being transferred\n     * @param value The amount of tokens being transferred\n     * @param data Additional data with no specified format\n     * @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` if transfer is allowed\n     */\n    function onERC1155Received(\n        address operator,\n        address from,\n        uint256 id,\n        uint256 value,\n        bytes calldata data\n    ) external returns (bytes4);\n\n    /**\n     * @dev Handles the receipt of a multiple ERC1155 token types. This function\n     * is called at the end of a `safeBatchTransferFrom` after the balances have\n     * been updated.\n     *\n     * NOTE: To accept the transfer(s), this must return\n     * `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n     * (i.e. 0xbc197c81, or its own function selector).\n     *\n     * @param operator The address which initiated the batch transfer (i.e. msg.sender)\n     * @param from The address which previously owned the token\n     * @param ids An array containing ids of each token being transferred (order and length must match values array)\n     * @param values An array containing amounts of each token being transferred (order and length must match ids array)\n     * @param data Additional data with no specified format\n     * @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` if transfer is allowed\n     */\n    function onERC1155BatchReceived(\n        address operator,\n        address from,\n        uint256[] calldata ids,\n        uint256[] calldata values,\n        bytes calldata data\n    ) external returns (bytes4);\n}\n"
      },
      "node_modules/@zoralabs/mints-contracts/src/IMintWithMints.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport {IMinter1155} from \"@zoralabs/shared-contracts/interfaces/IMinter1155.sol\";\n\n/// @title IMintWithMints\n/// @notice Interface intended to be implemented by a 1155 creator contract to be able to mint tokens using MINTs\ninterface IMintWithMints {\n    /// @notice Mint tokens and payout rewards given a minter contract, minter arguments, and rewards arguments,\n    /// while MINTs are redeemed to pay for the mint fee, instead of paying with ETH directly.\n    /// The MINTs must have been transferred to be owned by this contract before calling this function.\n    /// Value sent is used for paid mints, if this is a paid mint.\n    /// @param mintTokenIds The MINT token IDs that are to be redeemed.\n    /// @param quantities The quantities of each MINT token id to redeem.\n    /// @param minter The minter contract to use\n    /// @param tokenId The token ID to mint\n    /// @param rewardsRecipients The addresses of rewards arguments - rewardsRecipients[0] = mintReferral, rewardsRecipients[1] = platformReferral\n    /// @param minterArguments The arguments to pass to the minter\n    /// @return quantityMinted The total quantity of tokens minted\n    function mintWithMints(\n        uint256[] calldata mintTokenIds,\n        uint256[] calldata quantities,\n        IMinter1155 minter,\n        uint256 tokenId,\n        address[] memory rewardsRecipients,\n        bytes calldata minterArguments\n    ) external payable returns (uint256 quantityMinted);\n}\n"
      },
      "node_modules/@zoralabs/mints-contracts/src/ZoraMintsTypes.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport {IRedeemHandler} from \"./interfaces/IRedeemHandler.sol\";\n\nstruct TokenConfig {\n    /// @dev Price for the token to purchase.\n    uint256 price;\n    /// @dev Assume 0 is ETH\n    address tokenAddress;\n    /// @dev if set, redemptions go through this contract\n    // should be an IRedeemHandler interface\n    address redeemHandler;\n}\n\nstruct Redemption {\n    address tokenAddress;\n    uint256 valueRedeemed;\n}\n"
      },
      "node_modules/@zoralabs/openzeppelin-contracts-upgradeable/contracts/token/ERC1155/IERC1155Upgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165Upgradeable.sol\";\n\n/**\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155Upgradeable is IERC165Upgradeable {\n    /**\n     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\n     */\n    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\n\n    /**\n     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\n     * transfers.\n     */\n    event TransferBatch(\n        address indexed operator,\n        address indexed from,\n        address indexed to,\n        uint256[] ids,\n        uint256[] values\n    );\n\n    /**\n     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\n     * `approved`.\n     */\n    event ApprovalForAll(address indexed account, address indexed operator, bool approved);\n\n    /**\n     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\n     *\n     * If an {URI} event was emitted for `id`, the standard\n     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\n     * returned by {IERC1155MetadataURI-uri}.\n     */\n    event URI(string value, uint256 indexed id);\n\n    /**\n     * @dev Returns the amount of tokens of token type `id` owned by `account`.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     */\n    function balanceOf(address account, uint256 id) external view returns (uint256);\n\n    /**\n     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\n     *\n     * Requirements:\n     *\n     * - `accounts` and `ids` must have the same length.\n     */\n    function balanceOfBatch(\n        address[] calldata accounts,\n        uint256[] calldata ids\n    ) external view returns (uint256[] memory);\n\n    /**\n     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\n     *\n     * Emits an {ApprovalForAll} event.\n     *\n     * Requirements:\n     *\n     * - `operator` cannot be the caller.\n     */\n    function setApprovalForAll(address operator, bool approved) external;\n\n    /**\n     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\n     *\n     * See {setApprovalForAll}.\n     */\n    function isApprovedForAll(address account, address operator) external view returns (bool);\n\n    /**\n     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n     *\n     * Emits a {TransferSingle} event.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\n     * - `from` must have a balance of tokens of type `id` of at least `amount`.\n     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n     * acceptance magic value.\n     */\n    function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\n\n    /**\n     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\n     *\n     * Emits a {TransferBatch} event.\n     *\n     * Requirements:\n     *\n     * - `ids` and `amounts` must have the same length.\n     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n     * acceptance magic value.\n     */\n    function safeBatchTransferFrom(\n        address from,\n        address to,\n        uint256[] calldata ids,\n        uint256[] calldata amounts,\n        bytes calldata data\n    ) external;\n}\n"
      },
      "node_modules/@zoralabs/openzeppelin-contracts-upgradeable/contracts/token/ERC1155/IERC1155ReceiverUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165Upgradeable.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\ninterface IERC1155ReceiverUpgradeable is IERC165Upgradeable {\n    /**\n     * @dev Handles the receipt of a single ERC1155 token type. This function is\n     * called at the end of a `safeTransferFrom` after the balance has been updated.\n     *\n     * NOTE: To accept the transfer, this must return\n     * `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n     * (i.e. 0xf23a6e61, or its own function selector).\n     *\n     * @param operator The address which initiated the transfer (i.e. msg.sender)\n     * @param from The address which previously owned the token\n     * @param id The ID of the token being transferred\n     * @param value The amount of tokens being transferred\n     * @param data Additional data with no specified format\n     * @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` if transfer is allowed\n     */\n    function onERC1155Received(\n        address operator,\n        address from,\n        uint256 id,\n        uint256 value,\n        bytes calldata data\n    ) external returns (bytes4);\n\n    /**\n     * @dev Handles the receipt of a multiple ERC1155 token types. This function\n     * is called at the end of a `safeBatchTransferFrom` after the balances have\n     * been updated.\n     *\n     * NOTE: To accept the transfer(s), this must return\n     * `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n     * (i.e. 0xbc197c81, or its own function selector).\n     *\n     * @param operator The address which initiated the batch transfer (i.e. msg.sender)\n     * @param from The address which previously owned the token\n     * @param ids An array containing ids of each token being transferred (order and length must match values array)\n     * @param values An array containing amounts of each token being transferred (order and length must match ids array)\n     * @param data Additional data with no specified format\n     * @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` if transfer is allowed\n     */\n    function onERC1155BatchReceived(\n        address operator,\n        address from,\n        uint256[] calldata ids,\n        uint256[] calldata values,\n        bytes calldata data\n    ) external returns (bytes4);\n}\n"
      },
      "node_modules/@zoralabs/openzeppelin-contracts-upgradeable/contracts/token/ERC1155/extensions/IERC1155MetadataURIUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC1155Upgradeable.sol\";\n\n/**\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155MetadataURIUpgradeable is IERC1155Upgradeable {\n    /**\n     * @dev Returns the URI for token type `id`.\n     *\n     * If the `\\{id\\}` substring is present in the URI, it must be replaced by\n     * clients with the actual token type ID.\n     */\n    function uri(uint256 id) external view returns (string memory);\n}\n"
      },
      "node_modules/@zoralabs/openzeppelin-contracts-upgradeable/contracts/utils/AddressUpgradeable.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\nerror ADDRESS_INSUFFICIENT_BALANCE();\nerror ADDRESS_UNABLE_TO_SEND_VALUE();\nerror ADDRESS_LOW_LEVEL_CALL_FAILED();\nerror ADDRESS_LOW_LEVEL_CALL_WITH_VALUE_FAILED();\nerror ADDRESS_INSUFFICIENT_BALANCE_FOR_CALL();\nerror ADDRESS_LOW_LEVEL_STATIC_CALL_FAILED();\nerror ADDRESS_CALL_TO_NON_CONTRACT();\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n    /**\n     * @dev Returns true if `account` is a contract.\n     *\n     * [IMPORTANT]\n     * ====\n     * It is unsafe to assume that an address for which this function returns\n     * false is an externally-owned account (EOA) and not a contract.\n     *\n     * Among others, `isContract` will return false for the following\n     * types of addresses:\n     *\n     *  - an externally-owned account\n     *  - a contract in construction\n     *  - an address where a contract will be created\n     *  - an address where a contract lived, but was destroyed\n     *\n     * Furthermore, `isContract` will also return true if the target contract within\n     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n     * which only has an effect at the end of a transaction.\n     * ====\n     *\n     * [IMPORTANT]\n     * ====\n     * You shouldn't rely on `isContract` to protect against flash loan attacks!\n     *\n     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n     * constructor.\n     * ====\n     */\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize/address.code.length, which returns 0\n        // for contracts in construction, since the code is only stored at the end\n        // of the constructor execution.\n\n        return account.code.length > 0;\n    }\n\n    /**\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n     * `recipient`, forwarding all available gas and reverting on errors.\n     *\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\n     * imposed by `transfer`, making them unable to receive funds via\n     * `transfer`. {sendValue} removes this limitation.\n     *\n     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n     *\n     * IMPORTANT: because control is transferred to `recipient`, care must be\n     * taken to not create reentrancy vulnerabilities. Consider using\n     * {ReentrancyGuard} or the\n     * https://solidity.readthedocs.io/en/v0.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        if (address(this).balance > amount) {\n            revert ADDRESS_INSUFFICIENT_BALANCE();\n        }\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        if (!success) {\n            revert ADDRESS_UNABLE_TO_SEND_VALUE();\n        }\n    }\n\n    /**\n     * @dev Performs a Solidity function call using a low level `call`. A\n     * plain `call` is an unsafe replacement for a function call: use this\n     * function instead.\n     *\n     * If `target` reverts with a revert reason, 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);\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        if (address(this).balance < value) {\n            revert ADDRESS_INSUFFICIENT_BALANCE();\n        }\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResultFromTarget(target, success, returndata);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(\n        address target,\n        bytes memory data\n    ) internal view returns (bytes memory) {\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResultFromTarget(target, success, returndata);\n    }\n\n    /**\n     * @dev 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    ) 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                if (!isContract(target)) {\n                    revert ADDRESS_CALL_TO_NON_CONTRACT();\n                }\n            }\n            return returndata;\n        } else {\n            _revert(returndata);\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    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            _revert(returndata);\n        }\n    }\n\n    function _revert(bytes memory returndata) private pure {\n        // Look for revert reason and bubble it up if present\n        if (returndata.length > 0) {\n            // The easiest way to bubble the revert reason is using memory via assembly\n            /// @solidity memory-safe-assembly\n            assembly {\n                let returndata_size := mload(returndata)\n                revert(add(32, returndata), returndata_size)\n            }\n        } else {\n            revert ADDRESS_LOW_LEVEL_CALL_FAILED();\n        }\n    }\n}\n"
      },
      "node_modules/@zoralabs/openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\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 ContextUpgradeable is Initializable {\n    function __Context_init() internal onlyInitializing {\n    }\n\n    function __Context_init_unchained() internal onlyInitializing {\n    }\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    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[50] private __gap;\n}\n"
      },
      "node_modules/@zoralabs/openzeppelin-contracts-upgradeable/contracts/utils/introspection/ERC165Upgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {\n    function __ERC165_init() internal onlyInitializing {\n    }\n\n    function __ERC165_init_unchained() internal onlyInitializing {\n    }\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n        return interfaceId == type(IERC165Upgradeable).interfaceId;\n    }\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[50] private __gap;\n}\n"
      },
      "node_modules/@zoralabs/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\nerror INITIALIZABLE_CONTRACT_ALREADY_INITIALIZED();\nerror INITIALIZABLE_CONTRACT_IS_NOT_INITIALIZING();\nerror INITIALIZABLE_CONTRACT_IS_INITIALIZING();\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n *     function initialize() initializer public {\n *         __ERC20_init(\"MyToken\", \"MTK\");\n *     }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n *     function initializeV2() reinitializer(2) public {\n *         __ERC20Permit_init(\"MyToken\");\n *     }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n *     _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n    /**\n     * @dev Indicates that the contract has been initialized.\n     * @custom:oz-retyped-from bool\n     */\n    uint8 private _initialized;\n\n    /**\n     * @dev Indicates that the contract is in the process of being initialized.\n     */\n    bool private _initializing;\n\n    /**\n     * @dev Triggered when the contract has been initialized or reinitialized.\n     */\n    event Initialized(uint8 version);\n\n    /**\n     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n     * `onlyInitializing` functions can be used to initialize parent contracts.\n     *\n     * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n     * constructor.\n     *\n     * Emits an {Initialized} event.\n     */\n    modifier initializer() {\n        bool isTopLevelCall = !_initializing;\n        if ((!isTopLevelCall || _initialized != 0) && (AddressUpgradeable.isContract(address(this)) || _initialized != 1)) {\n            revert INITIALIZABLE_CONTRACT_ALREADY_INITIALIZED();\n        }\n        _initialized = 1;\n        if (isTopLevelCall) {\n            _initializing = true;\n        }\n        _;\n        if (isTopLevelCall) {\n            _initializing = false;\n            emit Initialized(1);\n        }\n    }\n\n    /**\n     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n     * used to initialize parent contracts.\n     *\n     * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n     * are added through upgrades and that require initialization.\n     *\n     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n     * cannot be nested. If one is invoked in the context of another, execution will revert.\n     *\n     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n     * a contract, executing them in the right order is up to the developer or operator.\n     *\n     * WARNING: setting the version to 255 will prevent any future reinitialization.\n     *\n     * Emits an {Initialized} event.\n     */\n    modifier reinitializer(uint8 version) {\n        if (_initializing || _initialized >= version) {\n            revert INITIALIZABLE_CONTRACT_ALREADY_INITIALIZED();\n        }\n        _initialized = version;\n        _initializing = true;\n        _;\n        _initializing = false;\n        emit Initialized(version);\n    }\n\n    /**\n     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n     * {initializer} and {reinitializer} modifiers, directly or indirectly.\n     */\n    modifier onlyInitializing() {\n        if (!_initializing) {\n            revert INITIALIZABLE_CONTRACT_IS_NOT_INITIALIZING();\n        }\n        _;\n    }\n\n    /**\n     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n     * through proxies.\n     *\n     * Emits an {Initialized} event the first time it is successfully executed.\n     */\n    function _disableInitializers() internal virtual {\n        if (_initializing) {\n            revert INITIALIZABLE_CONTRACT_IS_INITIALIZING();\n        }\n        if (_initialized != type(uint8).max) {\n            _initialized = type(uint8).max;\n            emit Initialized(type(uint8).max);\n        }\n    }\n\n    /**\n     * @dev Returns the highest version that has been initialized. See {reinitializer}.\n     */\n    function _getInitializedVersion() internal view returns (uint8) {\n        return _initialized;\n    }\n\n    /**\n     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n     */\n    function _isInitializing() internal view returns (bool) {\n        return _initializing;\n    }\n}\n"
      },
      "node_modules/@zoralabs/openzeppelin-contracts-upgradeable/contracts/interfaces/draft-IERC1822Upgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822ProxiableUpgradeable {\n    /**\n     * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n     * address.\n     *\n     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n     * function revert if invoked through a proxy.\n     */\n    function proxiableUUID() external view returns (bytes32);\n}\n"
      },
      "node_modules/@zoralabs/openzeppelin-contracts-upgradeable/contracts/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeaconUpgradeable.sol\";\nimport \"../../interfaces/draft-IERC1822Upgradeable.sol\";\nimport \"../../utils/AddressUpgradeable.sol\";\nimport \"../../utils/StorageSlotUpgradeable.sol\";\nimport \"../utils/Initializable.sol\";\n\nerror ERC1967_NEW_IMPL_NOT_CONTRACT();\nerror ERC1967_UNSUPPORTED_PROXIABLEUUID();\nerror ERC1967_NEW_IMPL_NOT_UUPS();\nerror ERC1967_NEW_ADMIN_IS_ZERO_ADDRESS();\nerror ERC1967_NEW_BEACON_IS_NOT_CONTRACT();\nerror ERC1967_BEACON_IMPL_IS_NOT_CONTRACT();\nerror ADDRESS_DELEGATECALL_TO_NON_CONTRACT();\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n */\nabstract contract ERC1967UpgradeUpgradeable is Initializable {\n    function __ERC1967Upgrade_init() internal onlyInitializing {\n    }\n\n    function __ERC1967Upgrade_init_unchained() internal onlyInitializing {\n    }\n    // This is the keccak-256 hash of \"eip1967.proxy.rollback\" subtracted by 1\n    bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n    /**\n     * @dev Storage slot with the address of the current implementation.\n     * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is\n     * validated in the constructor.\n     */\n    bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n    /**\n     * @dev Emitted when the implementation is upgraded.\n     */\n    event Upgraded(address indexed implementation);\n\n    /**\n     * @dev Returns the current implementation address.\n     */\n    function _getImplementation() internal view returns (address) {\n        return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n    }\n\n    /**\n     * @dev Stores a new address in the EIP1967 implementation slot.\n     */\n    function _setImplementation(address newImplementation) private {\n        if (!AddressUpgradeable.isContract(newImplementation)) {\n            revert ERC1967_NEW_IMPL_NOT_CONTRACT();\n        } \n        StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n    }\n\n    /**\n     * @dev Perform implementation upgrade\n     *\n     * Emits an {Upgraded} event.\n     */\n    function _upgradeTo(address newImplementation) internal {\n        _setImplementation(newImplementation);\n        emit Upgraded(newImplementation);\n    }\n\n    /**\n     * @dev Perform implementation upgrade with additional setup call.\n     *\n     * Emits an {Upgraded} event.\n     */\n    function _upgradeToAndCall(address newImplementation, bytes memory data, bool forceCall) internal {\n        _upgradeTo(newImplementation);\n        if (data.length > 0 || forceCall) {\n            _functionDelegateCall(newImplementation, data);\n        }\n    }\n\n    /**\n     * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n     *\n     * Emits an {Upgraded} event.\n     */\n    function _upgradeToAndCallUUPS(address newImplementation, bytes memory data, bool forceCall) internal {\n        // Upgrades from old implementations will perform a rollback test. This test requires the new\n        // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n        // this special case will break upgrade paths from old UUPS implementation to new ones.\n        if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {\n            _setImplementation(newImplementation);\n        } else {\n            try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n                if (slot != _IMPLEMENTATION_SLOT) {\n                    revert ERC1967_UNSUPPORTED_PROXIABLEUUID();\n                }\n            } catch {\n                revert ERC1967_NEW_IMPL_NOT_UUPS();\n            }\n            _upgradeToAndCall(newImplementation, data, forceCall);\n        }\n    }\n\n    /**\n     * @dev Storage slot with the admin of the contract.\n     * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n     * validated in the constructor.\n     */\n    bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n    /**\n     * @dev Emitted when the admin account has changed.\n     */\n    event AdminChanged(address previousAdmin, address newAdmin);\n\n    /**\n     * @dev Returns the current admin.\n     */\n    function _getAdmin() internal view returns (address) {\n        return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value;\n    }\n\n    /**\n     * @dev Stores a new address in the EIP1967 admin slot.\n     */\n    function _setAdmin(address newAdmin) private {\n        if (newAdmin == address(0)) {\n            revert ERC1967_NEW_ADMIN_IS_ZERO_ADDRESS();\n        }\n        StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n    }\n\n    /**\n     * @dev Changes the admin of the proxy.\n     *\n     * Emits an {AdminChanged} event.\n     */\n    function _changeAdmin(address newAdmin) internal {\n        emit AdminChanged(_getAdmin(), newAdmin);\n        _setAdmin(newAdmin);\n    }\n\n    /**\n     * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n     * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\n     */\n    bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n    /**\n     * @dev Emitted when the beacon is upgraded.\n     */\n    event BeaconUpgraded(address indexed beacon);\n\n    /**\n     * @dev Returns the current beacon.\n     */\n    function _getBeacon() internal view returns (address) {\n        return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value;\n    }\n\n    /**\n     * @dev Stores a new beacon in the EIP1967 beacon slot.\n     */\n    function _setBeacon(address newBeacon) private {\n        if (!AddressUpgradeable.isContract(newBeacon)) {\n            revert ERC1967_NEW_BEACON_IS_NOT_CONTRACT();\n        }\n        if (!AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation())) {\n            revert ERC1967_BEACON_IMPL_IS_NOT_CONTRACT();\n        }\n        StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n    }\n\n    /**\n     * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n     * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n     *\n     * Emits a {BeaconUpgraded} event.\n     */\n    function _upgradeBeaconToAndCall(address newBeacon, bytes memory data, bool forceCall) internal {\n        _setBeacon(newBeacon);\n        emit BeaconUpgraded(newBeacon);\n        if (data.length > 0 || forceCall) {\n            _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\n        }\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(address target, bytes memory data) private returns (bytes memory) {\n        if (!AddressUpgradeable.isContract(target)) {\n            revert ADDRESS_DELEGATECALL_TO_NON_CONTRACT();\n        }\n\n        // solhint-disable-next-line avoid-low-level-calls\n        (bool success, bytes memory returndata) = target.delegatecall(data);\n        return AddressUpgradeable.verifyCallResult(success, returndata);\n    }\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[50] private __gap;\n}\n"
      },
      "node_modules/@zoralabs/openzeppelin-contracts-upgradeable/contracts/utils/introspection/IERC165Upgradeable.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 IERC165Upgradeable {\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"
      },
      "node_modules/@zoralabs/protocol-rewards/src/interfaces/IRewardSplits.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\ninterface IRewardsErrors {\n    error CREATOR_FUNDS_RECIPIENT_NOT_SET();\n    error INVALID_ADDRESS_ZERO();\n    error INVALID_ETH_AMOUNT();\n    error ONLY_CREATE_REFERRAL();\n}\n\ninterface IRewardSplits is IRewardsErrors {\n    struct RewardsSettings {\n        uint256 creatorReward;\n        uint256 createReferralReward;\n        uint256 mintReferralReward;\n        uint256 firstMinterReward;\n        uint256 zoraReward;\n    }\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/nft/IZoraCreator1155TypesV1.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\nimport {ITransferHookReceiver} from \"../interfaces/ITransferHookReceiver.sol\";\n\n/*\n\n\n             ░░░░░░░░░░░░░░              \n        ░░▒▒░░░░░░░░░░░░░░░░░░░░        \n      ░░▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░      \n    ░░▒▒▒▒░░░░░░░░░░░░░░    ░░░░░░░░    \n   ░▓▓▒▒▒▒░░░░░░░░░░░░        ░░░░░░░    \n  ░▓▓▓▒▒▒▒░░░░░░░░░░░░        ░░░░░░░░  \n  ░▓▓▓▒▒▒▒░░░░░░░░░░░░░░    ░░░░░░░░░░  \n  ░▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░  \n  ░▓▓▓▓▓▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░  \n   ░▓▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░  \n    ░░▓▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░    \n    ░░▓▓▓▓▓▓▒▒▒▒▒▒▒▒░░░░░░░░░▒▒▒▒▒░░    \n      ░░▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░      \n          ░░▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░░          \n\n               OURS TRULY,\n\n */\n\n/// Imagine. Mint. Enjoy.\n/// @notice Interface for types used across the ZoraCreator1155 contract\n/// @author @iainnash / @tbtstl\ninterface IZoraCreator1155TypesV1 {\n    /// @notice Used to store individual token data\n    struct TokenData {\n        string uri;\n        uint256 maxSupply;\n        uint256 totalMinted;\n    }\n\n    /// @notice Used to store contract-level configuration\n    struct ContractConfig {\n        address owner;\n        uint96 __gap1;\n        address payable fundsRecipient;\n        uint96 __gap2;\n        ITransferHookReceiver transferHook;\n        uint96 __gap3;\n    }\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/interfaces/IOwnable.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\ninterface IOwnable {\n    function owner() external returns (address);\n\n    event OwnershipTransferred(address lastOwner, address newOwner);\n}\n"
      },
      "node_modules/@zoralabs/shared-contracts/src/interfaces/IVersionedContract.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\ninterface IVersionedContract {\n    function contractVersion() external pure returns (string memory);\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/interfaces/ICreatorRoyaltiesControl.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport {IERC2981} from \"@openzeppelin/contracts/interfaces/IERC2981.sol\";\n\ninterface ICreatorRoyaltyErrors {\n    /// @notice Thrown when a user tries to have 100% supply royalties\n    error InvalidMintSchedule();\n}\n\ninterface ICreatorRoyaltiesControl is IERC2981 {\n    /// @notice The RoyaltyConfiguration struct is used to store the royalty configuration for a given token.\n    /// @param royaltyMintSchedule Every nth token will go to the royalty recipient.\n    /// @param royaltyBPS The royalty amount in basis points for secondary sales.\n    /// @param royaltyRecipient The address that will receive the royalty payments.\n    struct RoyaltyConfiguration {\n        uint32 royaltyMintSchedule;\n        uint32 royaltyBPS;\n        address royaltyRecipient;\n    }\n\n    /// @notice Event emitted when royalties are updated\n    event UpdatedRoyalties(uint256 indexed tokenId, address indexed user, RoyaltyConfiguration configuration);\n\n    /// @notice External data getter to get royalties for a token\n    /// @param tokenId tokenId to get royalties configuration for\n    function getRoyalties(uint256 tokenId) external view returns (RoyaltyConfiguration memory);\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/permissions/CreatorPermissionStorageV1.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\n/// Imagine. Mint. Enjoy.\n/// @author @iainnash / @tbtstl\ncontract CreatorPermissionStorageV1 {\n    mapping(uint256 => mapping(address => uint256)) public permissions;\n\n    uint256[50] private __gap;\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/interfaces/ICreatorPermissionControl.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\n/// @notice Generic control interface for bit-based permissions-control\ninterface ICreatorPermissionControl {\n    /// @notice Emitted when permissions are updated\n    event UpdatedPermissions(uint256 indexed tokenId, address indexed user, uint256 indexed permissions);\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/renderer/CreatorRendererStorageV1.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\nimport {ICreatorRendererControl} from \"../interfaces/ICreatorRendererControl.sol\";\nimport {IRenderer1155} from \"../interfaces/IRenderer1155.sol\";\n\n/// @notice Creator Renderer Storage Configuration Contract V1\nabstract contract CreatorRendererStorageV1 is ICreatorRendererControl {\n    /// @notice Mapping for custom renderers\n    mapping(uint256 => IRenderer1155) public customRenderers;\n\n    uint256[50] private __gap;\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/royalties/CreatorRoyaltiesStorageV1.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\nimport {ICreatorRoyaltiesControl} from \"../interfaces/ICreatorRoyaltiesControl.sol\";\n\n/// Imagine. Mint. Enjoy.\n/// @title CreatorRoyaltiesControl\n/// @author ZORA @iainnash / @tbtstl\n/// @notice Royalty storage contract pattern\nabstract contract CreatorRoyaltiesStorageV1 is ICreatorRoyaltiesControl {\n    mapping(uint256 => RoyaltyConfiguration) public royalties;\n\n    uint256[50] private __gap;\n}\n"
      },
      "node_modules/@openzeppelin/contracts/interfaces/IERC2981.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.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(\n        uint256 tokenId,\n        uint256 salePrice\n    ) external view returns (address receiver, uint256 royaltyAmount);\n}\n"
      },
      "node_modules/@zoralabs/shared-contracts/src/interfaces/ICreatorCommands.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\n/// @notice Creator Commands used by minter modules passed back to the main modules\ninterface ICreatorCommands {\n    /// @notice This enum is used to define supported creator action types.\n    /// This can change in the future\n    enum CreatorActions {\n        // No operation - also the default for mintings that may not return a command\n        NO_OP,\n        // Send ether\n        SEND_ETH,\n        // Mint operation\n        MINT\n    }\n\n    /// @notice This command is for\n    struct Command {\n        // Method for operation\n        CreatorActions method;\n        // Arguments used for this operation\n        bytes args;\n    }\n\n    /// @notice This command set is returned from the minter back to the user\n    struct CommandSet {\n        Command[] commands;\n        uint256 at;\n    }\n}\n"
      },
      "node_modules/@zoralabs/shared-contracts/src/interfaces/IMinter1155.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport {ICreatorCommands} from \"./ICreatorCommands.sol\";\nimport {IERC165Upgradeable} from \"./IERC165Upgradeable.sol\";\n\n/// @notice Minter standard interface\n/// @dev Minters need to confirm to the ERC165 selector of type(IMinter1155).interfaceId\ninterface IMinter1155 is IERC165Upgradeable {\n    function requestMint(\n        address sender,\n        uint256 tokenId,\n        uint256 quantity,\n        uint256 ethValueSent,\n        bytes calldata minterArguments\n    ) external returns (ICreatorCommands.CommandSet memory commands);\n}\n"
      },
      "node_modules/@zoralabs/shared-contracts/src/interfaces/ILegacyNaming.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\ninterface ILegacyNaming {\n    function name() external returns (string memory);\n\n    function symbol() external returns (string memory);\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/legacy-naming/LegacyNamingStorageV1.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\ncontract LegacyNamingStorageV1 {\n    string internal _name;\n\n    uint256[50] private __gap;\n}\n"
      },
      "node_modules/@openzeppelin/contracts/utils/Address.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.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     * Furthermore, `isContract` will also return true if the target contract within\n     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n     * which only has an effect at the end of a transaction.\n     * ====\n     *\n     * [IMPORTANT]\n     * ====\n     * You shouldn't rely on `isContract` to protect against flash loan attacks!\n     *\n     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n     * constructor.\n     * ====\n     */\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize/address.code.length, which returns 0\n        // for contracts in construction, since the code is only stored at the end\n        // of the constructor execution.\n\n        return account.code.length > 0;\n    }\n\n    /**\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n     * `recipient`, forwarding all available gas and reverting on errors.\n     *\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\n     * imposed by `transfer`, making them unable to receive funds via\n     * `transfer`. {sendValue} removes this limitation.\n     *\n     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n     *\n     * IMPORTANT: because control is transferred to `recipient`, care must be\n     * taken to not create reentrancy vulnerabilities. Consider using\n     * {ReentrancyGuard} or the\n     * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n    /**\n     * @dev Performs a Solidity function call using a low level `call`. A\n     * plain `call` is an unsafe replacement for a function call: use this\n     * function instead.\n     *\n     * If `target` reverts with a revert reason, it is bubbled up by this\n     * function (like regular Solidity function calls).\n     *\n     * Returns the raw returned data. To convert to the expected return value,\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n     *\n     * Requirements:\n     *\n     * - `target` must be a contract.\n     * - calling `target` with `data` must not revert.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n     * `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but also transferring `value` wei to `target`.\n     *\n     * Requirements:\n     *\n     * - the calling contract must have an ETH balance of at least `value`.\n     * - the called Solidity function must be `payable`.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance >= value, \"Address: insufficient balance for call\");\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a delegate call.\n     *\n     * _Available since v3.4._\n     */\n    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a delegate call.\n     *\n     * _Available since v3.4._\n     */\n    function functionDelegateCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        (bool success, bytes memory returndata) = target.delegatecall(data);\n        return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n     *\n     * _Available since v4.8._\n     */\n    function verifyCallResultFromTarget(\n        address target,\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        if (success) {\n            if (returndata.length == 0) {\n                // only check isContract if the call was successful and the return data is empty\n                // otherwise we already know that it was a contract\n                require(isContract(target), \"Address: call to non-contract\");\n            }\n            return returndata;\n        } else {\n            _revert(returndata, errorMessage);\n        }\n    }\n\n    /**\n     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n     * revert reason or using the provided one.\n     *\n     * _Available since v4.3._\n     */\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            _revert(returndata, errorMessage);\n        }\n    }\n\n    function _revert(bytes memory returndata, string memory errorMessage) private pure {\n        // Look for revert reason and bubble it up if present\n        if (returndata.length > 0) {\n            // The easiest way to bubble the revert reason is using memory via assembly\n            /// @solidity memory-safe-assembly\n            assembly {\n                let returndata_size := mload(returndata)\n                revert(add(32, returndata), returndata_size)\n            }\n        } else {\n            revert(errorMessage);\n        }\n    }\n}\n"
      },
      "node_modules/@zoralabs/shared-contracts/src/interfaces/errors/IZoraCreator1155Errors.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport {IMinterErrors} from \"./IMinterErrors.sol\";\n\ninterface ILimitedMintPerAddressErrors {\n    error UserExceedsMintLimit(address user, uint256 limit, uint256 requestedAmount);\n}\n\ninterface ICreatorRoyaltyErrors {\n    /// @notice Thrown when a user tries to have 100% supply royalties\n    error InvalidMintSchedule();\n}\n\ninterface IZoraCreator1155Errors is ICreatorRoyaltyErrors, ILimitedMintPerAddressErrors, IMinterErrors {\n    error OnlyTransfersFromZoraMints();\n    error Call_TokenIdMismatch();\n    error TokenIdMismatch(uint256 expected, uint256 actual);\n    error UserMissingRoleForToken(address user, uint256 tokenId, uint256 role);\n\n    error Config_TransferHookNotSupported(address proposedAddress);\n\n    error Mint_InsolventSaleTransfer();\n    error Mint_ValueTransferFail();\n    error Mint_TokenIDMintNotAllowed();\n    error Mint_UnknownCommand();\n    error Mint_InvalidMintArrayLength();\n\n    error Burn_NotOwnerOrApproved(address operator, address user);\n\n    error NewOwnerNeedsToBeAdmin();\n\n    error Sale_CannotCallNonSalesContract(address targetContract);\n\n    error CallFailed(bytes reason);\n    error Renderer_NotValidRendererContract();\n\n    error ETHWithdrawFailed(address recipient, uint256 amount);\n    error FundsWithdrawInsolvent(uint256 amount, uint256 contractValue);\n    error ProtocolRewardsWithdrawFailed(address caller, address recipient, uint256 amount);\n\n    error CannotMintMoreTokens(uint256 tokenId, uint256 quantity, uint256 totalMinted, uint256 maxSupply);\n\n    error MintNotYetStarted();\n    error PremintDeleted();\n\n    // DelegatedMinting related errors\n    error InvalidSignatureVersion();\n    error premintSignerContractNotAContract();\n    error InvalidSignature();\n    error InvalidSigner(bytes4 magicValue);\n    error premintSignerContractFailedToRecoverSigner();\n    error FirstMinterAddressZero();\n\n    error ERC1155_MINT_TO_ZERO_ADDRESS();\n\n    error InvalidPremintVersion();\n    error NonEthRedemption();\n}\n"
      },
      "node_modules/@zoralabs/openzeppelin-contracts-upgradeable/contracts/utils/cryptography/ECDSAUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../StringsUpgradeable.sol\";\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSAUpgradeable {\n    enum RecoverError {\n        NoError,\n        InvalidSignature,\n        InvalidSignatureLength,\n        InvalidSignatureS,\n        InvalidSignatureV // Deprecated in v4.8\n    }\n\n    function _throwError(RecoverError error) private pure {\n        if (error == RecoverError.NoError) {\n            return; // no error: do nothing\n        } else if (error == RecoverError.InvalidSignature) {\n            revert(\"ECDSA: invalid signature\");\n        } else if (error == RecoverError.InvalidSignatureLength) {\n            revert(\"ECDSA: invalid signature length\");\n        } else if (error == RecoverError.InvalidSignatureS) {\n            revert(\"ECDSA: invalid signature 's' value\");\n        }\n    }\n\n    /**\n     * @dev Returns the address that signed a hashed message (`hash`) with\n     * `signature` or error string. This address can then be used for verification purposes.\n     *\n     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n     * this function rejects them by requiring the `s` value to be in the lower\n     * half order, and the `v` value to be either 27 or 28.\n     *\n     * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n     * verification to be secure: it is possible to craft signatures that\n     * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n     * this is by receiving a hash of the original message (which may otherwise\n     * be too long), and then calling {toEthSignedMessageHash} on it.\n     *\n     * Documentation for signature generation:\n     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n     *\n     * _Available since v4.3._\n     */\n    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n        if (signature.length == 65) {\n            bytes32 r;\n            bytes32 s;\n            uint8 v;\n            // ecrecover takes the signature parameters, and the only way to get them\n            // currently is to use assembly.\n            /// @solidity memory-safe-assembly\n            assembly {\n                r := mload(add(signature, 0x20))\n                s := mload(add(signature, 0x40))\n                v := byte(0, mload(add(signature, 0x60)))\n            }\n            return tryRecover(hash, v, r, s);\n        } else {\n            return (address(0), RecoverError.InvalidSignatureLength);\n        }\n    }\n\n    /**\n     * @dev Returns the address that signed a hashed message (`hash`) with\n     * `signature`. This address can then be used for verification purposes.\n     *\n     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n     * this function rejects them by requiring the `s` value to be in the lower\n     * half order, and the `v` value to be either 27 or 28.\n     *\n     * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n     * verification to be secure: it is possible to craft signatures that\n     * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n     * this is by receiving a hash of the original message (which may otherwise\n     * be too long), and then calling {toEthSignedMessageHash} on it.\n     */\n    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n        (address recovered, RecoverError error) = tryRecover(hash, signature);\n        _throwError(error);\n        return recovered;\n    }\n\n    /**\n     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n     *\n     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n     *\n     * _Available since v4.3._\n     */\n    function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {\n        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n        uint8 v = uint8((uint256(vs) >> 255) + 27);\n        return tryRecover(hash, v, r, s);\n    }\n\n    /**\n     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n     *\n     * _Available since v4.2._\n     */\n    function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n        (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n        _throwError(error);\n        return recovered;\n    }\n\n    /**\n     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n     * `r` and `s` signature fields separately.\n     *\n     * _Available since v4.3._\n     */\n    function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\n        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n        // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n        //\n        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n        // these malleable signatures as well.\n        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n            return (address(0), RecoverError.InvalidSignatureS);\n        }\n\n        // If the signature is valid (and not malleable), return the signer address\n        address signer = ecrecover(hash, v, r, s);\n        if (signer == address(0)) {\n            return (address(0), RecoverError.InvalidSignature);\n        }\n\n        return (signer, RecoverError.NoError);\n    }\n\n    /**\n     * @dev Overload of {ECDSA-recover} that receives the `v`,\n     * `r` and `s` signature fields separately.\n     */\n    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n        _throwError(error);\n        return recovered;\n    }\n\n    /**\n     * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n     * produces hash corresponding to the one signed with the\n     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n     * JSON-RPC method as part of EIP-191.\n     *\n     * See {recover}.\n     */\n    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {\n        // 32 is the length in bytes of hash,\n        // enforced by the type signature above\n        /// @solidity memory-safe-assembly\n        assembly {\n            mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\")\n            mstore(0x1c, hash)\n            message := keccak256(0x00, 0x3c)\n        }\n    }\n\n    /**\n     * @dev Returns an Ethereum Signed Message, created from `s`. This\n     * produces hash corresponding to the one signed with the\n     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n     * JSON-RPC method as part of EIP-191.\n     *\n     * See {recover}.\n     */\n    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n        return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", StringsUpgradeable.toString(s.length), s));\n    }\n\n    /**\n     * @dev Returns an Ethereum Signed Typed Data, created from a\n     * `domainSeparator` and a `structHash`. This produces hash corresponding\n     * to the one signed with the\n     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n     * JSON-RPC method as part of EIP-712.\n     *\n     * See {recover}.\n     */\n    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            let ptr := mload(0x40)\n            mstore(ptr, \"\\x19\\x01\")\n            mstore(add(ptr, 0x02), domainSeparator)\n            mstore(add(ptr, 0x22), structHash)\n            data := keccak256(ptr, 0x42)\n        }\n    }\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/minters/fixed-price/ZoraCreatorFixedPriceSaleStrategy.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\nimport {Enjoy} from \"_imagine/mint/Enjoy.sol\";\nimport {IMinter1155} from \"../../interfaces/IMinter1155.sol\";\nimport {ICreatorCommands} from \"../../interfaces/ICreatorCommands.sol\";\nimport {SaleStrategy} from \"../SaleStrategy.sol\";\nimport {SaleCommandHelper} from \"../utils/SaleCommandHelper.sol\";\nimport {LimitedMintPerAddress} from \"../utils/LimitedMintPerAddress.sol\";\nimport {IMinterErrors} from \"../../interfaces/IMinterErrors.sol\";\n\n/*\n\n\n             ░░░░░░░░░░░░░░              \n        ░░▒▒░░░░░░░░░░░░░░░░░░░░        \n      ░░▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░      \n    ░░▒▒▒▒░░░░░░░░░░░░░░    ░░░░░░░░    \n   ░▓▓▒▒▒▒░░░░░░░░░░░░        ░░░░░░░    \n  ░▓▓▓▒▒▒▒░░░░░░░░░░░░        ░░░░░░░░  \n  ░▓▓▓▒▒▒▒░░░░░░░░░░░░░░    ░░░░░░░░░░  \n  ░▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░  \n  ░▓▓▓▓▓▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░  \n   ░▓▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░  \n    ░░▓▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░    \n    ░░▓▓▓▓▓▓▒▒▒▒▒▒▒▒░░░░░░░░░▒▒▒▒▒░░    \n      ░░▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░      \n          ░░▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░░          \n\n               OURS TRULY,\n\n\n    github.com/ourzora/zora-1155-contracts\n\n*/\n\n/// @title ZoraCreatorFixedPriceSaleStrategy\n/// @notice A sale strategy for ZoraCreator that allows for fixed price sales over a given time period\n/// @author @iainnash / @tbtstl\ncontract ZoraCreatorFixedPriceSaleStrategy is Enjoy, SaleStrategy, LimitedMintPerAddress, IMinterErrors {\n    struct SalesConfig {\n        /// @notice Unix timestamp for the sale start\n        uint64 saleStart;\n        /// @notice Unix timestamp for the sale end\n        uint64 saleEnd;\n        /// @notice Max tokens that can be minted for an address, 0 if unlimited\n        uint64 maxTokensPerAddress;\n        /// @notice Price per token in eth wei\n        uint96 pricePerToken;\n        /// @notice Funds recipient (0 if no different funds recipient than the contract global)\n        address fundsRecipient;\n    }\n\n    // target -> tokenId -> settings\n    mapping(address => mapping(uint256 => SalesConfig)) internal salesConfigs;\n\n    using SaleCommandHelper for ICreatorCommands.CommandSet;\n\n    function contractURI() external pure override returns (string memory) {\n        return \"https://github.com/ourzora/zora-1155-contracts/\";\n    }\n\n    /// @notice The name of the sale strategy\n    function contractName() external pure override returns (string memory) {\n        return \"Fixed Price Sale Strategy\";\n    }\n\n    /// @notice The version of the sale strategy\n    function contractVersion() external pure override returns (string memory) {\n        return \"1.1.0\";\n    }\n\n    event SaleSet(address indexed mediaContract, uint256 indexed tokenId, SalesConfig salesConfig);\n    event MintComment(address indexed sender, address indexed tokenContract, uint256 indexed tokenId, uint256 quantity, string comment);\n\n    /// @notice Compiles and returns the commands needed to mint a token using this sales strategy\n    /// @param tokenId The token ID to mint\n    /// @param quantity The quantity of tokens to mint\n    /// @param ethValueSent The amount of ETH sent with the transaction\n    /// @param minterArguments The arguments passed to the minter, which should be the address to mint to\n    function requestMint(\n        address,\n        uint256 tokenId,\n        uint256 quantity,\n        uint256 ethValueSent,\n        bytes calldata minterArguments\n    ) external returns (ICreatorCommands.CommandSet memory commands) {\n        address mintTo;\n        string memory comment = \"\";\n        if (minterArguments.length == 32) {\n            mintTo = abi.decode(minterArguments, (address));\n        } else {\n            (mintTo, comment) = abi.decode(minterArguments, (address, string));\n        }\n\n        SalesConfig storage config = salesConfigs[msg.sender][tokenId];\n\n        // If sales config does not exist this first check will always fail.\n\n        // Check sale end\n        if (block.timestamp > config.saleEnd) {\n            revert SaleEnded();\n        }\n\n        // Check sale start\n        if (block.timestamp < config.saleStart) {\n            revert SaleHasNotStarted();\n        }\n\n        // Check value sent\n        if (config.pricePerToken * quantity != ethValueSent) {\n            revert WrongValueSent();\n        }\n\n        // Check minted per address limit\n        if (config.maxTokensPerAddress > 0) {\n            _requireMintNotOverLimitAndUpdate(config.maxTokensPerAddress, quantity, msg.sender, tokenId, mintTo);\n        }\n\n        bool shouldTransferFunds = config.fundsRecipient != address(0);\n        commands.setSize(shouldTransferFunds ? 2 : 1);\n\n        // Mint command\n        commands.mint(mintTo, tokenId, quantity);\n\n        if (bytes(comment).length > 0) {\n            emit MintComment(mintTo, msg.sender, tokenId, quantity, comment);\n        }\n\n        // Should transfer funds if funds recipient is set to a non-default address\n        if (shouldTransferFunds) {\n            commands.transfer(config.fundsRecipient, ethValueSent);\n        }\n    }\n\n    /// @notice Sets the sale config for a given token\n    function setSale(uint256 tokenId, SalesConfig memory salesConfig) external {\n        salesConfigs[msg.sender][tokenId] = salesConfig;\n\n        // Emit event\n        emit SaleSet(msg.sender, tokenId, salesConfig);\n    }\n\n    /// @notice Deletes the sale config for a given token\n    function resetSale(uint256 tokenId) external override {\n        delete salesConfigs[msg.sender][tokenId];\n\n        // Deleted sale emit event\n        emit SaleSet(msg.sender, tokenId, salesConfigs[msg.sender][tokenId]);\n    }\n\n    /// @notice Returns the sale config for a given token\n    function sale(address tokenContract, uint256 tokenId) external view returns (SalesConfig memory) {\n        return salesConfigs[tokenContract][tokenId];\n    }\n\n    function supportsInterface(bytes4 interfaceId) public pure virtual override(LimitedMintPerAddress, SaleStrategy) returns (bool) {\n        return super.supportsInterface(interfaceId) || LimitedMintPerAddress.supportsInterface(interfaceId) || SaleStrategy.supportsInterface(interfaceId);\n    }\n}\n"
      },
      "node_modules/@zoralabs/shared-contracts/src/premint/PremintEncoding.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport {PremintConfig, PremintConfigV2, Erc20PremintConfigV1} from \"../entities/Premint.sol\";\nimport {IMinter1155} from \"../interfaces/IMinter1155.sol\";\n\nstruct EncodedPremintConfig {\n    bytes premintConfig;\n    bytes32 premintConfigVersion;\n    uint32 uid;\n    address minter;\n}\n\nlibrary PremintEncoding {\n    string internal constant VERSION_1 = \"1\";\n    bytes32 internal constant HASHED_VERSION_1 = keccak256(bytes(VERSION_1));\n    string internal constant VERSION_2 = \"2\";\n    bytes32 internal constant HASHED_VERSION_2 = keccak256(bytes(VERSION_2));\n    string internal constant ERC20_VERSION_1 = \"ERC20_1\";\n    bytes32 internal constant HASHED_ERC20_VERSION_1 = keccak256(bytes(ERC20_VERSION_1));\n\n    function encodePremintV1(PremintConfig memory premintConfig) internal pure returns (EncodedPremintConfig memory) {\n        return EncodedPremintConfig(abi.encode(premintConfig), HASHED_VERSION_1, premintConfig.uid, premintConfig.tokenConfig.fixedPriceMinter);\n    }\n\n    function encodePremintV2(PremintConfigV2 memory premintConfig) internal pure returns (EncodedPremintConfig memory) {\n        return EncodedPremintConfig(abi.encode(premintConfig), HASHED_VERSION_2, premintConfig.uid, premintConfig.tokenConfig.fixedPriceMinter);\n    }\n\n    function encodePremintErc20V1(Erc20PremintConfigV1 memory premintConfig) internal pure returns (EncodedPremintConfig memory)  {\n        return EncodedPremintConfig(abi.encode(premintConfig), HASHED_ERC20_VERSION_1, premintConfig.uid, premintConfig.tokenConfig.erc20Minter);\n    }\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/minters/erc20/ERC20Minter.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport {ReentrancyGuard} from \"@openzeppelin/contracts/security/ReentrancyGuard.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {IProtocolRewards} from \"@zoralabs/protocol-rewards/src/interfaces/IProtocolRewards.sol\";\nimport {IERC20Minter} from \"../../interfaces/IERC20Minter.sol\";\nimport {LimitedMintPerAddress} from \"../../minters/utils/LimitedMintPerAddress.sol\";\nimport {SaleStrategy} from \"../../minters/SaleStrategy.sol\";\nimport {ICreatorCommands} from \"../../interfaces/ICreatorCommands.sol\";\nimport {ERC20MinterRewards} from \"./ERC20MinterRewards.sol\";\nimport {IZora1155} from \"./IZora1155.sol\";\n\n/*\n\n\n             ░░░░░░░░░░░░░░              \n        ░░▒▒░░░░░░░░░░░░░░░░░░░░        \n      ░░▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░      \n    ░░▒▒▒▒░░░░░░░░░░░░░░    ░░░░░░░░    \n   ░▓▓▒▒▒▒░░░░░░░░░░░░        ░░░░░░░    \n  ░▓▓▓▒▒▒▒░░░░░░░░░░░░        ░░░░░░░░  \n  ░▓▓▓▒▒▒▒░░░░░░░░░░░░░░    ░░░░░░░░░░  \n  ░▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░  \n  ░▓▓▓▓▓▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░  \n   ░▓▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░  \n    ░░▓▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░    \n    ░░▓▓▓▓▓▓▒▒▒▒▒▒▒▒░░░░░░░░░▒▒▒▒▒░░    \n      ░░▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░      \n          ░░▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░░          \n\n               OURS TRULY,\n\n\n    github.com/ourzora/zora-protocol\n\n*/\n\n/// @title ERC20Minter\n/// @notice Allows for ZoraCreator Mints to be purchased using ERC20 tokens\n/// @dev While this contract _looks_ like a minter, we need to be able to directly manage ERC20 tokens. Therefore, we need to establish minter permissions but instead of using the `requestMint` flow we directly request tokens to be minted in order to safely handle the incoming ERC20 tokens.\n/// @author @isabellasmallcombe\ncontract ERC20Minter is ReentrancyGuard, IERC20Minter, SaleStrategy, LimitedMintPerAddress, ERC20MinterRewards {\n    using SafeERC20 for IERC20;\n\n    /// @notice The address of the Zora rewards recipient\n    address public zoraRewardRecipientAddress;\n\n    /// @notice The ERC20 sale configuration for a given 1155 token\n    /// @dev 1155 token address => 1155 token id => SalesConfig\n    mapping(address => mapping(uint256 => SalesConfig)) internal salesConfigs;\n\n    /// @notice Initializes the contract with a Zora rewards recipient address\n    /// @dev Allows deterministic contract address, called on deploy\n    function initialize(address _zoraRewardRecipientAddress) external {\n        if (_zoraRewardRecipientAddress == address(0)) {\n            revert AddressZero();\n        }\n\n        if (zoraRewardRecipientAddress != address(0)) {\n            revert AlreadyInitialized();\n        }\n\n        zoraRewardRecipientAddress = _zoraRewardRecipientAddress;\n\n        emit ERC20MinterInitialized(TOTAL_REWARD_PCT);\n    }\n\n    /// @notice Computes the total reward value for a given amount of ERC20 tokens\n    /// @param totalValue The total number of ERC20 tokens\n    function computeTotalReward(uint256 totalValue) public pure returns (uint256) {\n        return (totalValue * TOTAL_REWARD_PCT) / BPS_TO_PERCENT_2_DECIMAL_PERCISION;\n    }\n\n    /// @notice Computes the rewards value given an amount and a reward percentage\n    /// @param totalReward The total reward to be distributed\n    /// @param rewardPct The percentage of the reward to be distributed\n    function computeReward(uint256 totalReward, uint256 rewardPct) public pure returns (uint256) {\n        return (totalReward * rewardPct) / BPS_TO_PERCENT_8_DECIMAL_PERCISION;\n    }\n\n    /// @notice Computes the rewards for an ERC20 mint\n    /// @param totalReward The total reward to be distributed\n    function computePaidMintRewards(uint256 totalReward) public pure returns (RewardsSettings memory) {\n        uint256 createReferralReward = computeReward(totalReward, CREATE_REFERRAL_PAID_MINT_REWARD_PCT);\n        uint256 mintReferralReward = computeReward(totalReward, MINT_REFERRAL_PAID_MINT_REWARD_PCT);\n        uint256 firstMinterReward = computeReward(totalReward, FIRST_MINTER_REWARD_PCT);\n        uint256 zoraReward = totalReward - (createReferralReward + mintReferralReward + firstMinterReward);\n\n        return\n            RewardsSettings({\n                createReferralReward: createReferralReward,\n                mintReferralReward: mintReferralReward,\n                zoraReward: zoraReward,\n                firstMinterReward: firstMinterReward\n            });\n    }\n\n    /// @notice Gets the create referral address for a given token\n    /// @param tokenContract The address of the token contract\n    /// @param tokenId The ID of the token\n    function getCreateReferral(address tokenContract, uint256 tokenId) public view returns (address createReferral) {\n        try IZora1155(tokenContract).createReferrals(tokenId) returns (address contractCreateReferral) {\n            createReferral = contractCreateReferral;\n        } catch {}\n\n        if (createReferral == address(0)) {\n            createReferral = zoraRewardRecipientAddress;\n        }\n    }\n\n    /// @notice Gets the first minter address for a given token\n    /// @param tokenContract The address of the token contract\n    /// @param tokenId The ID of the token\n    function getFirstMinter(address tokenContract, uint256 tokenId) public view returns (address firstMinter) {\n        try IZora1155(tokenContract).firstMinters(tokenId) returns (address contractFirstMinter) {\n            firstMinter = contractFirstMinter;\n\n            if (firstMinter == address(0)) {\n                firstMinter = IZora1155(tokenContract).getCreatorRewardRecipient(tokenId);\n            }\n        } catch {\n            firstMinter = zoraRewardRecipientAddress;\n        }\n    }\n\n    /// @notice Handles the incoming transfer of ERC20 tokens\n    /// @param currency The address of the currency to use for the mint\n    /// @param totalValue The total value of the mint\n    function _handleIncomingTransfer(address currency, uint256 totalValue) internal {\n        uint256 beforeBalance = IERC20(currency).balanceOf(address(this));\n        IERC20(currency).safeTransferFrom(msg.sender, address(this), totalValue);\n        uint256 afterBalance = IERC20(currency).balanceOf(address(this));\n\n        if ((beforeBalance + totalValue) != afterBalance) {\n            revert ERC20TransferSlippage();\n        }\n    }\n\n    /// @notice Distributes the rewards to the appropriate addresses\n    /// @param totalReward The total reward to be distributed\n    /// @param currency The currency used for the mint\n    /// @param tokenId The ID of the token to mint\n    /// @param tokenAddress The address of the token to mint\n    /// @param mintReferral The address of the mint referral\n    function _distributeRewards(uint256 totalReward, address currency, uint256 tokenId, address tokenAddress, address mintReferral) private {\n        RewardsSettings memory settings = computePaidMintRewards(totalReward);\n\n        address createReferral = getCreateReferral(tokenAddress, tokenId);\n        address firstMinter = getFirstMinter(tokenAddress, tokenId);\n\n        if (mintReferral == address(0)) {\n            mintReferral = zoraRewardRecipientAddress;\n        }\n\n        IERC20(currency).safeTransfer(createReferral, settings.createReferralReward);\n        IERC20(currency).safeTransfer(firstMinter, settings.firstMinterReward);\n        IERC20(currency).safeTransfer(mintReferral, settings.mintReferralReward);\n        IERC20(currency).safeTransfer(zoraRewardRecipientAddress, settings.zoraReward);\n\n        emit ERC20RewardsDeposit(\n            createReferral,\n            mintReferral,\n            firstMinter,\n            zoraRewardRecipientAddress,\n            tokenAddress,\n            currency,\n            tokenId,\n            settings.createReferralReward,\n            settings.mintReferralReward,\n            settings.firstMinterReward,\n            settings.zoraReward\n        );\n    }\n\n    /// @notice Mints a token using an ERC20 currency, note the total value must have been approved prior to calling this function\n    /// @param mintTo The address to mint the token to\n    /// @param quantity The quantity of tokens to mint\n    /// @param tokenAddress The address of the token to mint\n    /// @param tokenId The ID of the token to mint\n    /// @param totalValue The total value of the mint\n    /// @param currency The address of the currency to use for the mint\n    /// @param mintReferral The address of the mint referral\n    /// @param comment The optional mint comment\n    function mint(\n        address mintTo,\n        uint256 quantity,\n        address tokenAddress,\n        uint256 tokenId,\n        uint256 totalValue,\n        address currency,\n        address mintReferral,\n        string calldata comment\n    ) external nonReentrant {\n        SalesConfig storage config = salesConfigs[tokenAddress][tokenId];\n\n        if (config.currency == address(0) || config.currency != currency) {\n            revert InvalidCurrency();\n        }\n\n        if (totalValue != (config.pricePerToken * quantity)) {\n            revert WrongValueSent();\n        }\n\n        if (block.timestamp < config.saleStart) {\n            revert SaleHasNotStarted();\n        }\n\n        if (block.timestamp > config.saleEnd) {\n            revert SaleEnded();\n        }\n\n        if (config.maxTokensPerAddress > 0) {\n            _requireMintNotOverLimitAndUpdate(config.maxTokensPerAddress, quantity, tokenAddress, tokenId, mintTo);\n        }\n\n        _handleIncomingTransfer(currency, totalValue);\n\n        IZora1155(tokenAddress).adminMint(mintTo, tokenId, quantity, \"\");\n\n        uint256 totalReward = computeTotalReward(totalValue);\n\n        _distributeRewards(totalReward, currency, tokenId, tokenAddress, mintReferral);\n\n        IERC20(config.currency).safeTransfer(config.fundsRecipient, totalValue - totalReward);\n\n        if (bytes(comment).length > 0) {\n            emit MintComment(mintTo, tokenAddress, tokenId, quantity, comment);\n        }\n    }\n\n    /// @notice The percentage of the total value that is distributed as rewards\n    function totalRewardPct() external pure returns (uint256) {\n        return TOTAL_REWARD_PCT;\n    }\n\n    /// @notice The URI of the contract\n    function contractURI() external pure returns (string memory) {\n        return \"https://github.com/ourzora/zora-protocol/\";\n    }\n\n    /// @notice The name of the contract\n    function contractName() external pure returns (string memory) {\n        return \"ERC20 Minter\";\n    }\n\n    /// @notice The version of the contract\n    function contractVersion() external pure returns (string memory) {\n        return \"1.0.0\";\n    }\n\n    /// @notice Sets the sale config for a given token\n    function setSale(uint256 tokenId, SalesConfig memory salesConfig) external {\n        if (salesConfig.pricePerToken < MIN_PRICE_PER_TOKEN) {\n            revert PricePerTokenTooLow();\n        }\n        if (salesConfig.currency == address(0)) {\n            revert AddressZero();\n        }\n        if (salesConfig.fundsRecipient == address(0)) {\n            revert AddressZero();\n        }\n\n        salesConfigs[msg.sender][tokenId] = salesConfig;\n\n        // Emit event\n        emit SaleSet(msg.sender, tokenId, salesConfig);\n    }\n\n    /// @notice Deletes the sale config for a given token\n    function resetSale(uint256 tokenId) external override {\n        delete salesConfigs[msg.sender][tokenId];\n\n        // Deleted sale emit event\n        emit SaleSet(msg.sender, tokenId, salesConfigs[msg.sender][tokenId]);\n    }\n\n    /// @notice Returns the sale config for a given token\n    function sale(address tokenContract, uint256 tokenId) external view returns (SalesConfig memory) {\n        return salesConfigs[tokenContract][tokenId];\n    }\n\n    /// @notice IERC165 interface support\n    function supportsInterface(bytes4 interfaceId) public pure virtual override(LimitedMintPerAddress, SaleStrategy) returns (bool) {\n        return super.supportsInterface(interfaceId) || LimitedMintPerAddress.supportsInterface(interfaceId) || SaleStrategy.supportsInterface(interfaceId);\n    }\n\n    /// @notice Reverts as `requestMint` is not used in the ERC20 minter. Call `mint` instead.\n    function requestMint(address, uint256, uint256, uint256, bytes calldata) external pure returns (ICreatorCommands.CommandSet memory) {\n        revert RequestMintInvalidUseMint();\n    }\n\n    /// @notice Set the Zora rewards recipient address\n    /// @param recipient The new recipient address\n    function setZoraRewardsRecipient(address recipient) external {\n        if (msg.sender != zoraRewardRecipientAddress) {\n            revert OnlyZoraRewardsRecipient();\n        }\n\n        if (recipient == address(0)) {\n            revert AddressZero();\n        }\n\n        emit ZoraRewardsRecipientSet(zoraRewardRecipientAddress, recipient);\n\n        zoraRewardRecipientAddress = recipient;\n    }\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/interfaces/IERC1271.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\ninterface IERC1271 {\n    function isValidSignature(bytes32 _hash, bytes calldata _signature) external view returns (bytes4);\n}\n"
      },
      "node_modules/@zoralabs/mints-contracts/src/interfaces/IZoraMints1155Errors.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\ninterface IZoraMints1155Errors {\n    /**\n     * @dev No URI allowed for nonexistent token\n     */\n    error NoUriForNonexistentToken();\n\n    /**\n     * @dev Occurs when the amount of ETH sent to mint tokens does not match the required amount.\n     * The required amount is the product of the quantity of tokens to mint and the price per token.\n     */\n    error IncorrectAmountSent();\n\n    /**\n     * @dev Occurs when an attempt is made to create a token with a token ID that has already been used.\n     * Each token ID should be unique and can only be used once.\n     */\n    error TokenAlreadyCreated();\n\n    /**\n     * @dev Occurs when an operation is attempted on a token that does not exist.\n     * This can occur when trying to set a non-existent token as mintable, or when trying to redeem a non-existent token.\n     */\n    error TokenDoesNotExist();\n\n    /**\n     * @dev Occurs when a transfer of ETH fails.\n     * This can occur when trying to send the unwrapped value of redeemed tokens to a recipient.\n     */\n    error ETHTransferFailed();\n\n    /**\n     * @dev Occurs when an attempt is made to set the price of a token to 0.\n     */\n    error InvalidTokenPrice();\n\n    /**\n     * @dev Occurs when redeem or redeemBatch is called with an invalid recipient.\n     */\n    error InvalidRecipient();\n\n    /**\n     * @dev Occurs when the token address does not match the expected token address.\n     */\n    error TokenMismatch(address storedTokenAddress, address expectedTokenAddress);\n\n    /**\n     * @dev Occurs when an attempt is made to mint a token that is not mintable.\n     */\n    error TokenNotMintable();\n\n    /**\n     * @dev Occurs when the length of the two arrays do not match.\n     */\n    error ArrayLengthMismatch(uint256 lengthA, uint256 lengthB);\n\n    /**\n     * @dev Occurs when the price of an ERC20 Token is not the same as the expected price.\n     */\n    error ERC20TransferSlippage();\n\n    /**\n     * @dev Occurs when the address is not a redeem handler\n     */\n    error NotARedeemHandler(address handler);\n}\n"
      },
      "node_modules/@zoralabs/mints-contracts/src/interfaces/IUpdateableTokenURI.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\ninterface IUpdateableTokenURI {\n    /**\n     * @dev Emitted when the contract URI and base URI are updated.\n     */\n    event URIsUpdated(string contractURI, string baseURI);\n\n    function notifyURIsUpdated(string calldata contractURI, string calldata baseURI) external;\n    function notifyUpdatedTokenURI(string calldata uri, uint256 tokenId) external;\n}\n"
      },
      "node_modules/@openzeppelin/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"
      },
      "node_modules/@zoralabs/mints-contracts/src/interfaces/IRedeemHandler.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\n\ninterface IRedeemHandler is IERC165 {\n    function handleRedeemEth(address redeemer, uint tokenId, uint quantity, address recipient) external payable;\n\n    function handleRedeemErc20(uint256 valueToRedeem, address redeemer, uint tokenId, uint quantity, address recipient) external;\n}\n"
      },
      "node_modules/@zoralabs/openzeppelin-contracts-upgradeable/contracts/proxy/beacon/IBeaconUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeaconUpgradeable {\n    /**\n     * @dev Must return an address that can be used as a delegate call target.\n     *\n     * {BeaconProxy} will check that this address is a contract.\n     */\n    function implementation() external view returns (address);\n}\n"
      },
      "node_modules/@zoralabs/openzeppelin-contracts-upgradeable/contracts/utils/StorageSlotUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```solidity\n * contract ERC1967 {\n *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n *     function _getImplementation() internal view returns (address) {\n *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n *     }\n *\n *     function _setImplementation(address newImplementation) internal {\n *         require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n *     }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._\n * _Available since v4.9 for `string`, `bytes`._\n */\nlibrary StorageSlotUpgradeable {\n    struct AddressSlot {\n        address value;\n    }\n\n    struct BooleanSlot {\n        bool value;\n    }\n\n    struct Bytes32Slot {\n        bytes32 value;\n    }\n\n    struct Uint256Slot {\n        uint256 value;\n    }\n\n    struct StringSlot {\n        string value;\n    }\n\n    struct BytesSlot {\n        bytes value;\n    }\n\n    /**\n     * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n     */\n    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n     */\n    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n     */\n    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n     */\n    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `StringSlot` with member `value` located at `slot`.\n     */\n    function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\n     */\n    function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := store.slot\n        }\n    }\n\n    /**\n     * @dev Returns an `BytesSlot` with member `value` located at `slot`.\n     */\n    function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\n     */\n    function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            r.slot := store.slot\n        }\n    }\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/interfaces/ICreatorRendererControl.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport {IRenderer1155} from \"./IRenderer1155.sol\";\n\n/// @notice Interface for creator renderer controls\ninterface ICreatorRendererControl {\n    /// @notice Get the custom renderer contract (if any) for the given token id\n    /// @dev Reverts if not custom renderer is set for this token\n    function getCustomRenderer(uint256 tokenId) external view returns (IRenderer1155 renderer);\n\n    error NoRendererForToken(uint256 tokenId);\n    error RendererNotValid(address renderer);\n    event RendererUpdated(uint256 indexed tokenId, address indexed renderer, address indexed user);\n}\n"
      },
      "node_modules/@zoralabs/shared-contracts/src/interfaces/IERC165Upgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\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 IERC165Upgradeable {\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"
      },
      "node_modules/@zoralabs/shared-contracts/src/interfaces/errors/IMinterErrors.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\ninterface IMinterErrors {\n    error CallerNotZoraCreator1155();\n    error MinterContractAlreadyExists();\n    error MinterContractDoesNotExist();\n\n    error SaleEnded();\n    error SaleHasNotStarted();\n    error WrongValueSent();\n    error InvalidMerkleProof(address mintTo, bytes32[] merkleProof, bytes32 merkleRoot);\n}\n"
      },
      "node_modules/@zoralabs/openzeppelin-contracts-upgradeable/contracts/utils/StringsUpgradeable.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/MathUpgradeable.sol\";\nimport \"./math/SignedMathUpgradeable.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\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 = MathUpgradeable.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 `int256` to its ASCII `string` decimal representation.\n     */\n    function toString(int256 value) internal pure returns (string memory) {\n        return string(abi.encodePacked(value < 0 ? \"-\" : \"\", toString(SignedMathUpgradeable.abs(value))));\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n     */\n    function toHexString(uint256 value) internal pure returns (string memory) {\n        unchecked {\n            return toHexString(value, MathUpgradeable.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    /**\n     * @dev Returns true if the two strings are equal.\n     */\n    function equal(string memory a, string memory b) internal pure returns (bool) {\n        return keccak256(bytes(a)) == keccak256(bytes(b));\n    }\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/_imagine/mint/Enjoy.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\n/*\n\n\n\n\n\n             ░░░░░░░░░░░░░░              \n        ░░▒▒░░░░░░░░░░░░░░░░░░░░        \n      ░░▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░      \n    ░░▒▒▒▒░░░░░░░░░░░░░░    ░░░░░░░░    \n   ░▓▓▒▒▒▒░░░░░░░░░░░░        ░░░░░░░    \n  ░▓▓▓▒▒▒▒░░░░░░░░░░░░        ░░░░░░░░  \n  ░▓▓▓▒▒▒▒░░░░░░░░░░░░░░    ░░░░░░░░░░  \n  ░▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░  \n  ░▓▓▓▓▓▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░  \n   ░▓▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░  \n    ░░▓▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░    \n    ░░▓▓▓▓▓▓▒▒▒▒▒▒▒▒░░░░░░░░░▒▒▒▒▒░░    \n      ░░▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░      \n          ░░▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░░          \n\n               OURS TRULY,\n\n\n\n\n\n\n\n\n\n\n\n */\n\ninterface Enjoy {\n\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/minters/SaleStrategy.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\nimport {IERC165Upgradeable} from \"@zoralabs/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC165Upgradeable.sol\";\nimport {IMinter1155} from \"../interfaces/IMinter1155.sol\";\nimport {IContractMetadata} from \"../interfaces/IContractMetadata.sol\";\nimport {IVersionedContract} from \"@zoralabs/shared-contracts/interfaces/IVersionedContract.sol\";\n\n/// @notice Sales Strategy Helper contract template on top of IMinter1155\n/// @author @iainnash / @tbtstl\nabstract contract SaleStrategy is IMinter1155, IVersionedContract, IContractMetadata {\n    /// @notice This function resets the sales configuration for a given tokenId and contract.\n    /// @dev This function is intentioned to be called directly from the affected sales contract\n    function resetSale(uint256 tokenId) external virtual;\n\n    function supportsInterface(bytes4 interfaceId) public pure virtual returns (bool) {\n        return interfaceId == type(IMinter1155).interfaceId || interfaceId == type(IERC165Upgradeable).interfaceId;\n    }\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/minters/utils/SaleCommandHelper.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\nimport {ICreatorCommands} from \"../../interfaces/ICreatorCommands.sol\";\n\n/// @title SaleCommandHelper\n/// @notice Helper library for creating commands for the sale contract\n/// @author @iainnash / @tbtstl\nlibrary SaleCommandHelper {\n    /// @notice Sets the size of commands and initializes command array. Empty entries are skipped by the resolver.\n    /// @dev Beware: this removes all previous command entries from memory\n    /// @param commandSet command set struct storage.\n    /// @param size size to set for the new struct\n    function setSize(ICreatorCommands.CommandSet memory commandSet, uint256 size) internal pure {\n        commandSet.commands = new ICreatorCommands.Command[](size);\n    }\n\n    /// @notice Creates a command to mint a token\n    /// @param commandSet The command set to add the command to\n    /// @param to The address to mint to\n    /// @param tokenId The token ID to mint\n    /// @param quantity The quantity of tokens to mint\n    function mint(ICreatorCommands.CommandSet memory commandSet, address to, uint256 tokenId, uint256 quantity) internal pure {\n        unchecked {\n            commandSet.commands[commandSet.at++] = ICreatorCommands.Command({\n                method: ICreatorCommands.CreatorActions.MINT,\n                args: abi.encode(to, tokenId, quantity)\n            });\n        }\n    }\n\n    /// @notice Creates a command to transfer ETH\n    /// @param commandSet The command set to add the command to\n    /// @param to The address to transfer to\n    /// @param amount The amount of ETH to transfer\n    function transfer(ICreatorCommands.CommandSet memory commandSet, address to, uint256 amount) internal pure {\n        unchecked {\n            commandSet.commands[commandSet.at++] = ICreatorCommands.Command({method: ICreatorCommands.CreatorActions.SEND_ETH, args: abi.encode(to, amount)});\n        }\n    }\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/minters/utils/LimitedMintPerAddress.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\nimport {ILimitedMintPerAddress} from \"../../interfaces/ILimitedMintPerAddress.sol\";\n\ncontract LimitedMintPerAddress is ILimitedMintPerAddress {\n    /// @notice Storage for slot to check user mints\n    /// @notice target contract -> tokenId -> minter user -> numberMinted\n    /// @dev No gap or stroage interface since this is used within non-upgradeable contracts\n    mapping(address => mapping(uint256 => mapping(address => uint256))) internal mintedPerAddress;\n\n    function getMintedPerWallet(address tokenContract, uint256 tokenId, address wallet) external view returns (uint256) {\n        return mintedPerAddress[tokenContract][tokenId][wallet];\n    }\n\n    function _requireMintNotOverLimitAndUpdate(uint256 limit, uint256 numRequestedMint, address tokenContract, uint256 tokenId, address wallet) internal {\n        mintedPerAddress[tokenContract][tokenId][wallet] += numRequestedMint;\n        if (mintedPerAddress[tokenContract][tokenId][wallet] > limit) {\n            revert UserExceedsMintLimit(wallet, limit, mintedPerAddress[tokenContract][tokenId][wallet]);\n        }\n    }\n\n    function supportsInterface(bytes4 interfaceId) public pure virtual override returns (bool) {\n        return interfaceId == type(ILimitedMintPerAddress).interfaceId;\n    }\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/interfaces/IMinterErrors.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.17;\n\nimport {IMinterErrors} from \"@zoralabs/shared-contracts/interfaces/errors/IMinterErrors.sol\";\n"
      },
      "node_modules/@openzeppelin/contracts/security/ReentrancyGuard.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuard {\n    // Booleans are more expensive than uint256 or any type that takes up a full\n    // word because each write operation emits an extra SLOAD to first read the\n    // slot's contents, replace the bits taken up by the boolean, and then write\n    // back. This is the compiler's defense against contract upgrades and\n    // pointer aliasing, and it cannot be disabled.\n\n    // The values being non-zero value makes deployment a bit more expensive,\n    // but in exchange the refund on every call to nonReentrant will be lower in\n    // amount. Since refunds are capped to a percentage of the total\n    // transaction's gas, it is best to keep them low in cases like this one, to\n    // increase the likelihood of the full refund coming into effect.\n    uint256 private constant _NOT_ENTERED = 1;\n    uint256 private constant _ENTERED = 2;\n\n    uint256 private _status;\n\n    constructor() {\n        _status = _NOT_ENTERED;\n    }\n\n    /**\n     * @dev Prevents a contract from calling itself, directly or indirectly.\n     * Calling a `nonReentrant` function from another `nonReentrant`\n     * function is not supported. It is possible to prevent this from happening\n     * by making the `nonReentrant` function external, and making it call a\n     * `private` function that does the actual work.\n     */\n    modifier nonReentrant() {\n        _nonReentrantBefore();\n        _;\n        _nonReentrantAfter();\n    }\n\n    function _nonReentrantBefore() private {\n        // On the first call to nonReentrant, _status will be _NOT_ENTERED\n        require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n        // Any calls to nonReentrant after this point will fail\n        _status = _ENTERED;\n    }\n\n    function _nonReentrantAfter() private {\n        // By storing the original value once again, a refund is triggered (see\n        // https://eips.ethereum.org/EIPS/eip-2200)\n        _status = _NOT_ENTERED;\n    }\n\n    /**\n     * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n     * `nonReentrant` function in the call stack.\n     */\n    function _reentrancyGuardEntered() internal view returns (bool) {\n        return _status == _ENTERED;\n    }\n}\n"
      },
      "node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n\n    /**\n     * @dev Returns the amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` tokens from the caller's account to `to`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address to, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `from` to `to` using the\n     * allowance mechanism. `amount` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n"
      },
      "node_modules/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../extensions/IERC20Permit.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n    using Address for address;\n\n    /**\n     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     */\n    function safeTransfer(IERC20 token, address to, uint256 value) internal {\n        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n    }\n\n    /**\n     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n     */\n    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n    }\n\n    /**\n     * @dev Deprecated. This function has issues similar to the ones found in\n     * {IERC20-approve}, and its usage is discouraged.\n     *\n     * Whenever possible, use {safeIncreaseAllowance} and\n     * {safeDecreaseAllowance} instead.\n     */\n    function safeApprove(IERC20 token, address spender, uint256 value) internal {\n        // safeApprove should only be called when setting an initial allowance,\n        // or when resetting it to zero. To increase and decrease it, use\n        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n        require(\n            (value == 0) || (token.allowance(address(this), spender) == 0),\n            \"SafeERC20: approve from non-zero to non-zero allowance\"\n        );\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n    }\n\n    /**\n     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     */\n    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n        uint256 oldAllowance = token.allowance(address(this), spender);\n        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\n    }\n\n    /**\n     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     */\n    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n        unchecked {\n            uint256 oldAllowance = token.allowance(address(this), spender);\n            require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\n        }\n    }\n\n    /**\n     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to\n     * 0 before setting it to a non-zero value.\n     */\n    function forceApprove(IERC20 token, address spender, uint256 value) internal {\n        bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\n\n        if (!_callOptionalReturnBool(token, approvalCall)) {\n            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\n            _callOptionalReturn(token, approvalCall);\n        }\n    }\n\n    /**\n     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\n     * Revert on invalid signature.\n     */\n    function safePermit(\n        IERC20Permit token,\n        address owner,\n        address spender,\n        uint256 value,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) internal {\n        uint256 nonceBefore = token.nonces(owner);\n        token.permit(owner, spender, value, deadline, v, r, s);\n        uint256 nonceAfter = token.nonces(owner);\n        require(nonceAfter == nonceBefore + 1, \"SafeERC20: permit did not succeed\");\n    }\n\n    /**\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\n     * @param token The token targeted by the call.\n     * @param data The call data (encoded using abi.encode or one of its variants).\n     */\n    function _callOptionalReturn(IERC20 token, bytes memory data) private {\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\n        // the target address contains contract code and also asserts for success in the low-level call.\n\n        bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n        require(returndata.length == 0 || abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n    }\n\n    /**\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\n     * @param token The token targeted by the call.\n     * @param data The call data (encoded using abi.encode or one of its variants).\n     *\n     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\n     */\n    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n        // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\n        // and not revert is the subcall reverts.\n\n        (bool success, bytes memory returndata) = address(token).call(data);\n        return\n            success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\n    }\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/interfaces/IERC20Minter.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\ninterface IERC20Minter {\n    struct RewardsSettings {\n        /// @notice Amount of the create referral reward\n        uint256 createReferralReward;\n        /// @notice Amount of the mint referral reward\n        uint256 mintReferralReward;\n        /// @notice Amount of the zora reward\n        uint256 zoraReward;\n        /// @notice Amount of the first minter reward\n        uint256 firstMinterReward;\n    }\n\n    struct SalesConfig {\n        /// @notice Unix timestamp for the sale start\n        uint64 saleStart;\n        /// @notice Unix timestamp for the sale end\n        uint64 saleEnd;\n        /// @notice Max tokens that can be minted for an address, 0 if unlimited\n        uint64 maxTokensPerAddress;\n        /// @notice Price per token in ERC20 currency\n        uint256 pricePerToken;\n        /// @notice Funds recipient (0 if no different funds recipient than the contract global)\n        address fundsRecipient;\n        /// @notice ERC20 Currency address\n        address currency;\n    }\n\n    /// @notice Rewards Deposit Event\n    /// @param createReferral Creator referral address\n    /// @param mintReferral Mint referral address\n    /// @param firstMinter First minter address\n    /// @param zora ZORA recipient address\n    /// @param collection The collection address of the token\n    /// @param currency Currency used for the deposit\n    /// @param tokenId Token ID\n    /// @param createReferralReward Creator referral reward\n    /// @param mintReferralReward Mint referral amount\n    /// @param firstMinterReward First minter amount\n    /// @param zoraReward ZORA amount\n    event ERC20RewardsDeposit(\n        address indexed createReferral,\n        address indexed mintReferral,\n        address indexed firstMinter,\n        address zora,\n        address collection,\n        address currency,\n        uint256 tokenId,\n        uint256 createReferralReward,\n        uint256 mintReferralReward,\n        uint256 firstMinterReward,\n        uint256 zoraReward\n    );\n\n    /// @notice ERC20MinterInitialized Event\n    /// @param rewardPercentage The reward percentage\n    event ERC20MinterInitialized(uint256 rewardPercentage);\n\n    /// @notice MintComment Event\n    /// @param sender The sender of the comment\n    /// @param tokenContract The token contract address\n    /// @param tokenId The token ID\n    /// @param quantity The quantity of tokens minted\n    /// @param comment The comment\n    event MintComment(address indexed sender, address indexed tokenContract, uint256 indexed tokenId, uint256 quantity, string comment);\n\n    /// @notice SaleSet Event\n    /// @param mediaContract The media contract address\n    /// @param tokenId The token ID\n    /// @param salesConfig The sales configuration\n    event SaleSet(address indexed mediaContract, uint256 indexed tokenId, SalesConfig salesConfig);\n\n    /// @notice ZoraRewardsRecipientSet Event\n    /// @param prevRecipient The previous recipient address\n    /// @param newRecipient The new recipient address\n    event ZoraRewardsRecipientSet(address indexed prevRecipient, address indexed newRecipient);\n\n    /// @notice Cannot set address to zero\n    error AddressZero();\n\n    /// @notice Cannot set currency address to zero\n    error InvalidCurrency();\n\n    /// @notice Price per ERC20 token is too low\n    error PricePerTokenTooLow();\n\n    /// @notice requestMint() is not used in ERC20 minter, use mint() instead\n    error RequestMintInvalidUseMint();\n\n    /// @notice Sale has already ended\n    error SaleEnded();\n\n    /// @notice Sale has not started yet\n    error SaleHasNotStarted();\n\n    /// @notice Value sent is incorrect\n    error WrongValueSent();\n\n    /// @notice ERC20 transfer slippage\n    error ERC20TransferSlippage();\n\n    /// @notice ERC20Minter is already initialized\n    error AlreadyInitialized();\n\n    /// @notice Only the Zora rewards recipient can call this function\n    error OnlyZoraRewardsRecipient();\n\n    /// @notice Mints a token using an ERC20 currency, note the total value must have been approved prior to calling this function\n    /// @param mintTo The address to mint the token to\n    /// @param quantity The quantity of tokens to mint\n    /// @param tokenAddress The address of the token to mint\n    /// @param tokenId The ID of the token to mint\n    /// @param totalValue The total value of the mint\n    /// @param currency The address of the currency to use for the mint\n    /// @param mintReferral The address of the mint referral\n    /// @param comment The optional mint comment\n    function mint(\n        address mintTo,\n        uint256 quantity,\n        address tokenAddress,\n        uint256 tokenId,\n        uint256 totalValue,\n        address currency,\n        address mintReferral,\n        string calldata comment\n    ) external;\n\n    /// @notice Sets the sale config for a given token\n    function setSale(uint256 tokenId, SalesConfig memory salesConfig) external;\n\n    /// @notice Returns the sale config for a given token\n    function sale(address tokenContract, uint256 tokenId) external view returns (SalesConfig memory);\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/minters/erc20/ERC20MinterRewards.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\n/// @notice ERC20Minter Helper contract template\nabstract contract ERC20MinterRewards {\n    uint256 internal constant MIN_PRICE_PER_TOKEN = 10_000;\n    uint256 internal constant TOTAL_REWARD_PCT = 5; // 5%\n    uint256 internal constant BPS_TO_PERCENT_2_DECIMAL_PERCISION = 100;\n    uint256 internal constant BPS_TO_PERCENT_8_DECIMAL_PERCISION = 100_000_000;\n    uint256 internal constant CREATE_REFERRAL_PAID_MINT_REWARD_PCT = 28_571400; // 28.5714%, roughly 0.000222 ETH at a 0.000777 value\n    uint256 internal constant MINT_REFERRAL_PAID_MINT_REWARD_PCT = 28_571400; // 28.5714%, roughly 0.000222 ETH at a 0.000777 value\n    uint256 internal constant ZORA_PAID_MINT_REWARD_PCT = 28_571400; // 28.5714%, roughly 0.000222 ETH at a 0.000777 value\n    uint256 internal constant FIRST_MINTER_REWARD_PCT = 14_228500; // 14.2285%, roughly 0.000111 ETH at a 0.000777 value\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/minters/erc20/IZora1155.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\n/// @notice The set of public functions on a Zora 1155 contract that are called by the ERC20 minter contract\ninterface IZora1155 {\n    function createReferrals(uint256 tokenId) external view returns (address);\n\n    function firstMinters(uint256 tokenId) external view returns (address);\n\n    function getCreatorRewardRecipient(uint256 tokenId) external view returns (address);\n\n    function adminMint(address recipient, uint256 tokenId, uint256 quantity, bytes memory data) external;\n}\n"
      },
      "node_modules/@zoralabs/openzeppelin-contracts-upgradeable/contracts/utils/math/SignedMathUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMathUpgradeable {\n    /**\n     * @dev Returns the largest of two signed numbers.\n     */\n    function max(int256 a, int256 b) internal pure returns (int256) {\n        return a > b ? a : b;\n    }\n\n    /**\n     * @dev Returns the smallest of two signed numbers.\n     */\n    function min(int256 a, int256 b) internal pure returns (int256) {\n        return a < b ? a : b;\n    }\n\n    /**\n     * @dev Returns the average of two signed numbers without overflow.\n     * The result is rounded towards zero.\n     */\n    function average(int256 a, int256 b) internal pure returns (int256) {\n        // Formula from the book \"Hacker's Delight\"\n        int256 x = (a & b) + ((a ^ b) >> 1);\n        return x + (int256(uint256(x) >> 255) & (a ^ b));\n    }\n\n    /**\n     * @dev Returns the absolute unsigned value of a signed value.\n     */\n    function abs(int256 n) internal pure returns (uint256) {\n        unchecked {\n            // must be unchecked in order to support `n = type(int256).min`\n            return uint256(n >= 0 ? n : -n);\n        }\n    }\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/interfaces/IContractMetadata.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\ninterface IHasContractName {\n    /// @notice Contract name returns the pretty contract name\n    function contractName() external returns (string memory);\n}\n\ninterface IContractMetadata is IHasContractName {\n    /// @notice Contract URI returns the uri for more information about the given contract\n    function contractURI() external returns (string memory);\n}\n"
      },
      "node_modules/@zoralabs/zora-1155-contracts/src/interfaces/ILimitedMintPerAddress.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.17;\n\nimport {IERC165Upgradeable} from \"@zoralabs/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC165Upgradeable.sol\";\nimport {ILimitedMintPerAddressErrors} from \"@zoralabs/shared-contracts/interfaces/errors/IZoraCreator1155Errors.sol\";\n\ninterface ILimitedMintPerAddress is IERC165Upgradeable, ILimitedMintPerAddressErrors {\n    function getMintedPerWallet(address token, uint256 tokenId, address wallet) external view returns (uint256);\n}\n"
      },
      "node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface IERC20Permit {\n    /**\n     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n     * given ``owner``'s signed approval.\n     *\n     * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n     * ordering also apply here.\n     *\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     * - `deadline` must be a timestamp in the future.\n     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n     * over the EIP712-formatted function arguments.\n     * - the signature must use ``owner``'s current nonce (see {nonces}).\n     *\n     * For more information on the signature format, see the\n     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n     * section].\n     */\n    function permit(\n        address owner,\n        address spender,\n        uint256 value,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) external;\n\n    /**\n     * @dev Returns the current nonce for `owner`. This value must be\n     * included whenever a signature is generated for {permit}.\n     *\n     * Every successful call to {permit} increases ``owner``'s nonce by one. This\n     * prevents a signature from being used multiple times.\n     */\n    function nonces(address owner) external view returns (uint256);\n\n    /**\n     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n     */\n    // solhint-disable-next-line func-name-mixedcase\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n"
      }
    },
    "settings": {
      "remappings": [
        "ds-test/=node_modules/ds-test/src/",
        "forge-std/=node_modules/forge-std/src/",
        "@zoralabs/openzeppelin-contracts-upgradeable/=node_modules/@zoralabs/openzeppelin-contracts-upgradeable/",
        "@zoralabs/protocol-rewards/src/=node_modules/@zoralabs/protocol-rewards/src/",
        "@zoralabs/zora-1155-contracts/src/=node_modules/@zoralabs/zora-1155-contracts/src/",
        "@zoralabs/mints-contracts/src/=node_modules/@zoralabs/mints-contracts/src/",
        "@zoralabs/shared-contracts/=node_modules/@zoralabs/shared-contracts/src/",
        "@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/",
        "_imagine/=node_modules/@zoralabs/zora-1155-contracts/_imagine/",
        "solemate/=/node_modules/solemate/src/",
        "solady/=node_modules/solady/src/",
        "solmate/=node_modules/solmate/"
      ],
      "optimizer": {
        "enabled": true,
        "runs": 50
      },
      "metadata": {
        "useLiteralContent": false,
        "bytecodeHash": "ipfs"
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "evmVersion": "london",
      "viaIR": true,
      "libraries": {
        "node_modules/@zoralabs/zora-1155-contracts/src/delegation/ZoraCreator1155Attribution.sol": {
          "DelegatedTokenCreation": "0x91509707F397e357DCe975399Fc98bB58081Ad63"
        }
      }
    }
  }}