-
Notifications
You must be signed in to change notification settings - Fork 42
/
deploy.ts
35 lines (27 loc) · 917 Bytes
/
deploy.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import hre from "hardhat";
// Colour codes for terminal prints
const RESET = "\x1b[0m";
const GREEN = "\x1b[32m";
function delay(ms: number) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
async function main() {
const create2Deployer = await hre.ethers.deployContract("Create2Deployer");
await create2Deployer.waitForDeployment();
const create2DeployerAddress = await create2Deployer.getAddress();
console.log(
"Create2Deployer deployed to: " +
`${GREEN}${create2DeployerAddress}${RESET}\n`,
);
console.log(
"Waiting 30 seconds before beginning the contract verification to allow the block explorer to index the contract...\n",
);
await delay(30000); // Wait for 30 seconds before verifying the contract
await hre.run("verify:verify", {
address: create2DeployerAddress,
});
}
main().catch((error) => {
console.error(error);
process.exitCode = 1;
});