-
Notifications
You must be signed in to change notification settings - Fork 0
/
truffle-config.js
40 lines (33 loc) · 1007 Bytes
/
truffle-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
const HDWalletProvider = require('truffle-hdwallet-provider');
const NonceTrackerSubprovider = require("web3-provider-engine/subproviders/nonce-tracker")
const fs = require('fs');
const path = require('path');
const MNEMONIC = fs.readFileSync(".mnemonic").toString().trim();
var ENDPOINT = "https://volta-rpc.energyweb.org";
module.exports = {
// custom path for smart contracts metadata
contracts_build_directory: path.join(__dirname, 'app/src/assets/js/contracts'),
networks: {
development: {
host: "127.0.0.1",
port: 8545,
network_id: "*",
websockets: true
},
volta: {
provider: function () {
const wallet = new HDWalletProvider(MNEMONIC, ENDPOINT);
const nonceTracker = new NonceTrackerSubprovider()
wallet.engine._providers.unshift(nonceTracker)
nonceTracker.setEngine(wallet.engine)
return wallet
},
network_id: 73799
}
},
compilers: {
solc: {
// version: "0.5.1",
}
}
}