-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtruffle.js
82 lines (81 loc) · 2.14 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
var fs = require("fs");
var HDWalletProvider = require("truffle-hdwallet-provider");
var mnemonic = "your mnemonic phases here.";
// or you may read your mnemonic phases from a file:
// var mnemonic = fs.readFileSync(process.env.HOME + "/priv/mnemonic.txt", "utf8");
// console.log("mnemonic", mnemonic);
module.exports = {
compilers: {
solc: {
settings: {
optimizer: {
enabled: true,
runs: 10000
}
},
version: "0.5.7"
}
},
networks: {
live: {
host: "localhost",
port: 8546,
network_id: '1', // main-net
gasPrice: 5000000000
},
testnet: {
host: "localhost",
port: 8545,
network_id: '2', // main-net
gasPrice: 21000000000
},
ropsten: {
network_id: 3,
provider: function() {
var provider = new HDWalletProvider(mnemonic, "https://ropsten.infura.io/hM4sFGiBdqbnGTxk5YT2", 1);
// console.log("addresses:", provider.getAddresses());
// my address: 0xe8c5366C6f9Dc800cae753804CCbf1B6Ffa666fa
return provider;
},
gasPrice: 21000000000
},
rinkeby: {
network_id: 4,
provider: function() {
return new HDWalletProvider(mnemonic, "https://rinkeby.infura.io/hM4sFGiBdqbnGTxk5YT2", 1);
},
gasPrice: 1000000000,
gas: 6700000
},
priv: {
host: "localhost",
port: 8545,
network_id: '50', // main-net
gasPrice: 5000000000,
gas: 4500000
},
development: {
host: "localhost",
port: 8545,
network_id: "*", // Match any network id
gasPrice: 21000000000,
gas: 6700000
},
coverage: {
host: "localhost",
network_id: "*",
port: 8555, // <-- If you change this, also set the port option in .solcover.js.
gas: 0xfffffffffff, // <-- Use this high gas value
gasPrice: 0x01 // <-- Use this low gas price
},
docker: {
host: "ganache",
port: 8545,
network_id: "*", // Match any network id
gasPrice: 21000000000,
gas: 6700000
}
},
test_directory: 'transpiled/test',
migrations_directory: 'transpiled/migrations',
};