-
Notifications
You must be signed in to change notification settings - Fork 31
/
config.sh
63 lines (49 loc) · 1.35 KB
/
config.sh
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
#!/bin/bash
set -e -o pipefail
BIN_DIR=./build/bin
RAZOR=${BIN_DIR}/razor
read -rp "Provider: (http://127.0.0.1:8545) " PROVIDER
if [ -z "$PROVIDER" ];
then
PROVIDER="http://127.0.0.1:8545"
fi
read -rp "Alternate Provider: " ALTERNATE_PROVIDER
read -rp "Gas Multiplier: (1.0) " GAS_MULTIPLIER
if [ -z "$GAS_MULTIPLIER" ];
then
GAS_MULTIPLIER=1.0
fi
read -rp "Buffer Percent: (5) " BUFFER
if [ -z "$BUFFER" ];
then
BUFFER=5
fi
read -rp "Wait Time: (1) " WAIT_TIME
if [ -z "$WAIT_TIME" ]; then
WAIT_TIME=1
fi
read -rp "Gas Price: (1) " GAS_PRICE
if [ -z "$GAS_PRICE" ]; then
GAS_PRICE=1
fi
read -rp "Gas Limit Increment : (2) " GAS_LIMIT
if [ -z "$GAS_LIMIT" ]; then
GAS_LIMIT=2
fi
read -rp "Log File Max Size: (200) " MAX_SIZE
if [ -z "$MAX_SIZE" ]; then
MAX_SIZE=200
fi
read -rp "Log Files Max Backups: (10) " MAX_BACKUPS
if [ -z "$MAX_BACKUPS" ]; then
MAX_BACKUPS=10
fi
read -rp "Log Files Max Age: (60) " MAX_AGE
if [ -z "$MAX_AGE" ]; then
MAX_AGE=60
fi
ALT_PROVIDER_OPTION=""
if [ -n "$ALTERNATE_PROVIDER" ]; then
ALT_PROVIDER_OPTION="--alternateProvider $ALTERNATE_PROVIDER"
fi
$RAZOR setConfig -p $PROVIDER $ALT_PROVIDER_OPTION -b $BUFFER -g $GAS_MULTIPLIER -w $WAIT_TIME --gasprice $GAS_PRICE --gasLimit $GAS_LIMIT --rpcTimeout 5 --httpTimeout 5 --logFileMaxSize $MAX_SIZE --logFileMaxBackups $MAX_BACKUPS --logFileMaxAge $MAX_AGE