forked from opengsn/gsn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
truffle.js
57 lines (54 loc) · 1.59 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
var HDWalletProvider = require("truffle-hdwallet-provider");
var mnemonic = "digital unknown jealous mother legal hedgehog save glory december universe spread figure custom found six"
package_json = require( './package.json' )
const secret_mnemonic_file = "./secret_mnemonic"
const fs=require('fs')
let secret_mnemonic
if (fs.existsSync(secret_mnemonic_file)) {
secret_mnemonic = fs.readFileSync(secret_mnemonic_file , {encoding:'utf8'})
}
module.exports = {
// See <http://truffleframework.com/docs/advanced/configuration>
// to customize your Truffle configuration!
networks: {
development: {
provider: undefined,
verbose: process.env.VERBOSE,
host: "127.0.0.1",
port: 8545,
network_id: "*"
},
coverage: { //coverage/trace provider. note that it currently can't run extrnal-process relay.
provider : require( './coverage-prov.js' ),
verbose: process.env.VERBOSE,
network_id: "*"
},
npmtest: { //used from "npm test". see pakcage.json
verbose: process.env.VERBOSE,
host: "127.0.0.1",
port: 8544,
network_id: "*",
},
ropsten: {
provider: function() {
return new HDWalletProvider(mnemonic, "https://ropsten.infura.io/v3/c3422181d0594697a38defe7706a1e5b")
},
network_id: 3
},
xdai_poa_mainnet: {
provider: function() {
let wallet = new HDWalletProvider(secret_mnemonic, "https://dai.poa.network")
return wallet
},
network_id: 100
}
},
mocha: {
slow: 1000
},
compilers: {
solc: {
version: package_json.devDependencies.solc
},
}
};