-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhardhat.config.js
77 lines (73 loc) · 1.78 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
require("@nomiclabs/hardhat-waffle");
require("@nomiclabs/hardhat-etherscan");
require('hardhat-abi-exporter');
// require('hardhat-contract-sizer');
// require("hardhat-gas-reporter");
require('dotenv').config()
let mnemonic = process.env.MNEMONIC;
const infuraNetwork = (network, chainId, gas) => {
return {
url: `https://${network}.infura.io/v3/${process.env.PROJECT_ID}`,
chainId,
gas,
accounts: mnemonic ? { mnemonic } : undefined
};
};
module.exports = {
solidity: {
compilers: [
{
version: "0.7.6",
settings: {
optimizer: {
runs: 99999,
enabled: true
}
}
}
]
},
networks: {
hardhat: {
allowUnlimitedContractSize: true,
accounts: mnemonic ? { mnemonic } : undefined,
forking: {
url: "https://rpc-mumbai.matic.today/",
chainId: 80001,
}
},
rinkeby: infuraNetwork("rinkeby", 4, 6283185),
kovan: infuraNetwork("kovan", 42, 6283185),
goerli: infuraNetwork("goerli", 5, 6283185),
matic: {
url: "https://rpc-mumbai.matic.today/",
chainId: 80001,
accounts: mnemonic ? { mnemonic } : undefined
},
bsc: {
url: "https://data-seed-prebsc-1-s1.binance.org:8545",
chainId: 97,
gasPrice: 20000000000,
accounts: mnemonic ? { mnemonic } : undefined
}
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY ? process.env.ETHERSCAN_API_KEY : undefined
},
gasReporter: {
currency: 'USD',
gasPrice: 1,
coinmarketcap: process.env.CMC_APIKEY
},
abiExporter: {
path: './abi',
clear: true,
flat: true,
only: ['HestiaSuperApp', 'HestiaCreator', 'Dai'],
},
contractSizer: {
alphaSort: true,
runOnCompile: true,
disambiguatePaths: false,
}
};