-
Notifications
You must be signed in to change notification settings - Fork 39
/
hardhat.config.ts
131 lines (120 loc) · 2.94 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
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.6.11",
settings: {
optimizer: {
enabled: true,
runs: 100,
},
},
},
{
version: "0.8.10",
settings: {
optimizer: {
enabled: true,
runs: 100_000,
},
},
},
],
},
networks: {
// 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",
},
// Arbitrum Public Chains
arb_mainnet: {
url: env.string("RPC_ARB_MAINNET", ""),
},
arb_sepolia: {
url: env.string("RPC_ARB_SEPOLIA", ""),
},
// Arbitrum Fork Chains
arb_mainnet_fork: {
url: "http://localhost:8546",
},
arb_sepolia_fork: {
url: "http://localhost:8546",
},
// 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", ""),
arbitrumOne: env.string("ETHERSCAN_API_KEY_ARB", ""),
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",
"./utils/arbitrum/artifacts/*.json",
],
},
mocha: {
timeout: 20 * 60 * 60 * 1000, // 20 minutes for e2e tests
},
};
export default config;