-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.js
82 lines (79 loc) · 1.98 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
require("dotenv").config();
require("@nomicfoundation/hardhat-toolbox");
require("@nomiclabs/hardhat-etherscan");
require("hardhat-gas-reporter");
require("solidity-coverage");
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
defaultNetwork: "hardhat", // consider that for deploy you should use ganache instead, so specify here, or during command run with --network ganache flag
networks: {
hardhat: {
chainId: 1337,
forking: {
url: process.env.WEB3_HTTP_PROVIDER_MAIN,
},
gas: 1800000,
},
localhost: {
url: "http://127.0.0.1:8545",
},
bsctest: {
url: process.env.WEB3_HTTP_PROVIDER_TEST,
accounts: [process.env.OWNER_PRIVATE_KEY, process.env.ADMIN_PRIVATE_KEY], // Testing
gas: 2100000,
gasPrice: 10000000000,
},
bscmain: {
url: process.env.WEB3_HTTP_PROVIDER_MAIN,
accounts: [process.env.OWNER_PRIVATE_KEY, process.env.ADMIN_PRIVATE_KEY],
gas: 2100000,
gasPrice: 10000000000,
},
ganache: {
url: "HTTP://127.0.0.1:7545",
chainId: 1337,
gas: 2100000,
gasPrice: 10000000000,
},
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
paths: {
sources: "./contracts",
tests: "./test",
cache: "./cache",
artifacts: "./artifacts",
},
solidity: {
compilers: [
{
version: "0.8.19",
settings: {
optimizer: {
enabled: true,
runs: 50000,
},
},
},
{
version: "0.8.17",
settings: {
optimizer: {
enabled: true,
runs: 50000,
},
},
},
],
},
gasReporter: {
enabled: true,
// outputFile: "gas-report.txt",
currency: "EUR",
gasPrice: 5,
token: "BNB",
coinmarketcap: process.env.COINMARKETCAP_API,
gasPriceApi: process.env.BINANCE_GAS_API,
},
};