-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathhardhat.config.js
116 lines (113 loc) · 2.98 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
require('@nomiclabs/hardhat-waffle');
require('hardhat-deploy');
require('hardhat-deploy-ethers');
require('solidity-coverage');
// Truffle and Web3.js plugin
require('@nomiclabs/hardhat-web3');
require('@nomiclabs/hardhat-truffle5');
require('@nomiclabs/hardhat-etherscan');
require('dotenv').config();
require('@xplorfin/hardhat-solc-excludes');
module.exports = {
solidity: {
compilers: [
{
version: '0.6.12',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
{
version: '0.8.10',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
overrides: {
'contracts/handlers/maker/dapphub/DSAuth.sol': {
version: '0.6.12',
},
'contracts/handlers/maker/dapphub/DSGuard.sol': {
version: '0.6.12',
},
'contracts/handlers/maker/dapphub/DSGuardFactory.sol': {
version: '0.6.12',
},
},
excludes: { directories: ['test/foundry'] },
},
namedAccounts: {
deployer: {
default: 0,
},
},
networks: {
hardhat: {
forking: {
url: process.env.RPC_URL || 'https://rpc.ankr.com/eth',
ignoreUnknownTxType: true,
},
chainId: Number(process.env.CHAIN_ID) || 1,
accounts: {
mnemonic:
'dice shove sheriff police boss indoor hospital vivid tenant method game matter',
path: "m/44'/60'/0'/0",
initialIndex: 0,
},
initialBaseFeePerGas: 0,
gasPrice: 0,
gas: 30000000,
},
ethBeta: {
url: process.env.ETH_BETA_RPC_URL || 'https://geth-beta.furucombo.app',
accounts: accounts(process.env.ETH_BETA_SECRET),
},
eth: {
url: process.env.ETH_RPC_URL || 'https://rpc.ankr.com/eth',
accounts: accounts(process.env.ETH_SECRET),
},
optimism: {
url: process.env.OPTIMISM_RPC_URL || 'https://rpc.ankr.com/optimism',
accounts: accounts(process.env.OPTIMISM_SECRET),
},
polygon: {
url: process.env.POLYGON_RPC_URL || 'https://rpc.ankr.com/polygon',
accounts: accounts(process.env.POLYGON_SECRET),
},
fantom: {
url: process.env.FANTOM_RPC_URL || 'https://rpc.ankr.com/fantom',
accounts: accounts(process.env.FANTOM_SECRET),
},
metis: {
url:
process.env.METIS_RPC_URL || 'https://andromeda.metis.io/?owner=1088',
accounts: accounts(process.env.METIS_SECRET),
},
arbitrum: {
url: process.env.ARBITRUM_RPC_URL || 'https://arb1.arbitrum.io/rpc',
accounts: accounts(process.env.ARBITRUM_SECRET),
},
avalanche: {
url:
process.env.AVALANCHE_RPC_URL ||
'https://api.avax.network/ext/bc/C/rpc',
accounts: accounts(process.env.AVALANCHE_SECRET),
},
},
mocha: {
timeout: 900000,
},
etherscan: {
apiKey: process.env.ETHERSCAN_KEY || '',
},
};
function accounts(envKey) {
return envKey !== undefined ? [envKey] : [];
}