-
Notifications
You must be signed in to change notification settings - Fork 66
/
Always_Vote_No.sh
34 lines (25 loc) · 1.01 KB
/
Always_Vote_No.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
#!/bin/bash
echo "=================================================="
echo " _ ______ ___ __________________";
echo " / |/ / __ \/ _ \/ __/ _/ __/_ __/";
echo " / / /_/ / // / _/_/ /_\ \ / / ";
echo "/_/|_/\____/____/___/___/___/ /_/ ";
echo -e "\e[0m"
echo "=================================================="
sleep 2
set -e
wallet="wallet" # your wallet name
current_proposal=$(quicksilverd q gov proposals -o json | jq -r '.proposals[] | select(.status == "PROPOSAL_STATUS_VOTING_PERIOD") | .proposal_id' | tail -n 1)
echo "Last proposal is: $current_proposal"
while true
do
last_proposal=$(quicksilverd q gov proposals -o json | jq -r '.proposals[] | select(.status == "PROPOSAL_STATUS_VOTING_PERIOD") | .proposal_id' | tail -n 1)
if [[ $current_proposal -lt $last_proposal ]]
then
echo "New proposal: $last_proposal"
echo "Voting NO..."
quicksilverd tx gov vote $last_proposal no --from $wallet -y
current_proposal=$last_proposal
fi
sleep 2
done