import { MockE3Program__factory as MockE3ProgramFactory, } from "../../types";
import { getDeploymentChain, storeDeploymentArgs } from "../utils";
export const deployAndSaveMockProgram = async ({ hre, }) => {
    const { ethers } = await hre.network.connect();
    const [signer] = await ethers.getSigners();
    const chain = getDeploymentChain(hre);
    const e3ProgramFactory = await ethers.getContractFactory("MockE3Program");
    const e3Program = await e3ProgramFactory.deploy();
    await e3Program.waitForDeployment();
    const e3ProgramAddress = await e3Program.getAddress();
    const blockNumber = await ethers.provider.getBlockNumber();
    storeDeploymentArgs({
        blockNumber,
        address: e3ProgramAddress,
    }, "MockE3Program", chain);
    const mockProgramContract = MockE3ProgramFactory.connect(e3ProgramAddress, signer);
    return { e3Program: mockProgramContract };
};
