-
Notifications
You must be signed in to change notification settings - Fork 0
/
truffle-config.js
55 lines (54 loc) · 1.66 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
require('dotenv').config()
const path = require('path')
const web3 = require('web3')
const HDWalletProvider = require('@truffle/hdwallet-provider')
module.exports = {
// See <http://truffleframework.com/docs/advanced/configuration>
// to customize your Truffle configuration!
contracts_build_directory: path.join(__dirname, 'app/src/contracts'),
networks: {
development: {
host: '127.0.0.1', // Localhost (default: none)
port: 8545, // Standard Ethereum port (default: none)
network_id: '*' // Any network (default: none)
},
coverage: {
// The truffle test coverage plugin use port 8555
// A web3 provider is needed in migration files
provider: function () {
return new web3.providers.HttpProvider('http://127.0.0.1:8555')
},
port: 8555,
network_id: '*' // Any network (default: none)
},
ropsten: {
provider: function () {
return new HDWalletProvider(process.env.MNEMONIC, 'https://ropsten.infura.io/v3/' + process.env.INFURA_KEY)
},
network_id: 3,
skipDryRun: true,
networkCheckTimeout: 1e9
},
kovan: {
provider: function () {
return new HDWalletProvider(process.env.MNEMONIC, 'https://kovan.infura.io/v3/' + process.env.INFURA_KEY)
},
network_id: 42
}
},
// Configure your compilers
compilers: {
solc: {
version: '0.5.5' // Fetch exact version from solc-bin (default: truffle's version)
// optimizer: {
// enabled: true,
// runs: 200
// }
}
},
mocha: {
reporter: 'eth-gas-reporter'
// reporterOptions : { ... } // See options
},
plugins: ['solidity-coverage']
}