-
Notifications
You must be signed in to change notification settings - Fork 1
/
hardhat.config.js
151 lines (148 loc) · 4.55 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
require("dotenv").config();
require("@nomiclabs/hardhat-waffle");
require("solidity-coverage");
require("hardhat-gas-reporter");
// require("hardhat-tracer");
require("@atixlabs/hardhat-time-n-mine");
require("hardhat-contract-sizer");
require("@nomiclabs/hardhat-etherscan");
const SOLC_8 = {
version: "0.8.13",
settings: {
optimizer: {
enabled: true,
runs: 2000,
},
},
};
const SOLC_7 = {
version: "0.7.6",
settings: {
optimizer: {
enabled: true,
runs: 2000,
},
},
};
/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
solidity: {
compilers: [SOLC_8, SOLC_7],
overrides: {
"@uniswap/v3-core/contracts/libraries/FixedPoint96.sol": SOLC_7,
"@uniswap/v3-core/contracts/libraries/FullMath.sol": SOLC_7,
"@uniswap/v3-core/contracts/libraries/LowGasSafeMath.sol": SOLC_7,
"@uniswap/v3-core/contracts/libraries/TickMath.sol": SOLC_7,
"@uniswap/v3-periphery/contracts/libraries/PoolAddress.sol": SOLC_7,
"@uniswap/v3-periphery/contracts/libraries/LiquidityAmounts.sol": SOLC_7,
"@uniswap/v3-periphery/contracts/libraries/OracleLibrary.sol": SOLC_7,
"@uniswap/v3-periphery/contracts/libraries/CallbackValidation.sol": SOLC_7,
"@uniswap/v3-core/contracts/base/LiquidityManagement.sol": SOLC_7,
"@uniswap/v3-core/contracts/base/PeripheryPayments.sol": SOLC_7,
"@uniswap/v3-core/contracts/base/PeripheryImmutableState.sol": SOLC_7,
},
},
networks: {
hardhat: {
gas: 10000000,
hardfork: process.env.HARDHAT_HARDFORK || "cancun",
forking: {
url: process.env.ETHEREUM_URL || "",
blockNumber: 20370000,
},
mining: {
auto: true,
mempool: {
order: "fifo",
},
},
blockGasLimit: 20000000000,
accounts: {
accountsBalance: "1000000000000000000000000", // 1M ETH
},
},
polygon: {
chainId: 137,
url: process.env.POLYGON_URL || "",
},
polygonZkEVM: {
chainId: 1101,
url: process.env.POLYGONZKEVM_URL || "",
},
arbitrumOne: {
chainId: 42161,
url: process.env.ARBITRUMONE_URL || "",
},
optimisticEthereum: {
chainId: 10,
url: process.env.OPTIMISM_URL || "",
},
evmos: {
chainId: 9001,
url: process.env.EVMOS_URL || "",
},
mode: {
chainId: 34443,
url: process.env.MODE_URL || "",
},
bsc: {
chainId: 56,
url: process.env.BSC_URL || "",
},
base: {
chainId: 8453,
url: process.env.BASE_URL || "",
},
},
etherscan: {
apiKey: {
mainnet: process.env.ETHERSCAN_API_KEY,
polygon: process.env.POLYGONSCAN_API_KEY,
polygonZkEVM: process.env.POLYGONSCANZKEVM_API_KEY,
arbitrumOne: process.env.ARBISCAN_API_KEY,
optimisticEthereum: process.env.OPTIMISTIC_ETHERSCAN_API_KEY,
evmos: process.env.ESCAN_API_KEY,
mode: "placeholder",
base: process.env.BASE_SCAN_API_KEY,
},
customChains: [
{
network: "polygonZkEVM",
chainId: 1101,
urls: {
apiURL: "https://api-zkevm.polygonscan.com/api",
browserURL: "https://zkevm.polygonscan.com",
},
},
{
network: "evmos",
chainId: 9001,
urls: {
apiURL: "https://escan.live/api",
browserURL: "https://escan.live",
},
},
{
network: "mode",
chainId: 34443,
urls: {
apiURL: "https://explorer.mode.network/api",
browserURL: "https://explorer.mode.network",
},
},
{
network: "base",
chainId: 8453,
urls: {
apiURL: "https://api.basescan.org/api",
browserURL: "https://basescan.org",
},
},
],
},
mocha: {
timeout: 60000, // 60 seconds
},
};