-
Notifications
You must be signed in to change notification settings - Fork 0
/
truffle.js
74 lines (70 loc) · 2.28 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
require('dotenv').config()
require('babel-register')
require('babel-polyfill')
const Web3 = require('web3')
const web3 = new Web3()
const WalletProvider = require('truffle-wallet-provider')
const Wallet = require('ethereumjs-wallet')
const rinkebyPrivateKey = new Buffer(process.env['RINKEBY_PRIVATE_KEY'], 'hex')
const rinkebyWallet = Wallet.fromPrivateKey(rinkebyPrivateKey)
const rinkebyProvider = new WalletProvider(
rinkebyWallet,
'https://rinkeby.infura.io/'
)
const ropstenPrivateKey = new Buffer(process.env['ROPSTEN_PRIVATE_KEY'], 'hex')
const ropstenWallet = Wallet.fromPrivateKey(ropstenPrivateKey)
const ropstenProvider = new WalletProvider(
ropstenWallet,
'https://ropsten.infura.io/'
)
module.exports = {
migrations_directory: './migrations',
networks: {
development: {
host: 'localhost',
port: 9545,
network_id: '*', // Match any network id
},
coverage: {
host: 'localhost',
network_id: '*',
port: 9545, // <-- If you change this, also set the port option in .solcover.js.
gas: 0xfffffffffff, // <-- Use this high gas value
gasPrice: 0x01, // <-- Use this low gas price
},
ganache: {
host: '127.0.0.1',
port: 7545,
network_id: 5777,
},
ropsten: {
provider: ropstenProvider,
// You can get the current gasLimit by running
// truffle deploy --network rinkeby
// truffle(rinkeby)> web3.eth.getBlock("pending", (error, result) =>
// console.log(result.gasLimit))
gas: 4600000,
gasPrice: web3.toWei('20', 'gwei'),
network_id: 3,
},
rinkeby: {
provider: rinkebyProvider,
// You can get the current gasLimit by running
// truffle deploy --network rinkeby
// truffle(rinkeby)> web3.eth.getBlock("pending", (error, result) =>
// console.log(result.gasLimit))
gas: 6721975,
gasPrice: web3.toWei('50', 'gwei'),
network_id: '4',
},
},
solc: {
optimizer: {
enabled: true,
runs: 500,
},
},
mocha: {
enableTimeouts: false,
},
}