476c8a5f27
Signed-off-by: AlienTornadosaurusHex <>
32 lines
760 B
JavaScript
Executable File
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"));
|