// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

import {Script, console} from "forge-std/Script.sol";
import {MockDVMFactory} from "../../contracts/dex/MockDVMFactory.sol";

/**
 * @title DeployMockDVMFactory
 * @notice Deploy mock DVM factory on Chain 138 so PMM integration can run when no official DODO DVM exists
 */
contract DeployMockDVMFactory is Script {
    function run() external {
        uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
        address deployer = vm.addr(deployerPrivateKey);

        vm.startBroadcast(deployerPrivateKey);
        MockDVMFactory factory = new MockDVMFactory();
        vm.stopBroadcast();

        console.log("MockDVMFactory deployed at:", address(factory));
        console.log("\nAdd to .env:");
        console.log("DODO_VENDING_MACHINE_ADDRESS=%s", address(factory));
        console.log("\nThen run: scripts/deployment/run-pmm-and-pools.sh");
    }
}
