-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtruffle.js
60 lines (55 loc) · 1.4 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
let mainnetProvider, e11Provider;
if (!process.env.SOLIDITY_COVERAGE && !process.env.SOLIDITY_TEST) {
const PrivateKeyProvider = require('truffle-privatekey-provider');
const deployConfig = require('./mocks/deploy-config');
mainnetProvider = new PrivateKeyProvider(deployConfig.mainnet.privateKey, deployConfig.mainnet.endpoint);
e11Provider = new PrivateKeyProvider(deployConfig.e11.privateKey, deployConfig.e11.endpoint);
}
let exportConfig = {
networks: {
development: {
host: "localhost",
port: 8545,
gas: 7000000,
network_id: "*"
},
mainnet: {
provider: mainnetProvider,
gasPrice: 10000000000,
network_id: "1"
},
e11: {
provider: e11Provider,
gasPrice: 1000000000,
network_id: "311001"
},
ganache: {
host: "localhost",
port: 8345,
gas: 7000000,
network_id: "*"
},
coverage: {
host: "localhost",
network_id: "*",
port: 8355, // <-- Use port 8555
gas: 0xfffffffffff, // <-- Use this high gas value
gasPrice: 0x01 // <-- Use this low gas price
}
},
solc: {
optimizer: {
enabled: true,
runs: 200
}
}
};
if (!process.env.SOLIDITY_COVERAGE && !process.env.SOLIDITY_TEST) {
exportConfig.mocha = {
reporter: 'eth-gas-reporter',
reporterOptions : {
currency: 'USD',
}
};
}
module.exports = exportConfig;