-
Notifications
You must be signed in to change notification settings - Fork 1
/
truffle-config.js
95 lines (93 loc) · 2.59 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
require('dotenv').config();
const path = require('path');
// const HDWalletProvider = require("@truffle/hdwallet-provider");
const PrivateKeyProvider = require('truffle-privatekey-provider');
module.exports = {
contracts_build_directory : path.join(__dirname, "build/contracts"),
networks: {
development: {
host: 'localhost',
port: 8546,
gas: 6721975,
network_id: '*', // eslint-disable-line camelcase,
},
rootchain: {
host: 'localhost',
port: 8546,
gas: 7500000,
gasPrice: 1e9,
network_id: '*', // eslint-disable-line camelcase
websocket: true,
},
plasma: {
host: 'localhost',
port: 8547,
gas: 7500000,
gasPrice: 1e9,
network_id: '*', // eslint-disable-line camelcase
},
faraday: {
provider: () => new HDWalletProvider([process.env.FARADAY_PRIVATE_KEY], process.env.FARADAY_PROVIDER_URL),
network_id: 16, // eslint-disable-line camelcase
production: true,
},
rinkeby: {
provider: () => new PrivateKeyProvider(process.env.RINKEBY_PRIVATE_KEY, process.env.RINKEBY_PROVIDER_URL),
network_id: 4, // eslint-disable-line camelcase
gasPrice: 5e9,
skipDryRun: true,
},
ropsten: {
provider: () => new HDWalletProvider([process.env.ROPSTEN_PRIVATE_KEY], process.env.ROPSTEN_PROVIDER_URL),
network_id: 3, // eslint-disable-line camelcase
gasPrice: 100e9,
production: true,
skipDryRun: true,
},
mainnet: {
provider: () => new PrivateKeyProvider(process.env.MAINNET_PRIVATE_KEY, process.env.MAINNET_PROVIDER_URL),
network_id: 1, // eslint-disable-line camelcase
gasPrice: 100e9,
skipDryRun: true,
},
// ropsten: {
// provider: ropstenProvider,
// network_id: 3, // eslint-disable-line camelcase
// },
// coverage: {
// host: 'localhost',
// network_id: '*', // eslint-disable-line camelcase
// port: 8555,
// gas: 0xfffffffffff,
// gasPrice: 0x01,
// },
// ganache: {
// host: 'localhost',
// port: 8545,
// network_id: '*', // eslint-disable-line camelcase
// },
},
mocha: {
reporter: 'eth-gas-reporter',
reporterOptions: {
currency: 'USD',
gasPrice: 21,
},
useColors: true,
before_timeout: 520000 ,
enableTimeouts: false,
bail: true,
// Here is 2min but can be whatever timeout is suitable for you.
},
compilers: {
solc: {
version: '0.7.6',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
},
};