forked from singnet/platform-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtruffle.js
57 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
let HDWalletProvider = require("truffle-hdwallet-provider");
let Web3 = require("web3");
let provider = (endpoint) => {
if (process.env.HDWALLET_MNEMONIC) {
return new HDWalletProvider(process.env.HDWALLET_MNEMONIC, endpoint);
} else {
return new Web3.providers.HttpProvider(endpoint);
}
}
let truffleOptions = {
networks: {
local: {
host: "127.0.0.1",
port: 8545,
network_id: "*" // Any network ID
},
develop : {
host: "127.0.0.1",
port: 9545,
network_id: "*",
},
localhd: {
provider: () => provider("http://127.0.0.1:8545"),
network_id: "*" // Any network ID
},
kovan: {
gasPrice: 500000000,
provider: () => provider("https://kovan.infura.io"),
network_id: "42" // Kovan network ID
},
},
mocha: {
reporter: 'eth-gas-reporter',
reporterOptions : {
currency: 'USD',
onlyCalledMethods: 'true',
showTimeSpent: 'true'
}
},
solc: {
optimizer: {
enabled: true,
runs: 200
}
}
};
let reporterArg = process.argv.indexOf('--reporter');
if (reporterArg >= 0) {
truffleOptions['mocha'] = {
reporter: process.argv[reporterArg + 1]
};
}
module.exports = truffleOptions;