-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhardhat.config.js
93 lines (88 loc) · 2.11 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
require("@nomiclabs/hardhat-waffle");
require("@nomiclabs/hardhat-etherscan");
require('@openzeppelin/hardhat-upgrades');
require('hardhat-contract-sizer');
require("hardhat-laika");
require('dotenv').config()
/**
* @type import('hardhat/config').HardhatUserConfig
*/
const data = require("./secrets.json");
const INFURA_API_KEY = data.INFURA_API_KEY;
const ROPSTEN_PRIVATE_KEY = data.ROPSTEN_PRIVATE_KEY;
const ETHERSCAN_KEY = data.ETHERSCAN_KEY;
task("accounts", "Prints the list of accounts", async () => {
const accounts = await ethers.getSigners();
for (const account of accounts) {
console.log(account.address);
}
});
/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
solidity: {
compilers: [
{
version: "0.8.4",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
{
version: "0.7.3",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
{
version: "0.5.16",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
//defaultNetwork: 'hardhat',
networks: {
hardhat: {
gasPrice: 878000000,
mining: {
auto: true,
interval: 0,
},
loggingEnabled: true,
blockGasLimit: 12000000,
accounts: [{privateKey: `${ROPSTEN_PRIVATE_KEY}`, balance: '100000000000000000000'}]
},
ropsten: {
url: `https://ropsten.infura.io/v3/${INFURA_API_KEY}`,
accounts: [`${ROPSTEN_PRIVATE_KEY}`],
},
rinkeby: {
url: `https://rinkeby.infura.io/v3/${INFURA_API_KEY}`,
accounts: [`${ROPSTEN_PRIVATE_KEY}`],
},
mumbai: {
url: `https://polygon-mumbai.infura.io/v3/${INFURA_API_KEY}`,
gasPrice: 90000000000,
accounts: [`${ROPSTEN_PRIVATE_KEY}`]
},
polygon: {
url: `https://polygon-mainnet.infura.io/v3/${INFURA_API_KEY}`,
accounts: [`${ROPSTEN_PRIVATE_KEY}`]
}
},
etherscan: {
apiKey: ETHERSCAN_KEY,
},
};