-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathhardhat.config.ts
52 lines (49 loc) · 1.03 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
import 'dotenv/config'
import '@nomiclabs/hardhat-waffle'
import '@nomiclabs/hardhat-ethers'
import 'hardhat-gas-reporter'
const ALCHEMY_TOKEN = process.env.ALCHEMY_TOKEN || ''
const FORK_NETWORK = (process.env.FORK_NETWORK as string) || 'mainnet'
const ForkedNetwork: Record<string, any> = {
mainnet: {
chainId: 1,
forking: {
url: `https://eth-mainnet.g.alchemy.com/v2/${ALCHEMY_TOKEN}`,
blockNumber: 18118600,
},
},
goerli: {
chainId: 5,
forking: {
url: `https://eth-goerli.g.alchemy.com/v2/${ALCHEMY_TOKEN}`,
blockNumber: 9685800,
},
},
}
module.exports = {
networks: {
hardhat: ForkedNetwork[FORK_NETWORK],
},
solidity: {
compilers: [
{
version: '0.5.16',
settings: {
optimizer: {
enabled: true,
runs: 1000,
},
},
},
{
version: '0.8.17',
settings: {
optimizer: {
enabled: true,
runs: 1000,
},
},
},
],
},
}