Skip to content

Instantly share code, notes, and snippets.

View ccamel's full-sized avatar
🧙‍♂️
Coding for the commons, crafting for the curious.

Chris ccamel

🧙‍♂️
Coding for the commons, crafting for the curious.
View GitHub Profile
@ccamel
ccamel / axone_wasm_scry.sh.sh
Created January 31, 2025 22:20
Bash sorcery to summon all WASM contracts from the Axone chain and unveil their real nature
#!/bin/bash
set -e -o pipefail
node="https://api.dentrite.axone.xyz:443/rpc"
contractInfoKey=$(echo -n "contract_info" | xxd -p -u) # 636F6E74726163745F696E666F (https://github.com/CosmWasm/cw-minus/blob/main/packages/cw2/README.md)
for code_id in $(
axoned query wasm list-code --node "$node" -o json \
| jq -r ".code_infos[].code_id"
); do
@ccamel
ccamel / axone-airdrop-fetch-pops.sh
Last active February 26, 2025 09:00
One-liner to conjure all Axone airdrop giga-chads — proof of participation on-chain (https://airdrop.axone.xyz)
( export NODE="https://api.dentrite.axone.xyz:443/rpc"; \
export CONTRACT="axone1xa8wemfrzq03tkwqxnv9lun7rceec7wuhh8x3qjgxkaaj5fl50zsmj8u0n"; \
export ISSUER="did:key:z6Mkp82tKskXNN2i9XaGH6ure3zmiUzsHikAtasneKsNqRpc"; \
export EPOCH_START="1740436200"; \
axoned query wasm contract-state smart \
"$CONTRACT" \
"$(jq -n --arg epochStart "$EPOCH_START" --arg issuer "$ISSUER" \
'{
"select": {
"query": {
@ccamel
ccamel / axone_cognitarium_stats.sh
Last active March 5, 2025 16:49
One-liner sorcery to rip stats from the Axone Cognitarium smart contract (🔗 https://axone.xyz)
( 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=" +