forked from lidofinance/lido-l2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
hardhat.config.ts
115 lines (106 loc) · 2.54 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
import * as dotenv from "dotenv";
import { HardhatUserConfig } from "hardhat/config";
import "@nomiclabs/hardhat-etherscan";
import "@nomiclabs/hardhat-waffle";
import "@typechain/hardhat";
import "hardhat-gas-reporter";
import "solidity-coverage";
import "./tasks/fork-node";
import env from "./utils/env";
dotenv.config();
const config: HardhatUserConfig = {
solidity: {
compilers: [
{
version: "0.8.10",
settings: {
optimizer: {
enabled: true,
runs: 100_000,
},
},
},
],
},
networks: {
hardhat: {
gasPrice: 0,
initialBaseFeePerGas: 0,
chains: {
11155420: {
hardforkHistory: {
london: 13983909
}
}
}
},
// Ethereum Public Chains
eth_mainnet: {
url: env.string("RPC_ETH_MAINNET", ""),
},
eth_sepolia: {
url: env.string("RPC_ETH_SEPOLIA", ""),
},
// Ethereum Fork Chains
eth_mainnet_fork: {
url: "http://localhost:8545",
},
eth_sepolia_fork: {
url: "http://localhost:8545",
},
// Optimism Public Chains
opt_mainnet: {
url: env.string("RPC_OPT_MAINNET", ""),
},
opt_sepolia: {
url: env.string("RPC_OPT_SEPOLIA", ""),
},
// Optimism Fork Chains
opt_mainnet_fork: {
url: "http://localhost:9545",
},
opt_sepolia_fork: {
url: "http://localhost:9545",
},
},
gasReporter: {
enabled: env.string("REPORT_GAS", "false") !== "false",
currency: "USD",
},
etherscan: {
apiKey: {
mainnet: env.string("ETHERSCAN_API_KEY_ETH", ""),
sepolia: env.string("ETHERSCAN_API_KEY_ETH", ""),
optimisticEthereum: env.string("ETHERSCAN_API_KEY_OPT", ""),
"opt_sepolia": env.string("ETHERSCAN_API_KEY_OPT", ""),
},
customChains: [
{
network: 'sepolia',
chainId: 11155111,
urls: {
apiURL: 'https://api-sepolia.etherscan.io/api',
browserURL: 'https://sepolia.etherscan.io',
},
},
{
network: 'opt_sepolia',
chainId: 11155420,
urls: {
apiURL: 'https://api-sepolia-optimism.etherscan.io/api',
browserURL: 'https://sepolia-optimism.etherscan.io',
},
},
],
},
typechain: {
externalArtifacts: [
"./interfaces/**/*.json",
"./utils/optimism/artifacts/*.json",
],
},
mocha: {
timeout: 20 * 60 * 60 * 1000, // 20 minutes for e2e tests
},
};
export default config;