-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathtruffle.js
More file actions
58 lines (56 loc) · 1.31 KB
/
truffle.js
File metadata and controls
58 lines (56 loc) · 1.31 KB
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
const PrivateKeyProvider = require('truffle-privatekey-provider');
const ethPrivateKey = process.env.ETH_PK;
const infuraId = process.env.INFURA_ID || '';
module.exports = {
// See <http://truffleframework.com/docs/advanced/configuration>
// to customize your Truffle configuration!
compilers: {
solc: {
version: "^0.4.0"
}
},
networks: {
// ganache-cli
development: {
host: '127.0.0.1',
port: 8545,
network_id: '*',
},
// truffle develop
develop: {
host: '127.0.0.1',
port: 9545,
network_id: '*',
},
// Ganache UI
ganacheUI: {
host: '127.0.0.1',
port: 7545,
network_id: '*',
},
// rinkeby
rinkeby: {
provider: () =>
new PrivateKeyProvider(
ethPrivateKey,
`https://rinkeby.infura.io/${infuraId}`,
),
network_id: 4,
gas: 1000000,
gasPrice: 4000000000,
},
// live Ethereum network
live: {
provider: () =>
new PrivateKeyProvider(
ethPrivateKey,
`https://mainnet.infura.io/${infuraId}`,
),
network_id: 1,
// Set the gas and gasPrice very carefully.
// If set incorrectly they can prevent deploys, or clean out your account!
gas: 1000000,
gasPrice: 4000000000,
},
},
};