This repository has been archived by the owner on May 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
hardhat.config.js
94 lines (92 loc) · 2.23 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
'use strict'
require('@nomiclabs/hardhat-waffle')
require('@nomiclabs/hardhat-ethers')
require('solidity-coverage')
require('hardhat-deploy')
require('hardhat-log-remover')
require('hardhat-gas-reporter')
require('dotenv').config()
require('./tasks/create-release')
require('./tasks/deploy-core-contracts')
require('./tasks/strategy-configuration')
require('./tasks/deploy-upgrader')
require('./tasks/deploy-buyback')
require('./tasks/upgrade-pool')
require('./tasks/hardhat-hook')
const junk = 'test test test test test test test test test test test junk'
if (process.env.RUN_CONTRACT_SIZER === 'true') {
require('hardhat-contract-sizer')
}
module.exports = {
defaultNetwork: 'hardhat',
networks: {
localhost: {
saveDeployments: true,
timeout: 1000000,
accounts: { mnemonic: process.env.MNEMONIC || junk },
},
hardhat: {
initialBaseFeePerGas: 0,
forking: {
url: process.env.NODE_URL,
blockNumber: process.env.BLOCK_NUMBER ? parseInt(process.env.BLOCK_NUMBER) : undefined,
},
saveDeployments: true,
},
mainnet: {
url: process.env.NODE_URL,
chainId: 1,
gas: 6700000,
accounts: { mnemonic: process.env.MNEMONIC || junk },
},
goerli: {
url: process.env.NODE_URL,
chainId: 5,
gas: 12000000,
accounts: { mnemonic: process.env.MNEMONIC || junk },
},
polygon: {
url: process.env.NODE_URL,
chainId: 137,
gas: 11700000,
accounts: { mnemonic: process.env.MNEMONIC || junk },
},
avalanche: {
url: process.env.NODE_URL,
chainId: 43114,
gas: 8000000,
accounts: { mnemonic: process.env.MNEMONIC || junk },
},
},
paths: {
deployments: 'deployments',
sources: process.env.SOURCES_DIR || './contracts',
},
namedAccounts: {
deployer: process.env.DEPLOYER || 0,
},
contractSizer: {
alphaSort: true,
runOnCompile: true,
},
gasReporter: {
enabled: process.env.REPORT_GAS === 'true',
},
solidity: {
version: '0.8.9',
settings: {
optimizer: {
enabled: true,
runs: 100,
},
outputSelection: {
'*': {
'*': ['storageLayout'],
},
},
},
},
mocha: {
timeout: 400000,
},
}