Last active
March 5, 2025 16:49
-
-
Save ccamel/75628fd9b042f30cfaaf2507338f9b50 to your computer and use it in GitHub Desktop.
One-liner sorcery to rip stats from the Axone Cognitarium smart contract (π https://axone.xyz)
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
( export CONTRACT="axone1xa8wemfrzq03tkwqxnv9lun7rceec7wuhh8x3qjgxkaaj5fl50zsmj8u0n"; \ | |
export NODE="https://axone-rpc.jayjayinfra.space/"; \ | |
axoned \ | |
--node "$NODE" \ | |
query wasm contract-state smart "$CONTRACT" \ | |
'{"store":{}}' \ | |
-o json \ | |
| jq -r ' | |
.data.stat as $stat | | |
"Triples=" + | |
($stat.triple_count | |
| tonumber | |
| tostring | |
| gsub("(?<=\\d)(?=(\\d{3})+$)"; " ")) + | |
"\nSize=" + | |
($stat.byte_size | |
| tonumber | |
| tostring | |
| gsub("(?<=\\d)(?=(\\d{3})+$)"; " ")) | |
' \ | |
| bat -p --language=DotENV ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment