38 lines
1.5 KiB
JavaScript
38 lines
1.5 KiB
JavaScript
// We require the Hardhat Runtime Environment explicitly here. This is optional
|
|
// but useful for running the script in a standalone fashion through `node <script>`.
|
|
//
|
|
// You can also run a script with `npx hardhat run <script>`. If you do that, Hardhat
|
|
// will compile your contracts, add the Hardhat Runtime Environment's members to the
|
|
// global scope, and execute the script.
|
|
const hre = require("hardhat");
|
|
const { ethers } = require("hardhat");
|
|
|
|
async function main() {
|
|
const airdropFactory = await ethers.getContractFactory("SablierAirdrop");
|
|
const airdrop = await airdropFactory.deploy();
|
|
const airdropAddr = await airdrop.getAddress();
|
|
let tx = airdrop.deploymentTransaction();
|
|
await tx.wait(16);
|
|
console.log("Aidrop deployment confirmed with 16 blocks, waiting for verification on Etherscan");
|
|
await hre.run("verify:verify", {
|
|
address: governanceImplAddr,
|
|
contract: "contracts/Airdrop.sol:SablierAirdrop",
|
|
constructorArguments: [stakingAddr, gasCompensationAddr, userVaultAddr],
|
|
});
|
|
|
|
const proposalFactory = await ethers.getContractFactory("Proposal");
|
|
const proposal = await proposalFactory.deploy(airdropAddr);
|
|
const deployedProposalAddr = await proposal.getAddress();
|
|
|
|
await hre.run("verify:verify", {
|
|
address: "0xc4217881856cA15c320B32A87F9ab3Ed17a5A9d0",
|
|
contract: "contracts/Proposal.sol:Proposal",
|
|
});
|
|
}
|
|
|
|
// We recommend this pattern to be able to use async/await everywhere
|
|
// and properly handle errors.
|
|
main().catch((error) => {
|
|
console.error(error);
|
|
process.exitCode = 1;
|
|
}); |