-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtronbox.js
More file actions
65 lines (62 loc) · 1.5 KB
/
tronbox.js
File metadata and controls
65 lines (62 loc) · 1.5 KB
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
const dotenv = require('dotenv');
const port = process.env.HOST_PORT || 9090;
const network = getNetwork();
dotenv.config({ path: network ? `.env.${network}` : '.env' });
module.exports = {
save: false,
networks: {
tron: {
// Don't put your private key here:
privateKey: process.env.PRIVATE_KEY,
userFeePercentage: 100,
feeLimit: 1000 * 1e6,
fullHost: 'https://api.trongrid.io',
network_id: '1',
},
shasta: {
privateKey: process.env.PRIVATE_KEY,
userFeePercentage: 50,
feeLimit: 1000 * 1e6,
gas: 500000,
fullHost: process.env.NODE_URL,
network_id: '2',
reset: true,
save: false,
},
nile: {
privateKey: process.env.PRIVATE_KEY,
userFeePercentage: 100,
feeLimit: 15000 * 1e6,
fullHost: process.env.NODE_URL,
network_id: '3',
},
development: {
// For trontools/quickstart docker image
privateKey: 'da146374a75310b9666e834ee4ad0866d6f4035967bfc76217c5a495fff9f0d0',
userFeePercentage: 0,
feeLimit: 1000 * 1e6,
fullHost: 'http://127.0.0.1:' + port,
network_id: '9',
},
compilers: {
solc: {
version: '0.8.20',
},
},
},
// solc compiler optimize
solc: {
viaIR: true,
optimizer: {
enabled: true,
runs: 200,
},
// evmVersion: 'istanbul'
},
};
function getNetwork() {
const keyIndex = process.argv.indexOf('--network');
if (keyIndex >= 0) {
return process.argv[keyIndex + 1];
}
}