-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
54 lines (48 loc) · 1.36 KB
/
hardhat.config.ts
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
/**
* @type import('hardhat/config').HardhatUserConfig
*/
import "@nomiclabs/hardhat-ethers";
import "@nomiclabs/hardhat-etherscan";
// Load dotenv configuration
require("dotenv").config();
module.exports = {
// Etherscan keys
etherscan: {
apiKey: {
rinkeby: process.env.ETHERSCAN_RINKEBY_API_KEY,
mainnet: process.env.ETHERSCAN_MAINNET_API_KEY,
}
},
// Nodes
defaultNetwork: "hardhat",
networks: {
hardhat: {
},
rinkeby: {
url: "https://eth-rinkeby.alchemyapi.io/v2/" + process.env.ALCHEMY_RINKEBY_KEY,
accounts: [process.env.RINKEBY_PRIVATE_KEY],
// Use these if network is volatile and want to make sure your txn goes through
// https://hardhat.org/config/
// gas, gasPrice, ... are measured in "wei" (without 'g')
gasPrice: 5000000000, // 5 gwei
},
mainnet: {
url: "https://eth-mainnet.alchemyapi.io/v2/" + process.env.ALCHEMY_MAINNET_KEY,
accounts: [process.env.MAINNET_PRIVATE_KEY],
// Use these if network is volatile and want to make sure your txn goes through
// https://hardhat.org/config/
// gas, gasPrice, ... are measured in "wei" (without 'g')
gasPrice: 25000000000, // 25 gwei
},
},
// Compiler options
solidity: {
version: "0.8.1",
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
},
};