/
hardhat.config.js
88 lines (86 loc) · 1.93 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
require("@openzeppelin/hardhat-upgrades");
require("@nomicfoundation/hardhat-toolbox");
const { privateKey } = require("./secrets.json");
const { getForkingConfig } = require("./fork.configs");
// Forking configs: modify the values to determine the forking chain and block number
const forkConfig = getForkingConfig();
module.exports = {
networks: {
localhost: {
chainId: 31337,
url: "http://127.0.0.1:8545",
},
hardhat: {
forking: {
url: forkConfig.RPCNode,
blockNumber: forkConfig.blockNumber,
},
},
testnet: {
url: "https://data-seed-prebsc-1-s1.binance.org:8545/",
chainId: 97,
gasPrice: 10000000000,
accounts: [privateKey],
},
mainnet: {
url: "https://bsc-dataseed.binance.org/",
chainId: 56,
gasPrice: 3000000000, // 3 gwei
accounts: [privateKey],
},
arbmainnet: {
url: "https://arb1.arbitrum.io/rpc",
chainId: 42161,
gasPrice: 100000000, // 0.1 gwei
accounts: [privateKey],
},
polygonmainnet: {
url: "https://polygon-mainnet.g.alchemy.com/v2/jydIA5GrZHPUZRsNAxE3HFgMtIEny2os",
chainId: 137,
gasPrice: 60000000000, // 50 gwei
accounts: [privateKey],
},
},
solidity: {
compilers: [
{
version: "0.6.6",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
{
version: "0.6.12",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
{
version: "0.8.19",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
paths: {
sources: "./contracts",
tests: "./test",
cache: "./cache",
artifacts: "./artifacts",
},
gasReporter: {
enabled: false,
currency: "ETH",
gasPrice: 0.1,
}
};