-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.js
61 lines (58 loc) · 1.48 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
require("dotenv").config();
require("@nomiclabs/hardhat-waffle");
require('@nomiclabs/hardhat-web3');
require("@nomiclabs/hardhat-solpp");
require("@nomiclabs/hardhat-etherscan");
function getNetworkUrl(networkName) {
const alchemyKey = process.env.ALCHEMY_API_KEY || "";
const url = `https://eth-${networkName}.alchemyapi.io/v2/` + alchemyKey;
return url;
}
module.exports = {
networks: {
// forking is always enabled
hardhat: {
forking: {
url: getNetworkUrl('mainnet'),
},
// uncomment this if wanting to use private key address
// accounts: [{ privateKey: process.env.PRIVATE_KEY, balance: '10000000000000000000000' }],
},
mainnet: {
url: getNetworkUrl('mainnet'),
accounts: [process.env.PRIVATE_KEY],
baseFeePerGas: 140e9,
timeout: 1000000,
},
rinkeby: {
url: getNetworkUrl('rinkeby'),
accounts: [process.env.PRIVATE_KEY],
gasPrice: 4e9,
timeout: 1000000,
},
},
solidity: {
version: "0.8.1",
optimizer: {
enabled: true,
runs: 999999,
},
},
mocha: {
timeout: 1000000,
},
etherscan: {
apiKey: {
mainnet: process.env.ETHERSCAN_API_KEY,
rinkeby: process.env.ETHERSCAN_API_KEY,
bsc: process.env.BSCSCAN_API_KEY,
polygon: process.env.POLYGONSCAN_API_KEY,
avalanche: process.env.SNOWTRACE_API_KEY,
},
},
// Disable the following when running the tests
solpp: {
"cwd": "./contracts",
"noFlatten": false
}
}