-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhardhat.config.js
182 lines (181 loc) · 5.11 KB
/
hardhat.config.js
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
/* eslint-disable @typescript-eslint/no-var-requires */
require('@nomicfoundation/hardhat-toolbox')
require('dotenv').config()
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
defaultNetwork: 'hardhat',
solidity: {
version: '0.8.23',
settings: {
evmVersion: 'shanghai',
optimizer: {
enabled: true,
runs: 1000,
},
},
},
sourcify: {
enabled: false,
},
networks: {
mainnet: {
url: 'https://mainnet.infura.io/v3/' + process.env.NEXT_PUBLIC_INFURA_ID,
accounts: [process.env.TEST_PRIVATE_KEY],
},
polygon: {
url:
'https://polygon-mainnet.infura.io/v3/' +
process.env.NEXT_PUBLIC_INFURA_ID,
accounts: [process.env.TEST_PRIVATE_KEY],
},
arbitrumOne: {
url:
'https://arbitrum-mainnet.infura.io/v3/' +
process.env.NEXT_PUBLIC_INFURA_ID,
accounts: [process.env.TEST_PRIVATE_KEY],
},
optimisticEthereum: {
url:
'https://optimism-mainnet.infura.io/v3/' +
process.env.NEXT_PUBLIC_INFURA_ID,
accounts: [process.env.TEST_PRIVATE_KEY],
},
gnosis: {
url: 'https://gnosis-mainnet.public.blastapi.io',
accounts: [process.env.TEST_PRIVATE_KEY],
},
bsc: {
url: 'https://bsc-mainnet.public.blastapi.io',
accounts: [process.env.TEST_PRIVATE_KEY],
},
avalanche: {
url:
'https://avalanche-mainnet.infura.io/v3/' +
process.env.NEXT_PUBLIC_INFURA_ID,
accounts: [process.env.TEST_PRIVATE_KEY],
},
sepolia: {
url: 'https://sepolia.infura.io/v3/' + process.env.NEXT_PUBLIC_INFURA_ID,
accounts: [process.env.TEST_PRIVATE_KEY],
},
polygonMumbai: {
url:
'https://polygon-mumbai.infura.io/v3/' +
process.env.NEXT_PUBLIC_INFURA_ID,
accounts: [process.env.TEST_PRIVATE_KEY],
},
arbitrumSepolia: {
chainId: 421614,
url:
'https://arbitrum-sepolia.infura.io/v3/' +
process.env.NEXT_PUBLIC_INFURA_ID,
accounts: [process.env.TEST_PRIVATE_KEY],
},
optimisticSepolia: {
chainId: 11155420,
url:
'https://optimism-sepolia.infura.io/v3/' +
process.env.NEXT_PUBLIC_INFURA_ID,
accounts: [process.env.TEST_PRIVATE_KEY],
},
base: {
chainId: 8453,
url: 'https://base-mainnet.public.blastapi.io',
accounts: [process.env.TEST_PRIVATE_KEY],
},
linea: {
chainId: 59144,
url:
'https://linea-mainnet.infura.io/v3/' +
process.env.NEXT_PUBLIC_INFURA_ID,
accounts: [process.env.TEST_PRIVATE_KEY],
},
metis: {
chainId: 1088,
url: 'https://metis-mainnet.public.blastapi.io',
accounts: [process.env.TEST_PRIVATE_KEY],
},
polygonZkEvm: {
chainId: 1101,
url: 'https://polygon-zkevm-mainnet.public.blastapi.io',
accounts: [process.env.TEST_PRIVATE_KEY],
},
zkSync: {
chainId: 324,
url: 'https://mainnet.era.zksync.io',
accounts: [process.env.TEST_PRIVATE_KEY],
},
},
etherscan: {
apiKey: {
mainnet: process.env.ETHERSCAN_API_KEY,
polygon: process.env.POLYGONSCAN_API_KEY,
arbitrumOne: process.env.ARBITRUMSCAN_API_KEY,
optimisticEthereum: process.env.OPTIMISMSCAN_API_KEY,
gnosis: process.env.GNOSISSCAN_API_KEY,
bsc: process.env.BSCSCAN_API_KEY,
avalanche: 'avalanche',
sepolia: process.env.ETHERSCAN_API_KEY,
polygonMumbai: process.env.POLYGONSCAN_API_KEY,
arbitrumSepolia: process.env.ARBITRUMSCAN_API_KEY,
optimisticSepolia: process.env.OPTIMISMSCAN_API_KEY,
base: process.env.BASESCAN_API_KEY,
linea: process.env.LINEASCAN_API_KEY,
metis: 'metis',
polygonZkEvm: process.env.POLYGONSCAN_API_KEY,
zkSync: 'zkSync',
},
customChains: [
{
network: 'avalanche',
chainId: 43114,
urls: {
apiURL:
'https://api.routescan.io/v2/network/mainnet/evm/43114/etherscan',
browserURL: 'https://snowtrace.io',
},
},
{
network: 'arbitrumSepolia',
chainId: 421614,
urls: {
apiURL: 'https://api-sepolia.arbiscan.io/api',
browserURL: 'https://sepolia.arbiscan.io',
},
},
{
network: 'optimisticSepolia',
chainId: 11155420,
urls: {
apiURL: 'https://api-sepolia-optimistic.etherscan.io/api',
browserURL: 'https://sepolia-optimism.etherscan.io',
},
},
{
network: 'linea',
chainId: 59144,
urls: {
apiURL: 'https://api.lineascan.build/api',
browserURL: 'https://lineascan.build',
},
},
{
network: 'metis',
chainId: 1088,
urls: {
apiURL:
'https://api.routescan.io/v2/network/mainnet/evm/1088/etherscan',
browserURL: 'https://andromeda-explorer.metis.io',
},
},
{
network: 'zkSync',
chainId: 324,
urls: {
apiURL: 'https://block-explorer-api.mainnet.zksync.io/api',
browserURL: 'https://explorer.zksync.io',
},
},
],
},
}