-
Notifications
You must be signed in to change notification settings - Fork 2
/
truffle.js
62 lines (55 loc) · 1.72 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
const result = require('dotenv').config({ path: `${__dirname}/.env` });
var HDWalletProvider = require('truffle-hdwallet-provider'); // eslint-disable-line import/no-unresolved
var rinkebyMnemonic = process.env.TRUFFLE_MNEMONIC;
var liveMnemonic = process.env.LIVE_MNEMONIC;
module.exports = {
compilers: {
solc: {
version: '0.4.25',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
},
networks: {
development: {
host: 'localhost',
port: 8545,
gas: 4000000,
network_id: '*', // Match any network id
},
ganache: {
host: 'localhost',
port: 7545,
gas: 6000000,
network_id: '5777',
},
votingTest: {
host: 'localhost',
port: 7545,
gas: 6000000,
network_id: '5777',
},
rinkeby: {
host: 'localhost', // Connect to geth on the specified
port: 8545,
provider: () => new HDWalletProvider(rinkebyMnemonic, `https://rinkeby.infura.io/${process.env.RINKEBY_ACCESS_KEY}`),
network_id: 4,
gas: 6000000, // Gas limit used for deploys
websockets: true,
skipDryRun: true,
},
live: {
host: 'localhost',
port: 8545,
provider: () => new HDWalletProvider(liveMnemonic, `https://mainnet.infura.io/${process.env.MAINNET_ACCESS_KEY}`),
network_id: 1,
gas: 6000000, // Gas limit used for deploys
websockets: true,
skipDryRun: true,
},
},
};