Skip to content

Instantly share code, notes, and snippets.

@justlstn
Created September 7, 2022 21:12
Show Gist options
  • Save justlstn/e4eacd27935be5abca81fa0677e79ff4 to your computer and use it in GitHub Desktop.
Save justlstn/e4eacd27935be5abca81fa0677e79ff4 to your computer and use it in GitHub Desktop.
[AIT] Check Aptos successful/failed proposals & rewards for each epoch
#/bin/sh
MAIN_ADDR="<main_account_addr>"
DATA_SOURCE="https://aptos-analytics-data-it3.s3.us-west-2.amazonaws.com/validator_epoch_history.json"
echo "Awaiting response... \n"
curl -s $DATA_SOURCE \
| jq -c "map ( select ( .validator_addr == \"$MAIN_ADDR\" ) )" \
| jq -r '"EPOCH\tFAILED\tSUCCESS\tEARNED_REWARDS\tMAX_REWARDS", "-----\t------\t-------\t--------------\t-----------", (.[] | "\(.epoch)\t\(.failed_proposal_count)\t\(.successful_proposal_count)\t\(.rewards_earned)\t\(.max_potential_reward)")'
@justlstn
Copy link
Author

justlstn commented Sep 7, 2022

  1. Download the script & make it executable
wget https://gist.githubusercontent.com/justlstn/e4eacd27935be5abca81fa0677e79ff4/raw/b7c76a77175675a75eb971c393b78ca172cb5e54/dashboard.sh \
&& sudo chmod +x ./dashboard.sh
  1. Update $MAIN_ADDR variable with your main account address
  2. Run the script
./dashboard.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment