-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhardhat.config.ts
224 lines (222 loc) · 6.56 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
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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
import "@typechain/hardhat";
import "@nomicfoundation/hardhat-ethers";
// import "@openzeppelin/hardhat-upgrades";
import { compileSetting } from "./scripts/compilerConfig";
// import "@nomicfoundation/hardhat-verify";
// const { setGlobalDispatcher, ProxyAgent } = require("undici");
// const proxyAgent = new ProxyAgent("http://127.0.0.1:7890");
// setGlobalDispatcher(proxyAgent);
import "@matterlabs/hardhat-zksync";
import "@matterlabs/hardhat-zksync-solc";
import "@matterlabs/hardhat-zksync-deploy";
const dotenv = require("dotenv");
dotenv.config();
export default {
defaultNetwork: "bsctest",
networks: {
metertest: {
url: `https://rpctest.meter.io`,
chainId: 83,
gasPrice: 500000000000,
accounts: [],
},
meterstage: {
url: `http://rpc-stage.meter.io`,
chainId: 82,
gasPrice: 500000000000,
accounts: [],
},
metermain: {
url: `https://rpc.meter.io`,
chainId: 82,
gasPrice: 500000000000,
accounts: [],
},
arbitrumsepolia: {
url: "https://sepolia-rollup.arbitrum.io/rpc",
chainId: 421614,
gasPrice: 500000000000,
},
basesepolia: {
url: "https://sepolia.base.org",
chainId: 84532,
gasPrice: 500000000000,
},
sepolia: {
url: `https://ethereum-sepolia.blockpi.network/v1/rpc/${process.env.BLOCKPI_SEPOLIA_KEY}`,
chainId: 11155111,
gasPrice: 4000000000000,
accounts: [],
},
ethereum: {
url: "https://mainnet.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161", // public infura endpoint
chainId: 1,
gasPrice: 4000000000000,
accounts: [],
},
basetest: {
url: `https://goerli.base.org`,
chainId: 84531,
accounts: [],
},
basemain: {
url: `https://base.publicnode.com`,
chainId: 8453,
accounts: [],
},
arbitrum: {
url: `https://arb1.arbitrum.io/rpc`,
chainId: 42161,
accounts: [],
},
beratest: {
url: `https://bartio.rpc.berachain.com`,
chainId: 80084,
accounts: [],
},
b2main: {
url: "https://rpc.bsquared.network/",
chainId: 223,
ethNetwork: "b2main",
},
core: {
url: "https://rpc.coredao.org/",
chainId: 1116,
ethNetwork: "core",
txServiceUrl: "https://safe.coredao.org/txs",
},
coretest: {
url: "https://rpc.test.btcs.network",
chainId: 1115,
ethNetwork: "core",
},
coretest2: {
url: "https://rpc.test2.btcs.network",
chainId: 1114,
ethNetwork: "core",
},
merlin: {
url: "https://merlin.blockpi.network/v1/rpc/public",
chainId: 4200,
},
merlintest: {
url: "https://testnet-rpc.merlinchain.io",
chainId: 686868
},
bsctest: {
url: "https://bsc-testnet.public.blastapi.io",
chainId: 97
},
zklink: {
url: "https://rpc.zklink.io",
chainId: 810180,
// safeTxServiceUrl: '',
zksync: true,
ethNetwork: "mainnet",
verifyURL: "https://explorer.zklink.io/contract_verification",
},
zklinksepolia: {
url: "https://sepolia.rpc.zklink.io",
chainId: 810181,
zksync: true,
ethNetwork: "sepolia",
verifyURL: "https://sepolia.explorer.zklink.io/contract_verification",
// safeTxServiceUrl: '',
},
zksyncsepolia: {
url: "https://sepolia.era.zksync.dev",
chainId: 300,
zksync: true,
ethNetwork: "sepolia",
},
},
sourcify: {
enabled: false,
},
etherscan: {
apiKey: {
basemain: process.env.BASESCAN_API_KEY,
ethereum: process.env.ETHERSCAN_API_KEY,
sepolia: process.env.ETHERSCAN_API_KEY,
arbitrum: process.env.ARBISCAN_API_KEY,
mainnet: process.env.ETHERSCAN_API_KEY,
core: process.env.CORESCAN_API_KEY,
b2main: "no-api-key-needed",
merlin: "no-api-key-needed",
beratest: "beratest", // apiKey is not required, just set a placeholder
arbitrumSepolia: process.env.ARBISCAN_API_KEY,
baseSepolia: process.env.BASESCAN_API_KEY,
},
customChains: [
{
network: "beratest",
chainId: 80084,
urls: {
apiURL:
"https://api.routescan.io/v2/network/testnet/evm/80084/etherscan",
browserURL: "https://bartio.beratrail.io/",
},
},
{
network: "arbitrum",
chainId: 42161,
urls: {
apiURL: `https://api.arbiscan.io/api`,
browserURL: "https://arbiscan.io/",
},
},
{
network: "core",
chainId: 1116,
urls: {
apiURL: `https://openapi.coredao.org/api`,
browserURL: "https://scan.coredao.org",
},
},
{
network: "b2main",
chainId: 223,
urls: {
apiURL: "https://explorer.bsquared.network/api",
browserURL: "https://explorer.bsquared.network/",
},
},
{
network: "merlin",
chainId: 4200,
urls: {
apiURL: "https://scan.merlinchain.io/api",
browserURL: "https://scan.merlinchain.io",
},
},
{
network: "basemain",
chainId: 8453,
urls: {
apiURL: "https://api.basescan.org/api",
browserURL: "https://basescan.org",
},
},
],
},
solidity: {
compilers: [compileSetting("0.7.0", 200), compileSetting("0.8.19", 200)],
},
zksolc: {
version: "1.3.22", // optional.
settings: {
// compilerPath: 'zksolc', // optional. Ignored for compilerSource "docker". Can be used if compiler is located in a specific folder
// missingLibrariesPath: './.zksolc-libraries-cache/missingLibraryDependencies.json', // optional. This path serves as a cache that stores all the libraries that are missing or have dependencies on other libraries. A `hardhat-zksync-deploy` plugin uses this cache later to compile and deploy the libraries, especially when the `deploy-zksync:libraries` task is executed
enableEraVMExtensions: false, // optional. Enables Yul instructions available only for ZKsync system contracts and libraries. In the older versions of the plugin known as 'isSystem' flag
forceEVMLA: false, // Compile with EVM legacy assembly codegen. In the older versions of the plugin known as a 'forceEvmla' flag
optimizer: {
enabled: true, // optional. True by default
mode: "z", // optional. 3 by default, z to optimize bytecode size
fallback_to_optimizing_for_size: false, // optional. Try to recompile with optimizer mode "z" if the bytecode is too large
},
},
},
mocha: {
timeout: 200000,
},
};