Last active
September 5, 2018 21:08
-
-
Save fkbenjamin/79f8e15a3183f4bf8aa8437d05057cfa to your computer and use it in GitHub Desktop.
Alerts via SMS if a new proposal on the Cosmos Testnet is found.
This file contains 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 | |
phone=$1 | |
last_proposal=$(gaiacli gov query-proposals | tail -1) | |
echo "Queried last proposal" | |
echo $last_proposal | |
while true | |
do | |
sleep 10s | |
new_last_proposal=$(gaiacli gov query-proposals | tail -1) | |
if [ "$last_proposal" != "$new_last_proposal" ] | |
then | |
echo "New Proposal found" | |
echo "Send SMS to $phone" | |
curl -s -d "to=%2B$phone" -d "body=Found a new proposal! $new_last_proposal" https://utils.lib.id/sms@1.0.4/ | |
last_proposal=$new_last_proposal | |
echo "" | |
else | |
echo "No new Proposal $new_last_proposal" | |
fi | |
done |
Great stuff. Where can I get more information on utils.lib.id/sms ?
Thanks for the auto vote motivation, here is my implementation, it keeps the key passphrase off of the filesystem.
https://gist.github.com/BaryonNetwork/a3a252a698d1c38d369f57dbc3f3ec55
@BaryonNetwork You can find more info in the SMS lib at https://stdlib.com/@utils/lib/sms/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
for me i've set it up to get a setting from a file and vote only if im not around. The voting period is to small and i have to sleep, i've got slashed pretty bad yesterday from missing all the proposals.