require("dotenv").config(); const hre = require("hardhat"); const config = require("../config"); function timeout(seconds) { return new Promise((resolve) => setTimeout(resolve, seconds * 1000)); } async function deploy() { const factory = await hre.ethers.getContractFactory( "src/v2/InstanceRegistry.sol:InstanceRegistry" ); const deployed = await factory.deploy(config.governanceProxyAddress); const depaddr = await deployed.getAddress(); console.log("InstanceRegistry deployed @ " + depaddr + "\n"); console.log("\nWaiting 50 seconds.\n"); await timeout(50); await hre.run("verify:verify", { address: depaddr, constructorArguments: [config.governanceProxyAddress], }); } deploy().then(() => console.log("\nScript finished.\n"));