-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhardhat.config.ts
More file actions
188 lines (180 loc) · 5.36 KB
/
hardhat.config.ts
File metadata and controls
188 lines (180 loc) · 5.36 KB
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
import "@typechain/hardhat"
import "@nomicfoundation/hardhat-ethers";
import { HardhatUserConfig } from "hardhat/types"
import { task } from "hardhat/config";
import "@nomicfoundation/hardhat-verify";
import { config as dotEnvConfig } from "dotenv";
import "@nomicfoundation/hardhat-chai-matchers"
import "hardhat-gas-reporter"
import "hardhat-storage-layout";
import "hardhat-tracer";
import "hardhat-contract-sizer";
import "solidity-coverage";
import "@openzeppelin/hardhat-upgrades"
// import "@tenderly/hardhat-tenderly"
dotEnvConfig();
const NO_PRIVATE = "0x0000000000000000000000000000000000000000000000000000000000000000";
const ETHEREUM_RPC_URL = process.env.ETHEREUM_RPC_URL || "";
const RINKEBY_TESTNET_RPC_URL = process.env.RINKEBY_TESTNET_RPC_URL || "";
const ROPSTEN_TESTNET_RPC_URL = process.env.ROPSTEN_TESTNET_RPC_URL || "";
const GOERLI_TESTNET_RPC_URL = process.env.GOERLI_TESTNET_RPC_URL || "";
const SEPOLIA_TESTNET_RPC_URL = process.env.SEPOLIA_TESTNET_RPC_URL || "";
const POLYGON_RPC_URL = process.env.POLYGON_RPC_URL || "";
const POLYGON_TESTNET_RPC_URL = process.env.POLYGON_TESTNET_RPC_URL || "";
const BSC_RPC_URL = process.env.BSC_RPC_URL || "";
const BSC_TESTNET_RPC_URL = process.env.BSC_TESTNET_RPC_URL || "";
const AVALANCHE_RPC_URL = process.env.AVALANCHE_RPC_URL || "";
const AVALANCHE_TESTNET_RPC_URL = process.env.AVALANCHE_TESTNET_RPC_URL || "";
const GNOSIS_RPC_URL = process.env.GNOSIS_RPC_URL || "";
const GNOSIS_TESTNET_RPC_URL = process.env.GNOSIS_TESTNET_RPC_URL || "";
const OPTIMISM_RPC_URL = process.env.OPTIMISM_RPC_URL || "";
const OPTIMISM_TESTNET_RPC_URL = process.env.AVALANCHE_TESTNET_RPC_URL || "";
const ARBITRUM_RPC_URL = process.env.ARBITRUM_RPC_URL || "";
const ARBITRUM_TESTNET_RPC_URL = process.env.ARBITRUM_TESTNET_RPC_URL || "";
const AURORA_RPC_URL = process.env.AURORA_RPC_URL || "";
const AURORA_TESTNET_RPC_URL = process.env.AURORA_TESTNET_RPC_URL || "";
const FIRECHAIN_RPC_URL = process.env.FIRECHAIN_RPC_URL || "";
const BASE_RPC_URL = process.env.BASE_RPC_URL || "";
const BASE_TESTNET_RPC_URL = process.env.BASE_TESTNET_RPC_URL || "";
const EXPLORER_API_KEY = process.env.EXPLORER_API_KEY || "";
const DEPLOYER_PRIVATE_KEY = process.env.DEPLOYER_PRIVATE_KEY || NO_PRIVATE;
task(
"accounts",
"Prints accounts",
async (_, { ethers }) => {
await ethers.getSigners().then((signers) => {
const accounts = signers.map((elem) => {return elem.address})
console.log(accounts);
});
}
);
const config: HardhatUserConfig = {
networks: {
hardhat: {},
eth: {
url: ETHEREUM_RPC_URL,
accounts: [DEPLOYER_PRIVATE_KEY]
},
rinkeby: {
url: RINKEBY_TESTNET_RPC_URL,
accounts: [DEPLOYER_PRIVATE_KEY]
},
ropsten: {
url: ROPSTEN_TESTNET_RPC_URL,
accounts: [DEPLOYER_PRIVATE_KEY]
},
goerli: {
url: GOERLI_TESTNET_RPC_URL,
accounts: [DEPLOYER_PRIVATE_KEY]
},
sepolia: {
url: SEPOLIA_TESTNET_RPC_URL,
accounts: [DEPLOYER_PRIVATE_KEY]
},
polygon: {
url: POLYGON_RPC_URL,
accounts: [DEPLOYER_PRIVATE_KEY],
},
polygonTestnet: {
url: POLYGON_TESTNET_RPC_URL,
accounts: [DEPLOYER_PRIVATE_KEY],
gas: 3000000
},
bsc: {
url: BSC_RPC_URL,
accounts: [DEPLOYER_PRIVATE_KEY]
},
bscTestnet: {
url: BSC_TESTNET_RPC_URL,
accounts: [DEPLOYER_PRIVATE_KEY]
},
avax: {
url: AVALANCHE_RPC_URL,
accounts: [DEPLOYER_PRIVATE_KEY]
},
avaxTestnet: {
url: AVALANCHE_TESTNET_RPC_URL,
accounts: [DEPLOYER_PRIVATE_KEY]
},
gnosis: {
url: GNOSIS_RPC_URL,
accounts: [DEPLOYER_PRIVATE_KEY]
},
gnosisTestnet: {
url: GNOSIS_TESTNET_RPC_URL,
accounts: [DEPLOYER_PRIVATE_KEY]
},
optimism: {
url: OPTIMISM_RPC_URL,
accounts: [DEPLOYER_PRIVATE_KEY]
},
optimismTestnet: {
url: OPTIMISM_TESTNET_RPC_URL,
accounts: [DEPLOYER_PRIVATE_KEY]
},
arbitrum: {
url: ARBITRUM_RPC_URL,
accounts: [DEPLOYER_PRIVATE_KEY]
},
arbitrumTestnet: {
url: ARBITRUM_TESTNET_RPC_URL,
accounts: [DEPLOYER_PRIVATE_KEY]
},
aurora: {
url: AURORA_RPC_URL,
accounts: [DEPLOYER_PRIVATE_KEY]
},
auroraTestnet: {
url: AURORA_TESTNET_RPC_URL,
accounts: [DEPLOYER_PRIVATE_KEY]
},
base: {
url: BASE_RPC_URL,
accounts: [DEPLOYER_PRIVATE_KEY],
chainId: 8453,
},
baseTestnet: {
url: BASE_TESTNET_RPC_URL,
accounts: [DEPLOYER_PRIVATE_KEY],
chainId: 84532,
},
firechain: {
url: FIRECHAIN_RPC_URL,
accounts: [DEPLOYER_PRIVATE_KEY]
},
},
solidity: {
compilers: [
{
version: "0.8.20",
settings: {
optimizer: {
enabled: true,
runs: 200
},
},
},
{
version: "0.6.12",
settings: {
optimizer: {
enabled: true,
runs: 1
}
}
}
]},
etherscan: {
apiKey: EXPLORER_API_KEY
},
typechain: {
target: 'ethers-v6'
},
docgen: {
outputDir: 'docgen/generated/',
pages: 'files',
templates: 'docgen/templates/',
exclude: ['interface', 'mocks']
}
};
export default config