-
Notifications
You must be signed in to change notification settings - Fork 2
/
hardhat.config.js
49 lines (46 loc) · 1.11 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
require("@nomiclabs/hardhat-waffle");
require('dotenv').config();
require('solidity-coverage')
require('hardhat-contract-sizer');
const { INFURA_API_KEY, TEST_ACCOUNT_PRIVATE_KEY, MAIN_ACCOUNT_PRIVATE_KEY } = process.env;
let testAccounts = TEST_ACCOUNT_PRIVATE_KEY ? [TEST_ACCOUNT_PRIVATE_KEY] : [];
let mainAccounts = MAIN_ACCOUNT_PRIVATE_KEY ? [MAIN_ACCOUNT_PRIVATE_KEY] : [];
module.exports = {
solidity: {
compilers: [
{
version: "0.8.15",
settings: {
optimizer: {
enabled: true
},
},
},
{
version: "0.7.6",
}
]
},
defaultNetwork: 'hardhat',
networks: {
mainnet: {
url: `https://mainnet.infura.io/v3/${INFURA_API_KEY}`,
accounts: mainAccounts
},
rinkeby: {
url: `https://rinkeby.infura.io/v3/${INFURA_API_KEY}`,
accounts: testAccounts
},
goerli: {
url: `https://goerli.infura.io/v3/${INFURA_API_KEY}`,
accounts: testAccounts
}
},
contractSizer: {
alphaSort: false,
disambiguatePaths: false,
runOnCompile: false,
strict: true,
only: [],
}
};