creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "@openzeppelin/contracts/proxy/Proxy.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n    /**\n     * @dev Delegates the current call to `implementation`.\n     *\n     * This function does not return to its internal call site, it will return directly to the external caller.\n     */\n    function _delegate(address implementation) internal virtual {\n        assembly {\n            // Copy msg.data. We take full control of memory in this inline assembly\n            // block because it will not return to Solidity code. We overwrite the\n            // Solidity scratch pad at memory position 0.\n            calldatacopy(0, 0, calldatasize())\n\n            // Call the implementation.\n            // out and outsize are 0 because we don't know the size yet.\n            let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n            // Copy the returned data.\n            returndatacopy(0, 0, returndatasize())\n\n            switch result\n            // delegatecall returns 0 on error.\n            case 0 {\n                revert(0, returndatasize())\n            }\n            default {\n                return(0, returndatasize())\n            }\n        }\n    }\n\n    /**\n     * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\n     * and {_fallback} should delegate.\n     */\n    function _implementation() internal view virtual returns (address);\n\n    /**\n     * @dev Delegates the current call to the address returned by `_implementation()`.\n     *\n     * This function does not return to its internal call site, it will return directly to the external caller.\n     */\n    function _fallback() internal virtual {\n        _beforeFallback();\n        _delegate(_implementation());\n    }\n\n    /**\n     * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n     * function in the contract matches the call data.\n     */\n    fallback() external payable virtual {\n        _fallback();\n    }\n\n    /**\n     * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n     * is empty.\n     */\n    receive() external payable virtual {\n        _fallback();\n    }\n\n    /**\n     * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n     * call, or as part of the Solidity `fallback` or `receive` functions.\n     *\n     * If overridden should call `super._beforeFallback()`.\n     */\n    function _beforeFallback() internal virtual {}\n}\n"
      },
      "@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"
      },
      "@openzeppelin/contracts/utils/StorageSlot.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.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 StorageSlot {\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"
      },
      "contracts/auction/interfaces/IAuctionManager.sol": {
        "content": "// SPDX-License-Identifier: Unlicensed\npragma solidity 0.8.10;\n\nimport { IMinimalForwarder } from \"./IMinimalForwarder.sol\";\n\n/**\n * @title Interface for AuctionManager\n * @notice Defines behaviour encapsulated in AuctionManager\n * @author highlight.xyz\n */\ninterface IAuctionManager {\n    /**\n     * @notice The state an auction is in\n     * @param NON_EXISTENT Default state of auction pre-creation\n     * @param LIVE_ON_CHAIN State of auction after creation but before the auction ends or is cancelled\n     * @param CANCELLED_ON_CHAIN State of auction after auction is cancelled\n     * @param FULFILLED State of auction after winning bid has been dispersed and NFT has left escrow\n     */\n    enum AuctionState {\n        NON_EXISTENT,\n        LIVE_ON_CHAIN,\n        CANCELLED_ON_CHAIN,\n        FULFILLED\n    }\n\n    /**\n     * @notice The data structure containing all fields on an English Auction that need to be on-chain\n     * @param collection The collection hosting the auctioned NFT\n     * @param currency The currency bids must be made in\n     * @param owner The auction owner\n     * @param paymentRecipient The recipient account of the winning bid\n     * @param endTime When the auction will tentatively end. Is 0 if first bid hasn't been made\n     * @param tokenId The ID of the NFT being auctioned\n     * @param mintWhenReserveMet If true, new NFT will be minted when reserve crossing bid is made\n     * @param state Auction state\n     */\n    struct EnglishAuction {\n        address collection;\n        address currency;\n        address owner;\n        address payable paymentRecipient;\n        uint256 endTime;\n        uint256 tokenId; // if nft already exists\n        bool mintWhenReserveMet;\n        AuctionState state;\n    }\n\n    /**\n     * @notice Used for information about auctions on editions\n     * @param used True if the auction is for an auction on an edition\n     * @param editionId ID of the edition used for this auction\n     */\n    struct EditionAuction {\n        bool used;\n        uint256 editionId;\n    }\n\n    /**\n     * @notice Data required for a bidder to make a bid. Claims are signed, hashed and validated, acting as bid keys\n     * @param auctionId ID of auction\n     * @param bidPrice Price that bidder is bidding\n     * @param reservePrice Price that bidder must bid greater than. Only relevant for the first bid on an auction\n     * @param maxClaimsPerAccount Max bids that an account can make on an auction. Unlimited if 0\n     * @param claimExpiryTimestamp Time when claim expires\n     * @param buffer Minimum time that must be left in an auction after a bid is made\n     * @param minimumIncrementPerBidPctBPS Minimum % that a bid must be higher than the previous highest bid by,\n     *                                     in basis points\n     * @param claimer Account that can use the claim\n     */\n    struct Claim {\n        bytes32 auctionId;\n        uint256 bidPrice;\n        uint256 reservePrice;\n        uint256 maxClaimsPerAccount;\n        uint256 claimExpiryTimestamp;\n        uint256 buffer;\n        uint256 minimumIncrementPerBidPctBPS;\n        address payable claimer;\n    }\n\n    /**\n     * @notice Structure hosting highest bidder info\n     * @param bidder Bidder with current highest bid\n     * @param preferredNFTRecipient The account that the current highest bidder wants the NFT to go to if they win.\n     *                              Useful for non-transferable NFTs being auctioned.\n     * @param amount Amount of current highest bid\n     */\n    struct HighestBidderData {\n        address payable bidder;\n        address preferredNFTRecipient;\n        uint256 amount;\n    }\n\n    /**\n     * @notice Emitted when an english auction is created\n     * @param auctionId ID of auction\n     * @param owner Auction owner\n     * @param collection Collection that NFT being auctioned is on\n     * @param tokenId ID of NFT being auctioned\n     * @param currency The currency bids must be made in\n     * @param paymentRecipient The recipient account of the winning bid\n     * @param endTime Auction end time\n     */\n    event EnglishAuctionCreated(\n        bytes32 indexed auctionId,\n        address indexed owner,\n        address indexed collection,\n        uint256 tokenId,\n        address currency,\n        address paymentRecipient,\n        uint256 endTime\n    );\n\n    /**\n     * @notice Emitted when a valid bid is made on an auction\n     * @param auctionId ID of auction\n     * @param bidder Bidder with new highest bid\n     * @param firstBid True if this is the first bid, ie. first bid greater than reserve price\n     * @param collection Collection that NFT being auctioned is on\n     * @param tokenId ID of NFT being auctioned\n     * @param value Value of bid\n     * @param timeLengthened True if this bid extended the end time of the auction (by being bid >= endTime - buffer)\n     * @param preferredNFTRecipient The account that the current highest bidder wants the NFT to go to if they win.\n     *                              Useful for non-transferable NFTs being auctioned.\n     * @param endTime The current end time of the auction\n     */\n    event Bid(\n        bytes32 indexed auctionId,\n        address indexed bidder,\n        bool indexed firstBid,\n        address collection,\n        uint256 tokenId,\n        uint256 value,\n        bool timeLengthened,\n        address preferredNFTRecipient,\n        uint256 endTime\n    );\n\n    /**\n     * @notice Emitted when an auction's end time is extended\n     * @param auctionId ID of auction\n     * @param tokenId ID of NFT being auctioned\n     * @param collection Collection that NFT being auctioned is on\n     * @param buffer Minimum time that must be left in an auction after a bid is made\n     * @param newEndTime New end time of auction\n     */\n    event TimeLengthened(\n        bytes32 indexed auctionId,\n        uint256 indexed tokenId,\n        address indexed collection,\n        uint256 buffer,\n        uint256 newEndTime\n    );\n\n    /**\n     * @notice Emitted when an auction is won, and its terms are fulfilled\n     * @param auctionId ID of auction\n     * @param tokenId ID of NFT being auctioned\n     * @param collection Collection that NFT being auctioned is on\n     * @param owner Auction owner\n     * @param winner Winning bidder\n     * @param paymentRecipient The recipient account of the winning bid\n     * @param nftRecipient The account receiving the auctioned NFT\n     * @param currency The currency bids were made in\n     * @param amount Winning bid value\n     * @param paymentRecipientPctBPS The percentage of the winning bid going to the paymentRecipient, in basis points\n     */\n    event AuctionWon(\n        bytes32 indexed auctionId,\n        uint256 indexed tokenId,\n        address indexed collection,\n        address owner,\n        address winner,\n        address paymentRecipient,\n        address nftRecipient,\n        address currency,\n        uint256 amount,\n        uint256 paymentRecipientPctBPS\n    );\n\n    /**\n     * @notice Emitted when an auction is cancelled on-chain (before any valid bids have been made).\n     * @param auctionId ID of auction\n     * @param owner Auction owner\n     * @param collection Collection that NFT was being auctioned on\n     * @param tokenId ID of NFT that was being auctioned\n     */\n    event AuctionCanceledOnChain(\n        bytes32 indexed auctionId,\n        address indexed owner,\n        address indexed collection,\n        uint256 tokenId\n    );\n\n    /**\n     * @notice Emitted when the payment recipient of an auction is updated\n     * @param auctionId ID of auction\n     * @param owner Auction owner\n     * @param newPaymentRecipient New payment recipient of auction\n     */\n    event PaymentRecipientUpdated(\n        bytes32 indexed auctionId,\n        address indexed owner,\n        address indexed newPaymentRecipient\n    );\n\n    /**\n     * @notice Emitted when the preferred NFT recipient of an auctionbid  is updated\n     * @param auctionId ID of auction\n     * @param owner Auction owner\n     * @param newPreferredNFTRecipient New preferred nft recipient of auction\n     */\n    event PreferredNFTRecipientUpdated(\n        bytes32 indexed auctionId,\n        address indexed owner,\n        address indexed newPreferredNFTRecipient\n    );\n\n    /**\n     * @notice Emitted when the end time of an auction is updated\n     * @param auctionId ID of auction\n     * @param owner Auction owner\n     * @param newEndTime New end time\n     */\n    event EndTimeUpdated(bytes32 indexed auctionId, address indexed owner, uint256 indexed newEndTime);\n\n    /**\n     * @notice Emitted when the platform is updated\n     * @param newPlatform New platform\n     */\n    event PlatformUpdated(address newPlatform);\n\n    /**\n     * @notice Create an auction that mints the NFT being auctioned into escrow (mints the next NFT on the collection)\n     * @param auctionId ID of auction\n     * @param auction The auction details\n     */\n    function createAuctionForNewToken(bytes32 auctionId, EnglishAuction memory auction) external;\n\n    /**\n     * @notice Create an auction that mints an edition being auctioned into escrow (mints the next NFT on the edition)\n     * @param auctionId ID of auction\n     * @param auction The auction details\n     */\n    function createAuctionForNewEdition(\n        bytes32 auctionId,\n        IAuctionManager.EnglishAuction memory auction,\n        uint256 editionId\n    ) external;\n\n    /**\n     * @notice Create an auction for an existing NFT\n     * @param auctionId ID of auction\n     * @param auction The auction details\n     */\n    function createAuctionForExistingToken(bytes32 auctionId, EnglishAuction memory auction) external;\n\n    /**\n     * @notice Create an auction for an existing NFT, with atomic transfer approval meta-tx packets\n     * @param auctionId ID of auction\n     * @param auction The auction details\n     * @param req The request containing the call to transfer the auctioned NFT into escrow\n     * @param requestSignature The signed request\n     */\n    function createAuctionForExistingTokenWithMetaTxPacket(\n        bytes32 auctionId,\n        IAuctionManager.EnglishAuction memory auction,\n        IMinimalForwarder.ForwardRequest calldata req,\n        bytes calldata requestSignature\n    ) external;\n\n    /**\n     * @notice Update the payment recipient for an auction\n     * @param auctionId ID of auction being updated\n     * @param newPaymentRecipient New payment recipient on the auction\n     */\n    function updatePaymentRecipient(bytes32 auctionId, address payable newPaymentRecipient) external;\n\n    /**\n     * @notice Update the preferred nft recipient of a bid\n     * @param auctionId ID of auction being updated\n     * @param newPreferredNFTRecipient New nft recipient on the auction bid\n     */\n    function updatePreferredNFTRecipient(bytes32 auctionId, address newPreferredNFTRecipient) external;\n\n    /**\n     * @notice Makes a bid on an auction\n     * @param claim Claim needed to make the bid\n     * @param claimSignature Claim signature to be unwrapped and validated\n     * @param preferredNftRecipient Bidder's preferred recipient of NFT if they win auction\n     */\n    function bid(\n        IAuctionManager.Claim calldata claim,\n        bytes calldata claimSignature,\n        address preferredNftRecipient\n    ) external payable;\n\n    /**\n     * @notice Fulfill auction and disperse winning bid / auctioned NFT.\n     * @dev Anyone can call this function\n     * @param auctionId ID of auction to fulfill\n     */\n    function fulfillAuction(bytes32 auctionId) external;\n\n    /**\n     * @notice \"Cancels\" an auction on-chain, if a valid bid hasn't been made yet. Transfers NFT back to auction owner\n     * @param auctionId ID of auction being \"cancelled\"\n     */\n    function cancelAuctionOnChain(bytes32 auctionId) external;\n\n    /**\n     * @notice Updates the platform account receiving a portion of winning bids\n     * @param newPlatform New account to receive portion\n     */\n    function updatePlatform(address payable newPlatform) external;\n\n    /**\n     * @notice Updates the platform cut\n     * @param newCutBPS New account to receive portion\n     */\n    function updatePlatformCut(uint256 newCutBPS) external;\n\n    /**\n     * @notice Update an auction's end time before first valid bid is made on auction\n     * @param auctionId Auction ID\n     * @param newEndTime New end time\n     */\n    function updateEndTime(bytes32 auctionId, uint256 newEndTime) external;\n\n    /**\n     * @notice Verifies the validity of a claim, simulating call to bid()\n     * @param claim Claim needed to make the bid\n     * @param claimSignature Claim signature to be unwrapped and validated\n     * @param expectedMsgSender Expected msg.sender when bid() is called, that is being simulated\n     */\n    function verifyClaim(\n        Claim calldata claim,\n        bytes calldata claimSignature,\n        address expectedMsgSender\n    ) external view returns (bool);\n\n    /**\n     * @notice Get all data about an auction except for number of bids made per user\n     * @param auctionId ID of auction\n     */\n    function getFullAuctionData(\n        bytes32 auctionId\n    ) external view returns (EnglishAuction memory, HighestBidderData memory, EditionAuction memory);\n\n    /**\n     * @notice Get all data about a set of auctions except for number of bids made per user\n     * @param auctionIds IDs of auctions\n     */\n    function getFullAuctionsData(\n        bytes32[] calldata auctionIds\n    ) external view returns (EnglishAuction[] memory, HighestBidderData[] memory, EditionAuction[] memory);\n}\n"
      },
      "contracts/auction/interfaces/IMinimalForwarder.sol": {
        "content": "// SPDX-License-Identifier: Unlicensed\npragma solidity 0.8.10;\n\n/**\n * @title Minimal forwarder interface\n * @author highlight.xyz\n */\ninterface IMinimalForwarder {\n    struct ForwardRequest {\n        address from;\n        address to;\n        uint256 value;\n        uint256 gas;\n        uint256 nonce;\n        bytes data;\n    }\n\n    function execute(\n        ForwardRequest calldata req,\n        bytes calldata signature\n    ) external payable returns (bool, bytes memory);\n\n    function getNonce(address from) external view returns (uint256);\n\n    function verify(ForwardRequest calldata req, bytes calldata signature) external view returns (bool);\n}\n"
      },
      "contracts/erc721/instances/MultipleEditionsDFS.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.10;\n\nimport \"../../auction/interfaces/IAuctionManager.sol\";\nimport \"../../royaltyManager/interfaces/IRoyaltyManager.sol\";\nimport \"../../mint/interfaces/IAbridgedMintVector.sol\";\nimport \"@openzeppelin/contracts/proxy/Proxy.sol\";\nimport \"@openzeppelin/contracts/utils/Address.sol\";\nimport \"@openzeppelin/contracts/utils/StorageSlot.sol\";\n\n/**\n * @notice Instance of MultipleEditionsDFS contract (multiple fixed size editions)\n * @dev Uses Decentralized File Storage\n * @author highlight.xyz\n */\ncontract MultipleEditionsDFS is Proxy {\n    /**\n     * @notice Initialize MultipleEditions instance with first edition, and potentially auction\n     * @param implementation_ ERC721Editions implementation\n     * @param initializeData Data to initialize instance\n     * @ param creator Creator/owner of contract\n     * @ param _contractURI Contract metadata\n     * @ param _name Name of token edition\n     * @ param _symbol Symbol of the token edition\n     * @ param trustedForwarder Trusted minimal forwarder\n     * @ param initialMinters Initial minters to register\n     * @ param useMarketplaceFiltererRegistry Denotes whether to use marketplace filterer registry\n     * @ param _observability Observability contract address\n     * @param _editionUri Edition uri (metadata)\n     * @param editionSize Edition size\n     * @param _editionTokenManager Edition's token manager\n     * @param editionRoyalty Edition's royalty\n     * @param auctionData Data to create auction\n     * @ param auctionManagerAddress AuctionManager address. Auction not created if this is the null address\n     * @ param auctionId Auction ID\n     * @ param auctionCurrency Auction currency\n     * @ param auctionPaymentRecipient Auction payment recipient\n     * @ param auctionEndTime Auction end time\n     * @param mintVectorData Mint vector data\n     * @ param mintManager\n     * @ param paymentRecipient\n     * @ param startTimestamp\n     * @ param endTimestamp\n     * @ param pricePerToken\n     * @ param tokenLimitPerTx\n     * @ param maxTotalClaimableViaVector\n     * @ param maxUserClaimableViaVector\n     * @ param allowlistRoot\n     * @param mechanicVectorData Mechanic mint vector data\n     * @ param mechanicVectorId Global mechanic vector ID\n     * @ param mechanic Mechanic address\n     * @ param mintManager Mint manager address\n     * @ param vectorData Vector data\n     */\n    constructor(\n        address implementation_,\n        bytes memory initializeData,\n        string memory _editionUri,\n        uint256 editionSize,\n        address _editionTokenManager,\n        IRoyaltyManager.Royalty memory editionRoyalty,\n        bytes memory auctionData,\n        bytes memory mintVectorData,\n        bytes memory mechanicVectorData\n    ) {\n        assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\"eip1967.proxy.implementation\")) - 1));\n        StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = implementation_;\n        Address.functionDelegateCall(implementation_, abi.encodeWithSignature(\"initialize(bytes)\", initializeData));\n\n        // create edition\n        if (bytes(_editionUri).length > 0) {\n            if (mechanicVectorData.length > 0) {\n                Address.functionDelegateCall(\n                    implementation_,\n                    abi.encodeWithSignature(\n                        \"createEditionWithMechanicVector(string,uint256,address,(address,uint16),bytes)\",\n                        _editionUri,\n                        editionSize,\n                        _editionTokenManager,\n                        editionRoyalty,\n                        mechanicVectorData\n                    )\n                );\n            } else {\n                Address.functionDelegateCall(\n                    implementation_,\n                    abi.encodeWithSignature(\n                        \"createEdition(string,uint256,address,(address,uint16),bytes)\",\n                        _editionUri,\n                        editionSize,\n                        _editionTokenManager,\n                        editionRoyalty,\n                        mintVectorData\n                    )\n                );\n            }\n        }\n\n        if (auctionData.length > 0) {\n            // if creating auction for this edition, validate that edition size was 1\n            require(editionSize == 1, \"Invalid edition size for auction\");\n\n            (\n                address auctionManagerAddress,\n                bytes32 auctionId,\n                address auctionCurrency,\n                address payable auctionPaymentRecipient,\n                uint256 auctionEndTime\n            ) = abi.decode(auctionData, (address, bytes32, address, address, uint256));\n\n            // edition id guaranteed to be = 0\n            IAuctionManager(auctionManagerAddress).createAuctionForNewEdition(\n                auctionId,\n                IAuctionManager.EnglishAuction(\n                    address(this),\n                    auctionCurrency,\n                    msg.sender,\n                    auctionPaymentRecipient,\n                    auctionEndTime,\n                    0,\n                    true,\n                    IAuctionManager.AuctionState.LIVE_ON_CHAIN\n                ),\n                0\n            );\n        }\n    }\n\n    /**\n     * @notice Return the contract type\n     */\n    function standard() external pure returns (string memory) {\n        return \"MultipleEditionsDFS2\";\n    }\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 Returns the current implementation address.\n     */\n    function implementation() public view returns (address) {\n        return _implementation();\n    }\n\n    function _implementation() internal view override returns (address) {\n        return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n    }\n}\n"
      },
      "contracts/mint/interfaces/IAbridgedMintVector.sol": {
        "content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.8.10;\n\n/**\n * @title MintManager interface for onchain abridged mint vectors\n * @author highlight.xyz\n */\ninterface IAbridgedMintVector {\n    /**\n     * @notice On-chain mint vector (stored data)\n     * @param contractAddress NFT smart contract address\n     * @param startTimestamp When minting opens on vector\n     * @param endTimestamp When minting ends on vector\n     * @param paymentRecipient Payment recipient\n     * @param maxTotalClaimableViaVector Max number of tokens that can be minted via vector\n     * @param totalClaimedViaVector Total number of tokens minted via vector\n     * @param currency Currency used for payment. Native gas token, if zero address\n     * @param tokenLimitPerTx Max number of tokens that can be minted in one transaction\n     * @param maxUserClaimableViaVector Max number of tokens that can be minted by user via vector\n     * @param pricePerToken Price that has to be paid per minted token\n     * @param editionId Edition ID, if vector is for edition based collection\n     * @param editionBasedCollection If vector is for an edition based collection\n     * @param requireDirectEOA Require minters to directly be EOAs\n     * @param allowlistRoot Root of merkle tree with allowlist\n     */\n    struct AbridgedVectorData {\n        uint160 contractAddress;\n        uint48 startTimestamp;\n        uint48 endTimestamp;\n        uint160 paymentRecipient;\n        uint48 maxTotalClaimableViaVector;\n        uint48 totalClaimedViaVector;\n        uint160 currency;\n        uint48 tokenLimitPerTx;\n        uint48 maxUserClaimableViaVector;\n        uint192 pricePerToken;\n        uint48 editionId;\n        bool editionBasedCollection;\n        bool requireDirectEOA;\n        bytes32 allowlistRoot;\n    }\n\n    /**\n     * @notice On-chain mint vector (public) - See {AbridgedVectorData}\n     */\n    struct AbridgedVector {\n        address contractAddress;\n        uint48 startTimestamp;\n        uint48 endTimestamp;\n        address paymentRecipient;\n        uint48 maxTotalClaimableViaVector;\n        uint48 totalClaimedViaVector;\n        address currency;\n        uint48 tokenLimitPerTx;\n        uint48 maxUserClaimableViaVector;\n        uint192 pricePerToken;\n        uint48 editionId;\n        bool editionBasedCollection;\n        bool requireDirectEOA;\n        bytes32 allowlistRoot;\n    }\n\n    /**\n     * @notice Config defining what fields to update\n     * @param updateStartTimestamp If 1, update startTimestamp\n     * @param updateEndTimestamp If 1, update endTimestamp\n     * @param updatePaymentRecipient If 1, update paymentRecipient\n     * @param updateMaxTotalClaimableViaVector If 1, update maxTotalClaimableViaVector\n     * @param updateTokenLimitPerTx If 1, update tokenLimitPerTx\n     * @param updateMaxUserClaimableViaVector If 1, update maxUserClaimableViaVector\n     * @param updatePricePerToken If 1, update pricePerToken\n     * @param updateAllowlistRoot If 1, update allowlistRoot\n     * @param updateRequireDirectEOA If 1, update requireDirectEOA\n     * @param updateMetadata If 1, update MintVector metadata\n     */\n    struct UpdateAbridgedVectorConfig {\n        uint16 updateStartTimestamp;\n        uint16 updateEndTimestamp;\n        uint16 updatePaymentRecipient;\n        uint16 updateMaxTotalClaimableViaVector;\n        uint16 updateTokenLimitPerTx;\n        uint16 updateMaxUserClaimableViaVector;\n        uint8 updatePricePerToken;\n        uint8 updateAllowlistRoot;\n        uint8 updateRequireDirectEOA;\n        uint8 updateMetadata;\n    }\n\n    /**\n     * @notice Creates on-chain vector\n     * @param _vector Vector to create\n     */\n    function createAbridgedVector(AbridgedVectorData memory _vector) external;\n\n    /**\n     * @notice Updates on-chain vector\n     * @param vectorId ID of vector to update\n     * @param _newVector New vector details\n     * @param updateConfig Number encoding what fields to update\n     * @param pause Pause / unpause vector\n     * @param flexibleData Flexible data in vector metadata\n     */\n    function updateAbridgedVector(\n        uint256 vectorId,\n        AbridgedVector calldata _newVector,\n        UpdateAbridgedVectorConfig calldata updateConfig,\n        bool pause,\n        uint128 flexibleData\n    ) external;\n\n    /**\n     * @notice Deletes on-chain vector\n     * @param vectorId ID of abridged vector to delete\n     */\n    function deleteAbridgedVector(uint256 vectorId) external;\n\n    /**\n     * @notice Pauses or unpauses an on-chain mint vector\n     * @param vectorId ID of abridged vector to pause\n     * @param pause True to pause, False to unpause\n     * @param flexibleData Flexible data that can be interpreted differently\n     */\n    function setAbridgedVectorMetadata(uint256 vectorId, bool pause, uint128 flexibleData) external;\n\n    /**\n     * @notice Get on-chain abridged vector\n     * @param vectorId ID of abridged vector to get\n     */\n    function getAbridgedVector(uint256 vectorId) external view returns (AbridgedVector memory);\n\n    /**\n     * @notice Get on-chain abridged vector metadata\n     * @param vectorId ID of abridged vector to get\n     */\n    function getAbridgedVectorMetadata(uint256 vectorId) external view returns (bool, uint128);\n}\n"
      },
      "contracts/royaltyManager/interfaces/IRoyaltyManager.sol": {
        "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity 0.8.10;\n\n/**\n * @title IRoyaltyManager\n * @author highlight.xyz\n * @notice Enables interfacing with custom royalty managers that define conditions on setting royalties for\n *         NFT contracts\n */\ninterface IRoyaltyManager {\n    /**\n     * @notice Struct containing values required to adhere to ERC-2981\n     * @param recipientAddress Royalty recipient - can be EOA, royalty splitter contract, etc.\n     * @param royaltyPercentageBPS Royalty cut, in basis points\n     */\n    struct Royalty {\n        address recipientAddress;\n        uint16 royaltyPercentageBPS;\n    }\n\n    /**\n     * @notice Defines conditions around being able to swap royalty manager for another one\n     * @param newRoyaltyManager New royalty manager being swapped in\n     * @param sender msg sender\n     */\n    function canSwap(address newRoyaltyManager, address sender) external view returns (bool);\n\n    /**\n     * @notice Defines conditions around being able to remove current royalty manager\n     * @param sender msg sender\n     */\n    function canRemoveItself(address sender) external view returns (bool);\n\n    /**\n     * @notice Defines conditions around being able to set granular royalty (per token or per edition)\n     * @param id Edition / token ID whose royalty is being set\n     * @param royalty Royalty being set\n     * @param sender msg sender\n     */\n    function canSetGranularRoyalty(uint256 id, Royalty calldata royalty, address sender) external view returns (bool);\n\n    /**\n     * @notice Defines conditions around being able to set default royalty\n     * @param royalty Royalty being set\n     * @param sender msg sender\n     */\n    function canSetDefaultRoyalty(Royalty calldata royalty, address sender) external view returns (bool);\n}\n"
      }
    },
    "settings": {
      "metadata": {
        "bytecodeHash": "none"
      },
      "optimizer": {
        "enabled": true,
        "runs": 1
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "libraries": {}
    }
  }}