forked from 20Scoops-CNX/solidity-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtruffle.js
50 lines (47 loc) · 1.13 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
require('dotenv').config({
path: require('path').join(__dirname, '.env.truffle.local')
});
var HDWalletProvider = require('truffle-hdwallet-provider');
function getProvider(networkUrl) {
return new HDWalletProvider(process.env.NMEMONIC, networkUrl);
}
module.exports = {
solc: {
optimizer: {
enabled: true,
runs: 2000
}
},
mocha: {
useColors: true,
enableTimeouts: false
},
networks: {
development: {
host: 'localhost',
port: 8545,
network_id: '*',
from: '0xd77c534aed04d7ce34cd425073a033db4fbe6a9d'
},
production: {
provider: () => getProvider(process.env.MAINNET_URL),
network_id: '1',
from: process.env.ADDRESS_DEPLOY
},
ropsten: {
provider: () => getProvider(process.env.ROPSTEN_URL),
network_id: '3',
from: process.env.ADDRESS_DEPLOY
},
rinkeby: {
provider: () => getProvider(process.env.RINKEBY_URL),
network_id: '4',
from: process.env.ADDRESS_DEPLOY
},
kovan: {
provider: () => getProvider(process.env.KOVAN_URL),
network_id: '42',
from: process.env.ADDRESS_DEPLOY
}
}
};