-
Notifications
You must be signed in to change notification settings - Fork 73
/
truffle.js
75 lines (66 loc) · 2.1 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
const { toWei } = require('ethjs-unit');
const HDWalletProvider = require('truffle-hdwallet-provider');
const infuraConfigKovan = require('./infura_deploy_kovan.json');
const infuraConfigRinkeby = require('./infura_deploy_rinkeby.json');
const infuraConfigMainnet = require('./infura_deploy_mainnet.json');
module.exports = {
compilers: {
solc: {
version: "0.4.25",
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
}
},
mocha: {
reporter: 'eth-gas-reporter',
reporterOptions: {
currency: 'USD',
gasPrice: 10
}
},
networks: {
kovan: {
provider() {
return new HDWalletProvider(infuraConfigKovan.privateKey, infuraConfigKovan.infuraUrl);
},
from: infuraConfigKovan.fromAddress,
network_id: 42,
gasPrice: toWei(10, 'gwei').toNumber(),
gas: toWei(7, 'mwei').toNumber(),
confirmations: 2,
skipDryRun: true
},
rinkeby: {
provider() {
return new HDWalletProvider(infuraConfigRinkeby.privateKey, infuraConfigRinkeby.infuraUrl);
},
from: infuraConfigRinkeby.fromAddress,
network_id: 4,
gasPrice: toWei(10, 'gwei').toNumber(),
gas: toWei(6.8, 'mwei').toNumber(),
confirmations: 2,
skipDryRun: true
},
mainnet: {
provider() {
return new HDWalletProvider(infuraConfigMainnet.privateKey, infuraConfigMainnet.infuraUrl);
},
from: infuraConfigMainnet.fromAddress,
network_id: 1,
gasPrice: toWei(10, 'gwei').toNumber(),
gas: toWei(7, 'mwei').toNumber(),
confirmations: 2,
skipDryRun: true
},
development: {
host: "127.0.0.1",
port: 8545,
network_id: "*",
websockets: true
}
}
};