-
Notifications
You must be signed in to change notification settings - Fork 0
/
truffle.js
58 lines (53 loc) · 1.39 KB
/
truffle.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
const HDWalletProvider = require("truffle-hdwallet-provider");
const LoomTruffleProvider = require("loom-truffle-provider");
const mnemonic = "YOUR MNEMONIC HERE";
module.exports = {
networks: {
development: {
host: "127.0.0.1",
port: 7545,
network_id: "*",
gas: 9500000,
},
mainnet: {
provider: function () {
return new HDWalletProvider(
mnemonic,
"https://mainnet.infura.io/v3/<YOUR_INFURA_API_KEY>"
);
},
network_id: "1",
},
rinkeby: {
provider: function () {
return new HDWalletProvider(
mnemonic,
"https://rinkeby.infura.io/v3/<YOUR_INFURA_API_KEY>"
);
},
network_id: 4,
},
loom_testnet: {
provider: function () {
const privateKey = "YOUR_PRIVATE_KEY";
const chainId = "extdev-plasma-us1";
const writeUrl = "wss://extdev-basechain-us1.dappchains.com/websocket";
const readUrl = "wss://extdev-basechain-us1.dappchains.com/queryws";
const loomTruffleProvider = new LoomTruffleProvider(
chainId,
writeUrl,
readUrl,
privateKey
);
loomTruffleProvider.createExtraAccountsFromMnemonic(mnemonic, 10);
return loomTruffleProvider;
},
network_id: "9545242630824",
},
},
compilers: {
solc: {
version: "0.4.25",
},
},
};