-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
53 lines (49 loc) · 1.08 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
import { HardhatUserConfig } from 'hardhat/config'
import { config as dotenvConfig } from 'dotenv'
import "@nomicfoundation/hardhat-toolbox"
import '@nomiclabs/hardhat-etherscan'
import 'hardhat-gas-reporter'
import 'solidity-coverage'
dotenvConfig()
const {
COINMARKETCAP_API_KEY,
ETHERSCAN_API_KEY,
GOERLI_URL ,
MAINNET_URL,
PRIVATE_KEY,
REPORT_GAS,
} = process.env
const config: HardhatUserConfig = {
solidity: {
version: '0.8.19',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
networks: {
goerli: {
url: GOERLI_URL || "",
accounts:
PRIVATE_KEY !== undefined ? [PRIVATE_KEY] : [],
},
mainnet: {
url: MAINNET_URL || "",
accounts:
PRIVATE_KEY !== undefined ? [PRIVATE_KEY] : [],
},
// Add more networks here if needed, e.g., testnets or mainnets
},
gasReporter: {
enabled: REPORT_GAS !== undefined,
coinmarketcap: COINMARKETCAP_API_KEY,
currency: "USD",
// gasPrice: 20,
},
etherscan: {
apiKey: ETHERSCAN_API_KEY,
},
}
export default config