creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "src/BubbleMarketplace.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.20;\n\nimport {IBubbleNFT} from \"./interfaces/IBubbleNFT.sol\";\nimport {Pausable} from \"@openzeppelin/contracts/utils/Pausable.sol\";\nimport {VRFCoordinatorV2Interface} from \"@chainlink/contracts/v0.8/vrf/interfaces/VRFCoordinatorV2Interface.sol\"; \nimport {VRFConsumerBaseV2} from \"@chainlink/contracts/v0.8/vrf/VRFConsumerBaseV2.sol\";\n\n/**\n * @title BubbleMarketplace\n * @author Marco López\n * @notice BubbleMarketplace implementation for selling BubbleNFTs in a sequential cycle.\n */\ncontract BubbleMarketplace is Pausable, VRFConsumerBaseV2 {\n    // Chainlinnk VRF variables\n    uint16 private constant _REQUEST_CONFIRMATIONS = 3;\n    uint32 private constant _NUM_WORDS = 1;\n    VRFCoordinatorV2Interface private immutable _VRF_COORDINATOR;\n    bytes32 private immutable _GAS_LANE;\n    uint64 private immutable _SUBSCRIPTION_ID;\n    uint32 private immutable _CALLBACK_GAS_LIMIT; \n\n    // Number of NFTs in the collection\n    uint256 public constant NUM_NFTS = 10;\n    // Percentage of fees to be collected by the marketplace (10%)\n    uint256 public constant FEE_PERCENTAGE = 10;\n    // Percentage of price increase for the next NFT (10%)\n    uint256 public constant PRICE_INCREMENT_PERCENTAGE = 10;\n    // Number of NFTs sold between lottery calls\n    uint256 public constant LOTTERY_TRIGGER_INTERVAL = 5;\n    // Initial delay for the first lottery call\n    uint256 public constant INITIAL_LOTTERY_DELAY = 90 days;\n    // Delay for the second mandatory lottery call\n    uint256 public constant SECOND_LOTTERY_DELAY = 130 days;\n    // Delay for the third mandatory lottery call\n    uint256 public constant THIRD_LOTTERY_DELAY = 170 days;\n    // Maximum duration for the marketplace operation\n    uint256 public constant MAX_MARKETPLACE_OPERATION_DAYS = 210 days;\n    // Duration of the marketplace lock\n    uint256 public constant LOCK_DURATION = 481 days;\n    \n    // This address will receive the fees. Also, is the initial owner of the NFTs.\n    address payable public immutable ARTISTS;\n    // Bubble NFT contract\n    IBubbleNFT public immutable NFT_CONTRACT;   \n    // Timestamp of the deployment\n    uint256 public immutable DEPLOYMENT_TIMESTAMP;\n\n    // ID of the NFT currently on sale\n    uint256 public sellingNftId;\n    // Number of NFTs sold\n    uint256 public nftsSold;\n    // Price of the current NFT on sale\n    uint256 public currentPrice;\n    // Flag to check if the first mandatory lottery has been done\n    bool public firstMandatoryLotteryDone;\n    // Flag to check if the second mandatory lottery has been done\n    bool public secondMandatoryLotteryDone;\n    // Timestamp of the lock\n    uint256 public lockTimestamp;\n    // Balance of the owners\n    mapping(address => uint256) public balances;\n\n    // Emitted when an NFT is purchased\n    event NFTPurchased(address indexed buyer, uint256 indexed nftId, uint256 indexed price);\n    // Emitted when a lottery call is requested\n    event LotteryRequested(uint256 indexed requestId, uint256 indexed timestamp);\n    // Emitted when the marketplace is locked\n    event MarketplaceLocked(uint256 indexed timestamp);\n    // Emitted when the NFTs are released\n    event NFTsReleased(uint256 indexed timestamp);\n    // Emitted when the random number is received\n    event RandomWordsReceived(uint256 indexed randomWords);\n\n    /**\n     * @dev Constructor to set the NFT contract address, the fee recipient address and the Chainlink VRF variables.\n     * @param nftAddress Address of the NFT contract.\n     * @param feeRecipientAddress Address of the fee recipient.\n     * @param initialPrice Price for the first NFT.\n     * @param vrfCoordinator Address of the Chainlink VRF Coordinator.\n     * @param gasLane The gas lane for the VRF Coordinator.\n     * @param subscriptionId The subscription ID for the VRF Coordinator.\n     * @param callbackGasLimit The gas limit for the VRF Coordinator callback.\n     */\n    constructor(\n        address nftAddress, \n        address payable feeRecipientAddress, \n        uint256 initialPrice,\n        address vrfCoordinator,\n        bytes32 gasLane,\n        uint64 subscriptionId,\n        uint32 callbackGasLimit\n    ) VRFConsumerBaseV2(vrfCoordinator) {\n        _VRF_COORDINATOR = VRFCoordinatorV2Interface(vrfCoordinator);\n        _GAS_LANE = gasLane;\n        _SUBSCRIPTION_ID = subscriptionId;\n        _CALLBACK_GAS_LIMIT = callbackGasLimit;\n\n        NFT_CONTRACT = IBubbleNFT(nftAddress);\n        ARTISTS = feeRecipientAddress;\n        // Set the price for the first NFT\n        currentPrice = initialPrice;\n        DEPLOYMENT_TIMESTAMP = block.timestamp;\n    }\n\n    /**\n     * @dev Function to purchase the current NFT in the sequential cycle.\n     */\n    function purchase() external payable whenNotPaused {        \n        // Check if the buyer has sent enough funds to purchase the NFT and update the price\n        require(msg.value >= currentPrice, \"Insufficient funds to purchase NFT\");\n\n        // Calculate fees and owner value\n        uint256 fees = (currentPrice * (FEE_PERCENTAGE*10**18)) / 10**20;\n        uint256 ownerValue = currentPrice - fees;\n\n        // Update the price for the next NFT (10% increase)\n        currentPrice = currentPrice + (currentPrice * (PRICE_INCREMENT_PERCENTAGE*10**18)) / 10**20;\n\n        // Get the ID of the NFT to be sold and increment the counter\n        uint256 nftId = sellingNftId;\n        sellingNftId = (sellingNftId+1) % (NUM_NFTS);\n\n        // Increment the count of NFTs sold\n        nftsSold++;        \n\n        // Update the balance of the owner\n        address nftOwner = NFT_CONTRACT.ownerOf(nftId);\n        balances[nftOwner] += ownerValue;\n\n        // Transfer fees to the designated address (ARTISTS)\n        (bool success, ) = ARTISTS.call{value: fees}(\"\");\n        require(success, \"Failed to send Ether\");\n\n        // Transfer the NFT to the buyer\n        NFT_CONTRACT.approve(address(this), nftId); // The marketplace has privileges to make approvals and transfers during the regulated state\n        NFT_CONTRACT.transferFrom(nftOwner, msg.sender, nftId);\n\n        emit NFTPurchased(msg.sender, nftId, msg.value);\n\n        // Check if it's time for a lottery call to potentially lock the marketplace\n        if( (block.timestamp >= DEPLOYMENT_TIMESTAMP + INITIAL_LOTTERY_DELAY) && (nftsSold % LOTTERY_TRIGGER_INTERVAL == 0) ) {\n            _performLottery();\n        } \n    }\n\n    /** \n     * @dev Function to withdraw the balance of the owner.\n    */\n    function withdraw() external {\n        uint256 amount = balances[msg.sender];\n        require(amount > 0, \"Insufficient balance\");\n        balances[msg.sender] = 0;\n        (bool success, ) = msg.sender.call{value: amount}(\"\");\n        require(success, \"Failed to send Ether\");\n    }\n\n    /**\n     * @dev This function allows performing one lottery call to potentially lock the marketplace after the first mandatory lottery delay (130 days), another one after the second mandatory lottery delay (170 days) and eventually lock the marketplace after the maximum operation time has passed (210 days). \n     * @notice Can be called by anyone.\n     */\n    function tryLock() external whenNotPaused {\n        if(!firstMandatoryLotteryDone && block.timestamp >= DEPLOYMENT_TIMESTAMP + SECOND_LOTTERY_DELAY){\n            firstMandatoryLotteryDone = true;\n            _performLottery();\n        }else if(!secondMandatoryLotteryDone && block.timestamp >= DEPLOYMENT_TIMESTAMP + THIRD_LOTTERY_DELAY){\n            secondMandatoryLotteryDone = true;\n            _performLottery();\n        }else if(block.timestamp >= DEPLOYMENT_TIMESTAMP + MAX_MARKETPLACE_OPERATION_DAYS){\n            _pause();\n            lockTimestamp = block.timestamp;\n            emit MarketplaceLocked(lockTimestamp);\n        }else{\n            revert(\"Not the right time to lock the marketplace\");\n        }\n    }\n\n    /**\n     * @dev Function to release the NFTs after the lockDuration has passed.\n     * @notice Can be called by anyone.\n     */\n    function release() external whenPaused {\n        require(block.timestamp >= lockTimestamp + LOCK_DURATION, \"Lock duration not yet elapsed\");\n\n        // Release the restriction on the NFT contract\n        NFT_CONTRACT.releaseRestriction();\n        emit NFTsReleased(block.timestamp);\n    }\n\n    /**\n     * @dev Function to get the available balance of an account.\n     * @param account Address of the account.\n     */\n    function getBalance(address account) external view returns (uint256) {\n        return balances[account];\n    }\n\n    /**\n     * @dev Function to get the timestamp of the deployment. \n    */\n    function getDeploymentTimestamp() external view returns (uint256) {\n        return DEPLOYMENT_TIMESTAMP;\n    }\n\n    /**\n     * @dev Function to perform the lottery call and potentially lock the marketplace.\n     * @notice It performs a Chainlink VRF call to get a random number, which is returned in the fulfillRandomWords function called by the VRF Coordinator.\n     */\n    function _performLottery() internal {\n        uint256 requestId = _VRF_COORDINATOR.requestRandomWords(\n            _GAS_LANE, \n            _SUBSCRIPTION_ID,\n            _REQUEST_CONFIRMATIONS,\n            _CALLBACK_GAS_LIMIT,\n            _NUM_WORDS\n        );\n        \n        emit LotteryRequested(requestId, block.timestamp);\n    }\n\n    /**\n     * @dev This function is called by the VRF Coordinator to return the random number generated\n     * @notice This function pauses the marketplace with a probability of 10%. \n     * @param randomWords The random number returned by the VRF Coordinator.\n     */\n    function fulfillRandomWords(uint256 /*requestId*/, uint256[] memory randomWords) internal override {        \n        emit RandomWordsReceived(randomWords[0]);\n        if(randomWords[0] % 10 == 0){\n            _pause();\n            lockTimestamp = block.timestamp;\n            emit MarketplaceLocked(lockTimestamp);\n        }\n    }\n}"
      },
      "src/interfaces/IBubbleNFT.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.20;\n\n/**\n * @title IBubbleNFT\n * @author Marco López\n * @notice BubbleNFT interface of ERC-721 Non-Fungible Token with additional features.\n */\ninterface IBubbleNFT {\n    /**\n     * @dev Function to release the transfer restriction, can only be called by the marketplace.\n     */\n    function releaseRestriction() external;\n\n    /**\n     * @notice \n     */\n    function approve(address to, uint256 tokenId) external;\n\n    /**\n     * @notice \n     */\n    function setApprovalForAll(address operator, bool approved) external;\n\n    /**\n     * @notice \n     */\n    function transferFrom(address from, address to, uint256 tokenId) external;\n\n    /**\n     * @notice \n     */\n    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) external;\n    \n    /**\n     * @dev Returns the owner of the `tokenId` token.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function ownerOf(uint256 tokenId) external view returns (address owner);\n}"
      },
      "lib/openzeppelin-contracts/contracts/utils/Pausable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract Pausable is Context {\n    bool private _paused;\n\n    /**\n     * @dev Emitted when the pause is triggered by `account`.\n     */\n    event Paused(address account);\n\n    /**\n     * @dev Emitted when the pause is lifted by `account`.\n     */\n    event Unpaused(address account);\n\n    /**\n     * @dev The operation failed because the contract is paused.\n     */\n    error EnforcedPause();\n\n    /**\n     * @dev The operation failed because the contract is not paused.\n     */\n    error ExpectedPause();        \n\n\n    /**\n     * @dev Initializes the contract in unpaused state.\n     */\n    constructor() {\n        _paused = false;\n    }\n\n    /**\n     * @dev Modifier to make a function callable only when the contract is not paused.\n     *\n     * Requirements:\n     *\n     * - The contract must not be paused.\n     */\n    modifier whenNotPaused() {\n        _requireNotPaused();\n        _;\n    }\n\n    /**\n     * @dev Modifier to make a function callable only when the contract is paused.\n     *\n     * Requirements:\n     *\n     * - The contract must be paused.\n     */\n    modifier whenPaused() {\n        _requirePaused();\n        _;\n    }\n\n    /**\n     * @dev Returns true if the contract is paused, and false otherwise.\n     */\n    function paused() public view virtual returns (bool) {\n        return _paused;\n    }\n\n    /**\n     * @dev Throws if the contract is paused.\n     */\n    function _requireNotPaused() internal view virtual {\n        if (paused()) {\n            revert EnforcedPause();\n        }\n    }\n\n    /**\n     * @dev Throws if the contract is not paused.\n     */\n    function _requirePaused() internal view virtual {\n        if (!paused()) {\n            revert ExpectedPause();\n        }\n    }\n\n    /**\n     * @dev Triggers stopped state.\n     *\n     * Requirements:\n     *\n     * - The contract must not be paused.\n     */\n    function _pause() internal virtual whenNotPaused {\n        _paused = true;\n        emit Paused(_msgSender());\n    }\n\n    /**\n     * @dev Returns to normal state.\n     *\n     * Requirements:\n     *\n     * - The contract must be paused.\n     */\n    function _unpause() internal virtual whenPaused {\n        _paused = false;\n        emit Unpaused(_msgSender());\n    }\n}\n"
      },
      "lib/chainlink/contracts/src/v0.8/vrf/interfaces/VRFCoordinatorV2Interface.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface VRFCoordinatorV2Interface {\n  /**\n   * @notice Get configuration relevant for making requests\n   * @return minimumRequestConfirmations global min for request confirmations\n   * @return maxGasLimit global max for request gas limit\n   * @return s_provingKeyHashes list of registered key hashes\n   */\n  function getRequestConfig() external view returns (uint16, uint32, bytes32[] memory);\n\n  /**\n   * @notice Request a set of random words.\n   * @param keyHash - Corresponds to a particular oracle job which uses\n   * that key for generating the VRF proof. Different keyHash's have different gas price\n   * ceilings, so you can select a specific one to bound your maximum per request cost.\n   * @param subId  - The ID of the VRF subscription. Must be funded\n   * with the minimum subscription balance required for the selected keyHash.\n   * @param minimumRequestConfirmations - How many blocks you'd like the\n   * oracle to wait before responding to the request. See SECURITY CONSIDERATIONS\n   * for why you may want to request more. The acceptable range is\n   * [minimumRequestBlockConfirmations, 200].\n   * @param callbackGasLimit - How much gas you'd like to receive in your\n   * fulfillRandomWords callback. Note that gasleft() inside fulfillRandomWords\n   * may be slightly less than this amount because of gas used calling the function\n   * (argument decoding etc.), so you may need to request slightly more than you expect\n   * to have inside fulfillRandomWords. The acceptable range is\n   * [0, maxGasLimit]\n   * @param numWords - The number of uint256 random values you'd like to receive\n   * in your fulfillRandomWords callback. Note these numbers are expanded in a\n   * secure way by the VRFCoordinator from a single random value supplied by the oracle.\n   * @return requestId - A unique identifier of the request. Can be used to match\n   * a request to a response in fulfillRandomWords.\n   */\n  function requestRandomWords(\n    bytes32 keyHash,\n    uint64 subId,\n    uint16 minimumRequestConfirmations,\n    uint32 callbackGasLimit,\n    uint32 numWords\n  ) external returns (uint256 requestId);\n\n  /**\n   * @notice Create a VRF subscription.\n   * @return subId - A unique subscription id.\n   * @dev You can manage the consumer set dynamically with addConsumer/removeConsumer.\n   * @dev Note to fund the subscription, use transferAndCall. For example\n   * @dev  LINKTOKEN.transferAndCall(\n   * @dev    address(COORDINATOR),\n   * @dev    amount,\n   * @dev    abi.encode(subId));\n   */\n  function createSubscription() external returns (uint64 subId);\n\n  /**\n   * @notice Get a VRF subscription.\n   * @param subId - ID of the subscription\n   * @return balance - LINK balance of the subscription in juels.\n   * @return reqCount - number of requests for this subscription, determines fee tier.\n   * @return owner - owner of the subscription.\n   * @return consumers - list of consumer address which are able to use this subscription.\n   */\n  function getSubscription(\n    uint64 subId\n  ) external view returns (uint96 balance, uint64 reqCount, address owner, address[] memory consumers);\n\n  /**\n   * @notice Request subscription owner transfer.\n   * @param subId - ID of the subscription\n   * @param newOwner - proposed new owner of the subscription\n   */\n  function requestSubscriptionOwnerTransfer(uint64 subId, address newOwner) external;\n\n  /**\n   * @notice Request subscription owner transfer.\n   * @param subId - ID of the subscription\n   * @dev will revert if original owner of subId has\n   * not requested that msg.sender become the new owner.\n   */\n  function acceptSubscriptionOwnerTransfer(uint64 subId) external;\n\n  /**\n   * @notice Add a consumer to a VRF subscription.\n   * @param subId - ID of the subscription\n   * @param consumer - New consumer which can use the subscription\n   */\n  function addConsumer(uint64 subId, address consumer) external;\n\n  /**\n   * @notice Remove a consumer from a VRF subscription.\n   * @param subId - ID of the subscription\n   * @param consumer - Consumer to remove from the subscription\n   */\n  function removeConsumer(uint64 subId, address consumer) external;\n\n  /**\n   * @notice Cancel a subscription\n   * @param subId - ID of the subscription\n   * @param to - Where to send the remaining LINK to\n   */\n  function cancelSubscription(uint64 subId, address to) external;\n\n  /*\n   * @notice Check to see if there exists a request commitment consumers\n   * for all consumers and keyhashes for a given sub.\n   * @param subId - ID of the subscription\n   * @return true if there exists at least one unfulfilled request for the subscription, false\n   * otherwise.\n   */\n  function pendingRequestExists(uint64 subId) external view returns (bool);\n}\n"
      },
      "lib/chainlink/contracts/src/v0.8/vrf/VRFConsumerBaseV2.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/** ****************************************************************************\n * @notice Interface for contracts using VRF randomness\n * *****************************************************************************\n * @dev PURPOSE\n *\n * @dev Reggie the Random Oracle (not his real job) wants to provide randomness\n * @dev to Vera the verifier in such a way that Vera can be sure he's not\n * @dev making his output up to suit himself. Reggie provides Vera a public key\n * @dev to which he knows the secret key. Each time Vera provides a seed to\n * @dev Reggie, he gives back a value which is computed completely\n * @dev deterministically from the seed and the secret key.\n *\n * @dev Reggie provides a proof by which Vera can verify that the output was\n * @dev correctly computed once Reggie tells it to her, but without that proof,\n * @dev the output is indistinguishable to her from a uniform random sample\n * @dev from the output space.\n *\n * @dev The purpose of this contract is to make it easy for unrelated contracts\n * @dev to talk to Vera the verifier about the work Reggie is doing, to provide\n * @dev simple access to a verifiable source of randomness. It ensures 2 things:\n * @dev 1. The fulfillment came from the VRFCoordinator\n * @dev 2. The consumer contract implements fulfillRandomWords.\n * *****************************************************************************\n * @dev USAGE\n *\n * @dev Calling contracts must inherit from VRFConsumerBase, and can\n * @dev initialize VRFConsumerBase's attributes in their constructor as\n * @dev shown:\n *\n * @dev   contract VRFConsumer {\n * @dev     constructor(<other arguments>, address _vrfCoordinator, address _link)\n * @dev       VRFConsumerBase(_vrfCoordinator) public {\n * @dev         <initialization with other arguments goes here>\n * @dev       }\n * @dev   }\n *\n * @dev The oracle will have given you an ID for the VRF keypair they have\n * @dev committed to (let's call it keyHash). Create subscription, fund it\n * @dev and your consumer contract as a consumer of it (see VRFCoordinatorInterface\n * @dev subscription management functions).\n * @dev Call requestRandomWords(keyHash, subId, minimumRequestConfirmations,\n * @dev callbackGasLimit, numWords),\n * @dev see (VRFCoordinatorInterface for a description of the arguments).\n *\n * @dev Once the VRFCoordinator has received and validated the oracle's response\n * @dev to your request, it will call your contract's fulfillRandomWords method.\n *\n * @dev The randomness argument to fulfillRandomWords is a set of random words\n * @dev generated from your requestId and the blockHash of the request.\n *\n * @dev If your contract could have concurrent requests open, you can use the\n * @dev requestId returned from requestRandomWords to track which response is associated\n * @dev with which randomness request.\n * @dev See \"SECURITY CONSIDERATIONS\" for principles to keep in mind,\n * @dev if your contract could have multiple requests in flight simultaneously.\n *\n * @dev Colliding `requestId`s are cryptographically impossible as long as seeds\n * @dev differ.\n *\n * *****************************************************************************\n * @dev SECURITY CONSIDERATIONS\n *\n * @dev A method with the ability to call your fulfillRandomness method directly\n * @dev could spoof a VRF response with any random value, so it's critical that\n * @dev it cannot be directly called by anything other than this base contract\n * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method).\n *\n * @dev For your users to trust that your contract's random behavior is free\n * @dev from malicious interference, it's best if you can write it so that all\n * @dev behaviors implied by a VRF response are executed *during* your\n * @dev fulfillRandomness method. If your contract must store the response (or\n * @dev anything derived from it) and use it later, you must ensure that any\n * @dev user-significant behavior which depends on that stored value cannot be\n * @dev manipulated by a subsequent VRF request.\n *\n * @dev Similarly, both miners and the VRF oracle itself have some influence\n * @dev over the order in which VRF responses appear on the blockchain, so if\n * @dev your contract could have multiple VRF requests in flight simultaneously,\n * @dev you must ensure that the order in which the VRF responses arrive cannot\n * @dev be used to manipulate your contract's user-significant behavior.\n *\n * @dev Since the block hash of the block which contains the requestRandomness\n * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful\n * @dev miner could, in principle, fork the blockchain to evict the block\n * @dev containing the request, forcing the request to be included in a\n * @dev different block with a different hash, and therefore a different input\n * @dev to the VRF. However, such an attack would incur a substantial economic\n * @dev cost. This cost scales with the number of blocks the VRF oracle waits\n * @dev until it calls responds to a request. It is for this reason that\n * @dev that you can signal to an oracle you'd like them to wait longer before\n * @dev responding to the request (however this is not enforced in the contract\n * @dev and so remains effective only in the case of unmodified oracle software).\n */\nabstract contract VRFConsumerBaseV2 {\n  error OnlyCoordinatorCanFulfill(address have, address want);\n  // solhint-disable-next-line chainlink-solidity/prefix-immutable-variables-with-i\n  address private immutable vrfCoordinator;\n\n  /**\n   * @param _vrfCoordinator address of VRFCoordinator contract\n   */\n  constructor(address _vrfCoordinator) {\n    vrfCoordinator = _vrfCoordinator;\n  }\n\n  /**\n   * @notice fulfillRandomness handles the VRF response. Your contract must\n   * @notice implement it. See \"SECURITY CONSIDERATIONS\" above for important\n   * @notice principles to keep in mind when implementing your fulfillRandomness\n   * @notice method.\n   *\n   * @dev VRFConsumerBaseV2 expects its subcontracts to have a method with this\n   * @dev signature, and will call it once it has verified the proof\n   * @dev associated with the randomness. (It is triggered via a call to\n   * @dev rawFulfillRandomness, below.)\n   *\n   * @param requestId The Id initially returned by requestRandomness\n   * @param randomWords the VRF output expanded to the requested number of words\n   */\n  // solhint-disable-next-line chainlink-solidity/prefix-internal-functions-with-underscore\n  function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal virtual;\n\n  // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF\n  // proof. rawFulfillRandomness then calls fulfillRandomness, after validating\n  // the origin of the call\n  function rawFulfillRandomWords(uint256 requestId, uint256[] memory randomWords) external {\n    if (msg.sender != vrfCoordinator) {\n      revert OnlyCoordinatorCanFulfill(msg.sender, vrfCoordinator);\n    }\n    fulfillRandomWords(requestId, randomWords);\n  }\n}\n"
      },
      "lib/openzeppelin-contracts/contracts/utils/Context.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n\n    function _contextSuffixLength() internal view virtual returns (uint256) {\n        return 0;\n    }\n}\n"
      }
    },
    "settings": {
      "remappings": [
        "@forge-std/=lib/forge-std/src/",
        "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
        "@chainlink/contracts/=lib/chainlink/contracts/src/",
        "@solmate/=lib/solmate/src/",
        "@foundry-devops/=lib/foundry-devops/src/",
        "chainlink/=lib/chainlink/contracts/",
        "ds-test/=lib/forge-std/lib/ds-test/src/",
        "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
        "forge-std/=lib/forge-std/src/",
        "foundry-devops/=lib/foundry-devops/",
        "openzeppelin-contracts/=lib/openzeppelin-contracts/",
        "solmate/=lib/solmate/src/"
      ],
      "optimizer": {
        "enabled": true,
        "runs": 200
      },
      "metadata": {
        "useLiteralContent": false,
        "bytecodeHash": "ipfs",
        "appendCBOR": true
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "evmVersion": "paris",
      "libraries": {}
    }
  }}