forked from opengsn/gsn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
truffle.js
48 lines (45 loc) · 1.32 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
var HDWalletProvider = require("truffle-hdwallet-provider");
var mnemonic = "digital unknown jealous mother legal hedgehog save glory december universe spread figure custom found six"
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: {
verbose: process.env.VERBOSE,
host: "127.0.0.1",
port: 8545,
network_id: "*",
//gas: 8000000,
gas:5000000,
gasPrice: 1000,
},
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
}
};