forked from razor-network/oracle-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.sh
More file actions
46 lines (37 loc) · 889 Bytes
/
config.sh
File metadata and controls
46 lines (37 loc) · 889 Bytes
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
#!/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 "ChainId: (0x785B4B9847B9) " CHAIN_ID
if [ -z "$CHAIN_ID" ];
then
CHAIN_ID=0x785B4B9847B9
fi
read -rp "Gas Multiplier: (1.0) " GAS_MULTIPLIER
if [ -z "$GAS_MULTIPLIER" ];
then
GAS_MULTIPLIER=1.0
fi
read -rp "Buffer Percent: (20) " BUFFER
if [ -z "$BUFFER" ];
then
BUFFER=20
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
$RAZOR setConfig -p $PROVIDER -c $CHAIN_ID -b $BUFFER -g $GAS_MULTIPLIER -w $WAIT_TIME --gasprice $GAS_PRICE --gasLimit $GAS_LIMIT