-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.js
72 lines (65 loc) · 1.73 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
require("@nomicfoundation/hardhat-chai-matchers");
require("@nomicfoundation/hardhat-toolbox");
require('dotenv').config();
require("@nomiclabs/hardhat-etherscan");
const ZKEVM_MAINNET_RPC_URL = process.env.ZKEVM_MAINNET_RPC_URL;
const ZKEVM_TESTNET_RPC_URL = process.env.ZKEVM_TESTNET_RPC_URL;
const PRIVATE_KEY = process.env.PRIVATE_KEY;
const ETHERSCAN_ZKEVM_API_KEY = process.env.ETHERSCAN_ZKEVM_API_KEY;
task("accounts", "Prints the list of accounts", async () => {
const accounts = await hre.ethers.getSigners();
for (const account of accounts) {
console.log(account.address);
}
});
module.exports = {
mocha: {
timeout: 10000000000,
},
solidity: {
version: "0.8.17",
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
},
etherscan: {
apiKey: {
polygonZKEVMMainnet: ETHERSCAN_ZKEVM_API_KEY,
polygonZKEVMTestnet: ETHERSCAN_ZKEVM_API_KEY
},
customChains: [
{
network: "polygonZKEVMMainnet",
chainId: 1101,
urls: {
apiURL: "https://explorer.mainnet.zkevm-test.net/api",
browserURL: "https://explorer.mainnet.zkevm-test.net/"
}
},
{
network: "polygonZKEVMTestnet",
chainId: 1442,
urls: {
apiURL: "https://explorer.public.zkevm-test.net/api",
browserURL: "https://explorer.public.zkevm-test.net/"
}
}
],
timeout: 60000 // increase timeout to 1 minute (default is 20000ms)
},
networks: {
polygonZKEVMMainnet: {
url: ZKEVM_MAINNET_RPC_URL,
accounts: [PRIVATE_KEY],
chainId: 1101,
},
polygonZKEVMTestnet: {
url: ZKEVM_TESTNET_RPC_URL,
accounts: [PRIVATE_KEY],
chainId: 1442,
}
},
};