You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
84 lines
2.2 KiB
84 lines
2.2 KiB
#!/bin/bash
|
|
# Remove BEER and PIZZA from splitfund as they are not notarized.
|
|
declare -a skip=("BEER" "PIZZA")
|
|
|
|
print_txid () {
|
|
echo -n $(echo $1 | jq -r .txid)
|
|
}
|
|
|
|
# Minimum number of UTXOs to maintain
|
|
MINUTXOS=10
|
|
|
|
# Amount of UTXOs to create at one time
|
|
SPLITAMNT=10
|
|
|
|
#Print Date and Time
|
|
now=$(date +"%Y-%m-%d %T%z")
|
|
echo $now
|
|
|
|
# Manual Check of CHIPS, KMD
|
|
echo "Checking GAME, CHIPS, KMD, VRSC"
|
|
cd ~
|
|
echo -n CHIPS
|
|
UTXOS="$(chips-cli listunspent | grep -c .00010000)"
|
|
echo -n -e '\t\t';echo -n "$UTXOS"
|
|
if [ "$UTXOS" -lt "$MINUTXOS" ]
|
|
then
|
|
echo -n " - SPLITFUNDING CHIPS: "
|
|
RESULT="$(acsplit CHIPS $SPLITAMNT)"
|
|
print_txid $RESULT
|
|
fi
|
|
echo ""
|
|
|
|
echo -n GAME
|
|
UTXOS="$(gc-cli listunspent | grep -c .00100000)"
|
|
echo -n -e '\t\t';echo -n "$UTXOS"
|
|
if [ "$UTXOS" -lt "15" ]
|
|
then
|
|
echo -n " - SPLITFUNDING GAME: "
|
|
RESULT=$(curl --silent --url "http://127.0.0.1:7776" --data "{\"coin\":\"GAME\",\"agent\":\"iguana\",\"method\":\"splitfunds\",\"satoshis\":\"100000\",\"sendflag\":1,\"duplicates\":"15"}")
|
|
print_txid $RESULT
|
|
fi
|
|
echo ""
|
|
|
|
echo -n KMD
|
|
UTXOS="$(komodo-cli listunspent | grep -c .00010000)"
|
|
echo -n -e '\t\t';echo -n "$UTXOS"
|
|
if [ "$UTXOS" -lt "77" ]
|
|
then
|
|
echo -n " - SPLITFUNDING KMD: "
|
|
RESULT="$(acsplit KMD 77)"
|
|
print_txid $RESULT
|
|
fi
|
|
echo ""
|
|
|
|
echo -n VRSC
|
|
UTXOS="$(komodo-cli -ac_name=VRSC listunspent | grep -c .00010000)"
|
|
echo -n -e '\t\t';echo -n "$UTXOS"
|
|
if [ "$UTXOS" -lt "$MINUTXOS" ]
|
|
then
|
|
echo -n " - SPLITFUNDING VRSC: "
|
|
RESULT="$(acsplit VRSC $SPLITAMNT)"
|
|
print_txid $RESULT
|
|
fi
|
|
echo ""
|
|
|
|
echo "Checking Other Coins"
|
|
# Check the rest of the coins using a loop
|
|
~/komodo/src/listassetchains | while read chain; do
|
|
if [[ " ${skip[@]} " =~ " ${chain} " ]]; then
|
|
pointless=0
|
|
else
|
|
echo -n $chain
|
|
UTXOS="$(komodo-cli -ac_name=$chain listunspent | grep -c .00010000)"
|
|
echo -n -e '\t\t';echo -n "$UTXOS"
|
|
if [ "$UTXOS" -lt "$MINUTXOS" ]; then
|
|
echo -n " - SPLITFUNDING $chain: "
|
|
RESULT="$(acsplit $chain $SPLITAMNT)"
|
|
print_txid $RESULT
|
|
fi
|
|
echo ""
|
|
fi
|
|
done
|
|
echo "--------------------------------------------------------------------------------------------------"
|
|
echo ""
|
|
|