proposal-25-restore-rewards/scripts/deployProposal.js

49 lines
1.1 KiB
JavaScript
Raw Normal View History

const hre = require("hardhat");
const config = require("../config");
const { ethers } = hre;
const sleep = (s) => new Promise((r) => setTimeout(r, s * 1000));
async function main() {
const factory_staking = await ethers.getContractFactory(
"TornadoStakingRewards"
);
const factory_proposal = await ethers.getContractFactory(
"RestoreRewardsProposal"
);
const staking = await factory_staking.deploy(
config.governanceProxy,
config.torn,
config.registryProxy
);
await sleep(20);
console.log(
"\nStaking contract impl successfully deployed @ " + staking.target + "\n"
);
await hre.run("verify:verify", {
address: staking.target,
constructorArguments: [
config.governanceProxy,
config.torn,
config.registryProxy,
],
});
const proposal = await factory_proposal.deploy(staking.target);
await sleep(20);
console.log(
"\nProposal 25 successfully deployed @ " + proposal.target + "\n"
);
await hre.run("verify:verify", {
address: proposal.target,
constructorArguments: [staking.target],
});
}
main().then((res) => console.log(res ?? "\nScript finished.\n"));