-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathhardhat.config.js
73 lines (71 loc) · 1.96 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
require("@nomiclabs/hardhat-ethers");
require("@nomiclabs/hardhat-etherscan");
const fs = require('fs');
const privateKey = fs.readFileSync(".secret").toString().trim();
const polygonScanApi = fs.readFileSync(".polygonScanApi").toString().trim();
const moonScanApi = fs.readFileSync(".moonscanApi").toString().trim();
const ALCHEMY_URL = fs.readFileSync(".alchemyUrl").toString().trim();
const moralisNodes = require("./moralisNodes")
const etherscanKeys = require("./etherscan")
const AVAX_URL = fs.readFileSync(".avaxUrl").toString().trim();
module.exports = {
defaultNetwork: "matic",
networks: {
hardhat: {
},
mumbai: {
url: "https://rpc-mumbai.maticvigil.com",
accounts: [privateKey]
},
matic: {
url: ALCHEMY_URL,
accounts: [privateKey],
},
moonriver: {
url: "https://moonriver.api.onfinality.io/public",
accounts: [privateKey],
},
moonbeam: {
url: "https://rpc.api.moonbeam.network",
accounts: [privateKey],
},
bsc: {
url: moralisNodes?.bscMainnet || "https://bsc-dataseed2.binance.org",
accounts: [privateKey],
},
// bscTest: {
// url: moralisNodes?.bscTestnet || "https://bsc-dataseed2.binance.org",
// accounts: [privateKey],
// },
avax: {
url: moralisNodes?.avaxMainnet || AVAX_URL,
accounts: [privateKey],
},
ftm: {
url: moralisNodes?.ftmMainnet || "https://rpc2.fantom.network ",
accounts: [privateKey],
},
boba_rinkeby: {
url: "https://rinkeby.boba.network",
accounts: [privateKey],
},
},
etherscan: {
apiKey: {
moonriver: moonScanApi,
polygon: polygonScanApi,
bsc: etherscanKeys.bsc,
avalanche: etherscanKeys.avax,
opera: etherscanKeys.ftm,
}
},
solidity: {
version: "0.8.4",
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
}
}