-
Notifications
You must be signed in to change notification settings - Fork 5
/
hardhat.config.ts
86 lines (80 loc) · 2.15 KB
/
hardhat.config.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import { HardhatUserConfig, task } from "hardhat/config";
import "@nomiclabs/hardhat-waffle";
import "@rumblefishdev/hardhat-kms-signer";
import "solidity-coverage";
import dotenv from "dotenv";
dotenv.config();
const scripts = [
"deploy-registries.ts",
"deploy-aave.ts",
"deploy-balancer.ts",
"deploy-compound.ts",
"deploy-curve.ts",
"deploy-lido.ts",
"deploy-uniswap.ts",
"deploy-weth.ts",
"deploy-yearn.ts",
"deploy-maker.ts",
"deploy-gro.ts",
"deploy-paraswap.ts",
"deploy-registries.ts",
];
task("deploy-all", "Deploy all scripts", async (args, hre) => {
for (const script of scripts) {
console.log("\n", `///////////// Executing [${script}] on [${hre.network.name}] ///////////////`, "\n");
const { main } = require(`./scripts/${script}`);
await main();
}
});
task("display-account", "Display deployment account", async (args, hre) => {
const [signer] = await hre.ethers.getSigners();
console.log(signer);
});
const config: HardhatUserConfig = {
networks: {
hardhat: {
forking: {
url: `https://eth-mainnet.alchemyapi.io/v2/${process.env.ALCHEMY_KEY}`,
},
},
dev: {
url: `https://eth-goerli.alchemyapi.io/v2/${process.env.ALCHEMY_KEY}`,
accounts: [`0x${process.env.DEV_PKEY}`],
chainId: 5,
},
hydrogen: {
url: `https://eth-sepolia.g.alchemy.com/v2/${process.env.ALCHEMY_KEY}`,
accounts: [`0x${process.env.HYDROGEN_PKEY}`],
chainId: 11155111,
},
test: {
url: `https://eth-ropsten.alchemyapi.io/v2/${process.env.ALCHEMY_KEY}`,
kmsKeyId: process.env.TEST_KMSID,
chainId: 3,
},
staging: {
url: `https://eth-mainnet.alchemyapi.io/v2/${process.env.ALCHEMY_KEY}`,
kmsKeyId: process.env.STAGING_KMSID,
chainId: 1,
},
prod: {
url: `https://eth-mainnet.alchemyapi.io/v2/${process.env.ALCHEMY_KEY}`,
kmsKeyId: process.env.PROD_KMSID,
chainId: 1,
},
},
solidity: {
compilers: [
{
version: "0.8.3",
settings: {
optimizer: {
enabled: true,
runs: 1000,
},
},
},
],
},
};
export default config;