-
Notifications
You must be signed in to change notification settings - Fork 1
/
hardhat.config.js
116 lines (113 loc) · 2.45 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
solidity: {
compilers: [
{
version: "0.5.16",
},
{
version: "0.6.6",
settings: {},
},
],
},
};
require("@nomiclabs/hardhat-waffle");
require("solidity-coverage");
require("hardhat-contract-sizer");
require("hardhat-gas-reporter");
require("@nomiclabs/hardhat-etherscan");
require("dotenv").config();
const ALCHEMY_API_KEY = process.env.ALCHEMY_API_KEY;
const ROPSTEN_MNEMONIC = process.env.ROPSTEN_MNEMONIC;
const BNB_TESTNET_MNEMONIC = process.env.BNB_TESTNET_MNEMONIC;
const BNB_MAINNET_MNEMONIC = process.env.BNB_MAINNET_MNEMONIC;
const BSC_SCAN_KEY = process.env.BSC_SCAN_KEY;
const NETWORKS = {
gas: 40000000,
blockGasLimit: 9500000,
gasPrice: 20000000000,
};
/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
solidity: {
compilers: [
{
version: "0.5.16",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
{
version: "0.6.6",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
{
version: "0.8.3",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
contractSizer: {
alphaSort: true,
runOnCompile: true,
disambiguatePaths: false,
},
gasReporter: {
currency: "USD",
gasPrice: 21,
},
networks: {
localhost: {
live: false,
saveDeployments: true,
tags: ["local"],
},
hardhat: {
live: false,
saveDeployments: true,
initialBaseFeePerGas: 0,
tags: ["test", "local"],
},
bnb_testnet: {
url: "https://data-seed-prebsc-1-s1.binance.org:8545",
chainId: 97,
accounts: { mnemonic: BNB_TESTNET_MNEMONIC },
tags: ["staging"],
},
ropsten: {
url: `https://eth-ropsten.alchemyapi.io/v2/${ALCHEMY_API_KEY}`,
accounts: { mnemonic: ROPSTEN_MNEMONIC },
tags: ["staging"],
},
bnb_mainnet: {
url: "https://bsc-dataseed.binance.org/",
chainId: 56,
gasPrice: NETWORKS.gasPrice,
blockGasLimit: NETWORKS.blockGasLimit,
gasPrice: NETWORKS.gasPrice,
accounts: { mnemonic: BNB_MAINNET_MNEMONIC },
tags: ["product"],
},
},
etherscan: {
apiKey: BSC_SCAN_KEY,
},
};