Tokenomics Inspection Cheatsheet
Bash RC helpers
There are a handful of useful bash helpers in the tools/rc_helpers directory.
source ./tools/rc_helpers/queries.shAvailable commands:
shannon_query_unique_tx_msgs_and_events - Get unique message and event types
shannon_query_unique_block_events - Get unique block events
...pocketd CLI queries
pocketd CLI queriesTo inspect various tokenomics params, you can query the tokenomics module:
pocketd q tokenomics --helpTo inspect onchain claims & proofs, you can query the proofs module:
pocketd q proofs --helpAvailable Onchain Events
You can find all available events by running:
grep -r "message Event" ./proto/pocket/tokenomicsAnd filter for the events you're interested in inspecting either onchain txs:
pocketd q txs --helpOr onchain blocks:
pocketd q block-results --helpViewing Account Balance over time
The following is an example of how to view the balance of pokt1lla0yhjf2fhzrlgu6le3ymw9aqayepxlx3lf4q from height 205950 to 210000 in 30 height increments:
for ((h=205950; h<=210000; h+=30)); do
echo -n "Height $h: "
curl -s -H "x-cosmos-block-height: $h" https://shannon-grove-api.mainnet.poktroll.com/cosmos/bank/v1beta1/balances/pokt1lla0yhjf2fhzrlgu6le3ymw9aqayepxlx3lf4q \
| jq -r '.balances[0].amount // "0"'
doneInspecting Claim settlement in a specific block
If some block was used for claim settlement (e.g. 210033), you can download it like so:
pocketd query block-results 210033 --network=main -o json >> block_210033.jsonAnd identify all the events related to token transfers associated with a particular account (e.g. pokt1lla0yhjf2fhzrlgu6le3ymw9aqayepxlx3lf4q):
cat block_210033.json | jq -r '.finalize_block_events[]
| select(.type == "transfer")
| select(.attributes[]?
| select(.key == "recipient" and .value == "pokt1lla0yhjf2fhzrlgu6le3ymw9aqayepxlx3lf4q"))
| .attributes[]
| select(.key == "amount")
| .value'Additional links within this page:
Bash RC helpers: https://dev.poktroll.com/protocol/tokenomics/tokenomics_inspection_cheatsheet#bash-rc-helpers
pocketdCLI queries: https://dev.poktroll.com/protocol/tokenomics/tokenomics_inspection_cheatsheet#pocketd-cli-queriesAvailable Onchain Events: https://dev.poktroll.com/protocol/tokenomics/tokenomics_inspection_cheatsheet#available-onchain-events
Viewing Account Balance over time: https://dev.poktroll.com/protocol/tokenomics/tokenomics_inspection_cheatsheet#viewing-account-balance-over-time
Inspecting Claim settlement in a specific block: https://dev.poktroll.com/protocol/tokenomics/tokenomics_inspection_cheatsheet#inspecting-claim-settlement-in-a-specific-block
Was this helpful?
