-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathtruffle-config.js
67 lines (63 loc) · 1.68 KB
/
truffle-config.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
/* eslint-disable import/no-extraneous-dependencies */
require('@babel/register')
require('core-js/stable')
require('regenerator-runtime/runtime')
require('dotenv').config();
const HDWalletProvider = require('truffle-hdwallet-provider');
const { RINKEBY_MNEMONIC, MAINNET_MNEMONIC, INFURA_PROJECT_ID } = process.env;
module.exports = {
// Configure your compilers
compilers: {
solc: {
version: '0.5.2',
settings: {
optimizer: {
enabled: true,
runs: 2,
},
// TODO: the code is supposed to work on constantinople EVM but fails if this is switched on
evmVersion: 'byzantium',
},
},
},
// See <http://truffleframework.com/docs/advanced/configuration>
// to customize your Truffle configuration!
networks: {
development: {
host: 'localhost',
port: 8545,
network_id: '*' // match any network
},
mainnet: {
provider: () => new HDWalletProvider(
MAINNET_MNEMONIC, `https://mainnet.infura.io/v3/${INFURA_PROJECT_ID}`, 0, 2,
),
network_id: '1',
// hard gas limit
gas: 6500000,
gasPrice: 5000000000 // Specified in Wei
},
rinkeby: {
provider: () => new HDWalletProvider(
RINKEBY_MNEMONIC, `https://rinkeby.infura.io/v3/${INFURA_PROJECT_ID}`, 0, 2,
),
network_id: '4',
// hard gas limit
gas: 6500000,
// 3 Gwei
gasPrice: 3000000000
},
ganache: {
host: 'localhost',
port: 8545,
network_id: 5777
},
coverage: {
host: 'localhost',
port: 8555,
network_id: '*', // eslint-disable-line camelcase
gas: 0xfffffffffffff,
gasPrice: 0x01,
},
}
}