-
Notifications
You must be signed in to change notification settings - Fork 5
/
truffle-config.js
64 lines (63 loc) · 2.31 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
const HDWalletProvider = require('@truffle/hdwallet-provider')
const NonceTrackerSubprovider = require('web3-provider-engine/subproviders/nonce-tracker')
const config = require('config')
const TestRPC = require('ganache-cli')
module.exports = {
networks: {
development: {
provider: TestRPC.provider( { gasLimit: 0xff6691b7 }),
network_id: '*'
},
testnet: {
provider: function () {
let w = new HDWalletProvider(config.get('testnet.truffle.privateKey'), config.get('testnet.blockchain.rpc'))
let nonceTracker = new NonceTrackerSubprovider()
w.engine._providers.unshift(nonceTracker)
nonceTracker.setEngine(w.engine)
return w
},
network_id: config.get('testnet.blockchain.networkId'),
port: 8545,
gas: 20000000,
gasPrice: 10000000000000
},
local_testnet: {
provider: function () {
let w = new HDWalletProvider(config.get('testnet-local.truffle.privateKey'), config.get('testnet-local.blockchain.rpc'))
let nonceTracker = new NonceTrackerSubprovider()
w.engine._providers.unshift(nonceTracker)
nonceTracker.setEngine(w.engine)
return w
},
network_id: config.get('testnet-local.blockchain.networkId'),
port: 8545,
gas: 20000000,
gasPrice: 10000000000000,
timeoutBlocks: 10000
},
mainnet: {
provider: function () {
let w = new HDWalletProvider(config.get('mainnet.truffle.privateKey'), config.get('mainnet.blockchain.rpc'))
let nonceTracker = new NonceTrackerSubprovider()
w.engine._providers.unshift(nonceTracker)
nonceTracker.setEngine(w.engine)
return w
},
network_id: config.get('mainnet.blockchain.networkId'),
port: 8545,
gas: 20000000,
gasPrice: 60000000000
},
},
compilers: {
solc: {
version: '^0.8.0',
settings: {
optimizer: {
enabled: true
}
}
}
},
plugins: [ "solidity-coverage" ]
}