-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
121 lines (116 loc) · 2.41 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
import "dotenv/config";
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import "hardhat-change-network";
let accounts;
if (process.env.MNEMONIC) {
accounts = {
mnemonic: process.env.MNEMONIC,
initialIndex: 0,
count: 10,
};
} else if (process.env.PRIVATE_KEY) {
accounts = [process.env.PRIVATE_KEY];
}
const config: HardhatUserConfig = {
solidity: {
compilers: [
{
version: "0.8.20",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
typechain: {
outDir: "typechain-types",
target: "ethers-v5",
},
networks: {
hardhat: {
accounts: {
mnemonic:
"bring tumble anger wild frame you famous usage ramp federal captain company",
count: 100,
},
},
ethereum: {
url: process.env.ETHEREUM_URL ?? "",
accounts,
},
sepolia: {
url: process.env.SEPOLIA_URL ?? "",
accounts,
},
matic: {
url: process.env.POLYGON_URL ?? "",
gasPrice: 2e11,
accounts,
},
mumbai: {
url: process.env.MUMBAI_URL ?? "",
accounts,
},
bsc: {
url: process.env.BSC_URL ?? "",
accounts,
},
"bsc-testnet": {
url: process.env.BSC_TESTNET_URL ?? "",
accounts,
},
avalanche: {
url: process.env.AVALANCHE_URL ?? "",
accounts,
},
"avalanche-fuji": {
url: process.env.AVALANCHE_FUJI_URL ?? "",
accounts,
},
arbitrum: {
url: process.env.ARBITRUM_URL ?? "",
accounts,
},
"arbitrum-sepolia": {
url: process.env.ARBITRUM_SEPOLIA_URL ?? "",
accounts,
},
optimism: {
url: process.env.OPTIMISM_URL ?? "",
accounts,
},
"optimism-sepolia": {
url: process.env.OPTIMISM_SEPOLIA_URL ?? "",
accounts,
},
fantom: {
url: process.env.FANTOM_URL ?? "",
accounts,
},
"fantom-testnet": {
url: process.env.FANTOM_TESTNET_URL ?? "",
accounts,
},
zkEVM: {
url: process.env.ZKEVM_URL ?? "",
accounts,
},
"zkEVM-testnet": {
url: process.env.ZKEVM_TESTNET_URL ?? "",
accounts,
},
zkSync: {
url: process.env.ZKSYNC_URL ?? "",
accounts,
},
"zkSync-testnet": {
url: process.env.ZKSYNC_TESTNET_URL ?? "",
accounts,
},
},
};
export default config;