This repository was archived by the owner on Dec 14, 2022. It is now read-only.
forked from hCaptcha/eth-kvstore
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathtruffle.js
More file actions
60 lines (59 loc) · 1.39 KB
/
truffle.js
File metadata and controls
60 lines (59 loc) · 1.39 KB
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
require("dotenv").config();
const {
INFURA_TOKEN,
MNEMONIC,
ETH_HOST,
ETH_PORT,
POLYGON_PRIVATE_KEY,
} = process.env;
const HDWalletProvider = require("@truffle/hdwallet-provider");
module.exports = {
networks: {
development: {
host: ETH_HOST || "127.0.0.1",
port: ETH_PORT || 7545,
network_id: "*",
},
live: {
provider: () =>
new HDWalletProvider({
mnemonic: MNEMONIC,
providerOrUrl: `https://mainnet.infura.io/${INFURA_TOKEN}`,
}),
network_id: "1",
},
kovan: {
provider: () =>
new HDWalletProvider({
mnemonic: MNEMONIC,
providerOrUrl: `https://kovan.infura.io/${INFURA_TOKEN}`,
}),
network_id: "2",
},
ropsten: {
provider: () =>
new HDWalletProvider({
mnemonic: MNEMONIC,
providerOrUrl: `https://ropsten.infura.io/${INFURA_TOKEN}`,
}),
network_id: "3",
gas: 4700000,
},
rinkeby: {
provider: () =>
new HDWalletProvider({
mnemonic: MNEMONIC,
providerOrUrl: `https://rinkeby.infura.io/${INFURA_TOKEN}`,
}),
network_id: "4",
},
mumbai: {
provider: () =>
new HDWalletProvider({
privateKeys: [POLYGON_PRIVATE_KEY],
providerOrUrl: "https://matic-mumbai.chainstacklabs.com",
}),
network_id: 80001,
},
},
};