-
Notifications
You must be signed in to change notification settings - Fork 2
/
hardhat.config.ts
147 lines (145 loc) · 4.03 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
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
import './test/utils/loadDotEnv';
import { HardhatUserConfig } from 'hardhat/config';
import { Wallet } from 'ethers';
import '@nomiclabs/hardhat-ethers';
import '@nomiclabs/hardhat-waffle';
import '@openzeppelin/hardhat-upgrades';
import '@nomiclabs/hardhat-etherscan';
import 'solidity-coverage';
import 'hardhat-gas-reporter';
import './tasks';
const DEFAULT_MNEMONIC = Wallet.createRandom().mnemonic.phrase;
export default {
etherscan: {
apiKey: {
mainnet: process.env.ETHERSCAN_API_KEY,
goerli: process.env.ETHERSCAN_API_KEY,
'base-goerli': process.env.BASE_API_KEY,
'base-mainnet': process.env.BASE_API_KEY,
avalanche: process.env.SNOWTRACE_API_KEY,
fuji: process.env.SNOWTRACE_API_KEY,
arbitrumOne: process.env.ARBISCAN_API_KEY,
},
customChains: [
{
network: 'base-mainnet',
chainId: 8453,
urls: {
apiURL: 'https://api.basescan.org/api',
browserURL: 'https://basescan.org',
},
},
{
network: 'base-goerli',
chainId: 84531,
urls: {
apiURL: 'https://api-goerli.basescan.org/api',
browserURL: 'https://goerli.basescan.org',
},
},
],
},
networks: {
rinkeby: {
url: `https://rinkeby.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: process.env.DEV_PKEY
? [process.env.DEV_PKEY]
: {
mnemonic: process.env.DEV_MNEMONIC || DEFAULT_MNEMONIC,
},
},
kovan: {
url: `https://kovan.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: process.env.DEV_PKEY
? [process.env.DEV_PKEY]
: {
mnemonic: process.env.DEV_MNEMONIC || DEFAULT_MNEMONIC,
},
},
goerli: {
url: `https://goerli.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: process.env.DEV_PKEY
? [process.env.DEV_PKEY]
: {
mnemonic: process.env.DEV_MNEMONIC || DEFAULT_MNEMONIC,
},
},
mainnet: {
url: `https://mainnet.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: process.env.PROD_PKEY
? [process.env.PROD_PKEY]
: {
mnemonic: process.env.PROD_MNEMONIC || DEFAULT_MNEMONIC,
},
},
'base-mainnet': {
url: 'https://mainnet.base.org',
accounts: process.env.PROD_PKEY
? [process.env.PROD_PKEY]
: {
mnemonic: process.env.PROD_MNEMONIC || DEFAULT_MNEMONIC,
},
gasPrice: 1000000000,
},
'base-goerli': {
url: 'https://goerli.base.org',
accounts: process.env.DEV_PKEY
? [process.env.DEV_PKEY]
: {
mnemonic: process.env.DEV_MNEMONIC || DEFAULT_MNEMONIC,
},
gasPrice: 1000000000,
},
fuji: {
url: 'https://api.avax-test.network/ext/bc/C/rpc',
accounts: process.env.AVAX_DEV_PKEY
? [process.env.AVAX_DEV_PKEY]
: {
mnemonic: process.env.DEV_MNEMONIC || DEFAULT_MNEMONIC,
},
gasPrice: 225000000000,
chainId: 43113,
},
avalanche: {
url: 'https://api.avax.network/ext/bc/C/rpc',
accounts: process.env.AVAX_PROD_PKEY
? [process.env.AVAX_PROD_PKEY]
: {
mnemonic: process.env.PROD_MNEMONIC || DEFAULT_MNEMONIC,
},
gasPrice: 225000000000,
chainId: 43114,
},
arbitrum: {
url: 'https://arb1.arbitrum.io/rpc',
accounts: process.env.ARB_PROD_PKEY
? [process.env.ARB_PROD_PKEY]
: {
mnemonic: process.env.PROD_MNEMONIC || DEFAULT_MNEMONIC,
},
chainId: 42161,
},
},
solidity: {
compilers: [
{
version: '0.8.4',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
mocha: {
timeout: 1000000,
},
gasReporter: {
currency: 'USD',
enabled: process.env.REPORT_GAS ? true : false,
excludeContracts: ['mocks/'],
coinmarketcap: process.env.COINMARKETCAP_API_KEY,
},
} as HardhatUserConfig;