Created
March 18, 2022 14:59
-
-
Save gadost/f0c12522f371b8b5b0fbebae2752d381 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
curl -s http://localhost:26657/dump_consensus_state | jq '.result.round_state.votes[0].prevotes' | awk '{print $1}' | grep -i "\"V" | cut -f 2 -d':' | sort > votedadresses | |
while read line; do curl -s http://localhost:26657/dump_consensus_state -s | grep $line -A4 | grep "\"value\"" |head -n1 | awk '{print $2}' >> votestkeys; done < votedadresses | |
curl -s http://localhost:26657/dump_consensus_state | grep "value" | awk '{print $2}' | sort |uniq > allvotes | |
while read line; do sed -i -e "s#$line##g" allvotes;done < votestkeys | |
cat allvotes | sort > filterednovotes | |
sed -i -e '/^[[:space:]]*$/d' filterednovotes | |
sed -i -e 's/"//g' filterednovotes | |
while read line; do gravity query staking validators --limit 1000 | grep $line -A11 | grep moniker; done < filterednovotes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment