-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtruffle-config.js
61 lines (59 loc) · 1.86 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
require('dotenv').config();
const Web3 = require('web3');
const web3 = new Web3();
const HDWalletProvider = require('@truffle/hdwallet-provider');
const NonceTrackerSubprovider = require('web3-provider-engine/subproviders/nonce-tracker');
const DEV_MNEMONIC = require('./DEV_MNEMONIC.js').MNEMONIC;
module.exports = {
// See <http://truffleframework.com/docs/advanced/configuration>
// for more about customizing your Truffle configuration!
networks: {
development: {
host: process.env.GANACHE_HOST || '127.0.0.1',
// host: "127.0.0.1",
port: 8545,
network_id: '*', // Match any network id,
//gas: 6721975,
gas: 6721975,
gasPrice: web3.utils.toWei('1', 'gwei'),
},
kovan_infura: {
// multi-client
provider: function () {
var wallet = new HDWalletProvider(
DEV_MNEMONIC,
'https://kovan.infura.io/v3/e16ecf41380f442987d31e736990fed2',
0,
1000,
);
var nonceTracker = new NonceTrackerSubprovider();
wallet.engine._providers.unshift(nonceTracker);
nonceTracker.setEngine(wallet.engine);
return wallet;
},
network_id: '*', // 3
gas: 9900000,
gasPrice: web3.utils.toWei('30', 'gwei'),
confirmations: 1,
skipDryRun: true,
timeoutBlocks: 100,
},
// Configure your compilers
compilers: {
solc: {
version: '0.6.6', // 0.5.13 // Fetch exact version from solc-bin (default: truffle's version)
docker: false, // Use "0.5.8" you've installed locally with docker (default: false)
settings: {
// See the solidity docs for advice about optimization and evmVersion
optimizer: {
enabled: true,
runs: 10,
},
evmVersion: 'byzantium',
},
},
},
all: false,
compileAll: false,
},
};