-
Notifications
You must be signed in to change notification settings - Fork 3
/
truffle.js
71 lines (67 loc) · 1.74 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
/*
* Copyright ©️ 2020 Curio AG (Company Number FL-0002.594.728-9)
* Incorporated and registered in Liechtenstein
*
* Copyright ©️ 2020 Curio Capital AG (Company Number CHE-211.446.654)
* Incorporated and registered in Zug, Switzerland.
*/
const HDWalletProvider = require('@truffle/hdwallet-provider');
const web3 = require('web3');
function getProvider(rpc) {
return function() {
const provider = new web3.providers.WebsocketProvider(rpc);
return new HDWalletProvider(process.env.DEPLOYMENT_KEY, provider);
};
}
const config = {
networks: {
soliditycoverage: {
host: '127.0.0.1',
port: 8555,
gasLimit: 9600000,
network_id: '*'
},
local: {
host: '127.0.0.1',
port: 8545,
network_id: '*'
},
kovan: {
gasPrice: 1000 * 1000 * 1000,
gasLimit: 10 * 1000 * 1000,
provider: getProvider('wss://wss-rpc.kovan.galtproject.io'),
// provider: getProvider('https://kovan.poa.network'),
// provider: getProvider('wss://kovan.infura.io/ws/v3/83ea24ff57c3420abe37f03312bbafc1'),
websockets: true,
skipDryRun: true,
network_id: '42'
},
test: {
// https://github.com/trufflesuite/ganache-core#usage
provider() {
// eslint-disable-next-line global-require
const { provider } = require('@openzeppelin/test-environment');
return provider;
},
skipDryRun: true,
network_id: '*'
}
},
mocha: {
timeout: 10000
},
compilers: {
solc: {
version: process.env.SOLC || '0.5.17',
settings: {
optimizer: {
enabled: true,
runs: 200
}
},
evmVersion: 'istanbul'
}
},
plugins: ['solidity-coverage']
};
module.exports = config;