-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhardhat.config.js
54 lines (52 loc) · 1.27 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
require("@nomicfoundation/hardhat-toolbox");
require("@nomiclabs/hardhat-ethers");
require("hardhat-gas-reporter");
require("hardhat-tracer");
// make sure process env is ready
require("dotenv").config();
module.exports = {
solidity: "0.8.16",
defaultNetwork: "hardhat",
solidity: {
compilers: [
{
version: "0.8.16",
settings: {
optimizer: { // Keeps the amount of gas used in check
enabled: true,
runs: 100000
}
}
},
],
},
networks: {
hardhat: {
chainId: 31337,
gas: "auto",
gasPrice: "auto",
saveDeployments: false,
forking: {
url: `https://eth-rinkeby.alchemyapi.io/v2/${process.env.ALCHEMY_API_KEY}`,
},
},
rinkeby: {
url: `https://eth-rinkeby.alchemyapi.io/v2/${ALCHEMY_API_KEY}`,
accounts: [`0x${PRIVATE_KEY}`],
gasPrice: 5000000000, // 5 gwei
},
mainnet: {
url: `https://eth-mainnet.alchemyapi.io/v2/${ALCHEMY_API_KEY}`,
accounts: [`0x${PRIVATE_KEY}`],
gasPrice: 20000000000, // 20 gwei
},
},
gasReporter: {
currency: 'USD',
gasPrice: 20,
coinmarketcap: '9896bb6e-1429-4e65-8ba8-eb45302f849b',
showMethodSig: true,
showTimeSpent: true,
enabled: true
},
};