infrastructure-upgrade/script/DeployRouter.js
AlienTornadosaurusHex 476c8a5f27 FeeOracleManager not deploying still
Signed-off-by: AlienTornadosaurusHex <>
2023-06-29 21:00:47 +00:00

32 lines
760 B
JavaScript
Executable File

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/TornadoRouter.sol:TornadoRouter"
);
const deployed = await factory.deploy(config.governanceProxyAddress);
const depaddr = await deployed.getAddress();
console.log("\nRouter 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"));