-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathhardhat.config.js
114 lines (109 loc) · 3.15 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
require('@nomiclabs/hardhat-waffle');
require('@openzeppelin/hardhat-upgrades');
//require('hardhat-gas-reporter');
const config = require('./.private.json');
// This is a sample Hardhat task. To learn how to create your own go to
// https://hardhat.org/guides/create-task.html
task('accounts', 'Prints the list of accounts', async () => {
const accounts = await ethers.getSigners();
for (const account of accounts) {
console.log(account.address);
}
});
// You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn more
/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
solidity: {
compilers: [
{
version: '0.7.6',
settings: {
optimizer: {
enabled: true,
runs: 800,
},
metadata: {
// do not include the metadata hash, since this is machine dependent
// and we want all generated code to be deterministic
// https://docs.soliditylang.org/en/v0.7.6/metadata.html
bytecodeHash: 'none',
},
}
},
{
version: '0.8.13',
settings: {
optimizer: {
enabled: true,
runs: 888888
}
}
}
]
},
networks: {
mainnet: {
url: `${config.infura.mainnet.url}`,
accounts: [config.account.mainnet.key, config.account.mainnet.userA, config.account.mainnet.userB],
initialBaseFeePerGas: 99e9,
timeout: 2000000000
},
ropsten: {
url: `${config.infura.ropsten.url}`,
accounts: [config.account.ropsten.key, config.account.ropsten.userA, config.account.ropsten.userB],
gasPrice: 1e9,
timeout: 2000000000
},
rinkeby: {
url: `${config.infura.rinkeby.url}`,
accounts: [config.account.rinkeby.key, config.account.rinkeby.userA, config.account.rinkeby.userB],
initialBaseFeePerGas: 1e9,
gas: 6e6,
timeout: 2000000000
},
kovan: {
url: `${config.infura.kovan.url}`,
accounts: [config.account.kovan.key, config.account.kovan.userA, config.account.kovan.userB],
initialBaseFeePerGas: 1e9,
timeout: 2000000000
},
bsc_test: {
url: "https://data-seed-prebsc-1-s1.binance.org:8545",
chainId: 97,
gasPrice: 10e9,
gas: 6000000,
accounts: [config.account.bsc_test.key, config.account.bsc_test.userA, config.account.bsc_test.userB],
timeout: 2000000000
},
bsc_main: {
url: "https://bsc-dataseed1.defibit.io/",
chainId: 56,
gasPrice: 5e9,
gas: 6000000,
accounts: [config.account.bsc_main.key, config.account.bsc_main.userA, config.account.bsc_main.userB],
timeout: 2000000000
},
mumbai: {
url: "https://matic-mumbai.chainstacklabs.com",
chainId: 80001,
initialBaseFeePerGas: 5e9,
gas: 6000000,
accounts: [config.account.mumbai.key, config.account.mumbai.userA, config.account.mumbai.userB],
timeout: 2000000000
},
hardhat: {
gas: 6000000,
gasPrice: 0
}
},
mocha: {
timeout: 200000000
},
// gasReporter: {
// currency: 'CHF',
// gasPrice: 1
// }
};