LeoYeAI/agent-master-skills / skills/aavegotchi-baazaar
aavegotchi-baazaar
VerifiedView, add, and execute Aavegotchi Baazaar listings on Base mainnet (8453). Buy with GHST directly or buy with USDC using swapAndBuy*. Safety-first: dryRun defaults true (simulate with cast call; only broadcast with cast send when dryRun=false / DRY_RUN=0).
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 15.9 KB |
| _meta.json | config | 649 B |
| references/addresses.md | markdown | 1.0 KB |
| references/categories.md | markdown | 457 B |
| references/recipes.md | markdown | 3.7 KB |
| references/subgraph.md | markdown | 2.3 KB |
| references/usdc-swap-math.md | markdown | 1.9 KB |
references/recipes.md
View on GitHub# Common Recipes (Foundry cast)
Commands below use `~/.foundry/bin/cast` so they work in cron/non-interactive shells. If `cast` is on `PATH`, you can replace `~/.foundry/bin/cast` with `cast`.
Assumes you set defaults from `references/addresses.md`.
## Safety Checks
Verify chain id is Base mainnet (must be `8453`):
```bash
~/.foundry/bin/cast chain-id --rpc-url "${BASE_MAINNET_RPC:-https://mainnet.base.org}"
```
Verify private key corresponds to FROM_ADDRESS (must match exactly):
```bash
~/.foundry/bin/cast wallet address --private-key "$PRIVATE_KEY"
```
## ERC20: Balances / Allowances
GHST balance:
```bash
~/.foundry/bin/cast call "$GHST" 'balanceOf(address)(uint256)' "$FROM_ADDRESS" --rpc-url "$BASE_MAINNET_RPC"
```
USDC balance:
```bash
~/.foundry/bin/cast call "$USDC" 'balanceOf(address)(uint256)' "$FROM_ADDRESS" --rpc-url "$BASE_MAINNET_RPC"
```
GHST allowance to Diamond:
```bash
~/.foundry/bin/cast call "$GHST" 'allowance(address,address)(uint256)' "$FROM_ADDRESS" "$DIAMOND" --rpc-url "$BASE_MAINNET_RPC"
```
USDC allowance to Diamond:
```bash
~/.foundry/bin/cast call "$USDC" 'allowance(address,address)(uint256)' "$FROM_ADDRESS" "$DIAMOND" --rpc-url "$BASE_MAINNET_RPC"
```
Approve GHST (broadcast; do this only when explicitly instructed):
```bash
~/.foundry/bin/cast send "$GHST" 'approve(address,uint256)' "$DIAMOND" "<AMOUNT_GHST_WEI>" \
--private-key "$PRIVATE_KEY" \
--rpc-url "$BASE_MAINNET_RPC"
```
Approve USDC (broadcast; do this only when explicitly instructed):
```bash
~/.foundry/bin/cast send "$USDC" 'approve(address,uint256)' "$DIAMOND" "<AMOUNT_USDC_6DP>" \
--private-key "$PRIVATE_KEY" \
--rpc-url "$BASE_MAINNET_RPC"
```
## ERC721 / ERC1155: Approval For All
Check (ERC721 or ERC1155 contract):
```bash
~/.foundry/bin/cast call "<NFT_CONTRACT_ADDRESS>" 'isApprovedForAll(address,address)(bool)' "$FROM_ADDRESS" "$DIAMOND" \
--rpc-url "$BASE_MAINNET_RPC"
```
Set approval (broadcast; do this only when explicitly instructed):
```bash
~/.foundry/bin/cast send "<NFT_CONTRACT_ADDRESS>" 'setApprovalForAll(address,bool)' "$DIAMOND" true \
--private-key "$PRIVATE_KEY" \
--rpc-url "$BASE_MAINNET_RPC"
```
## Listing Fee
Listing fee (GHST wei) on the Diamond:
```bash
~/.foundry/bin/cast call "$DIAMOND" 'getListingFeeInWei()(uint256)' --rpc-url "$BASE_MAINNET_RPC"
```
## Swap Deadline (now + 600)
```bash
python3 - <<'PY'
import time
print(int(time.time()) + 600)
PY
```
## Multiply Big Ints (ERC1155 total cost)
When total cost is `priceInWei * quantity` and values may exceed shell integer limits:
```bash
python3 - <<'PY'
price_in_wei = int("1000000000000000000") # replace
quantity = int("3") # replace
print(price_in_wei * quantity)
PY
```
## Fetch GHST/USD (CoinGecko)
```bash
curl -s 'https://api.coingecko.com/api/v3/simple/price?ids=aavegotchi&vs_currencies=usd' \
| python3 -c 'import json,sys; print(json.load(sys.stdin)[\"aavegotchi\"][\"usd\"])'
```
## Smoke Tests (No Funds Required)
These confirm function selectors exist on the Diamond (you should see a meaningful revert reason, not "Function does not exist").
Swap method exists:
```bash
~/.foundry/bin/cast call "$DIAMOND" \
'swapAndBuyERC1155(address,uint256,uint256,uint256,uint256,address,uint256,uint256,uint256,address)' \
"$USDC" 0 0 0 1 \
"$DIAMOND" 59 1 1000000000000000000000 \
0x000000000000000000000000000000000000dEaD \
--rpc-url "$BASE_MAINNET_RPC"
```
Execute method exists:
```bash
~/.foundry/bin/cast call "$DIAMOND" \
'executeERC1155ListingToRecipient(uint256,address,uint256,uint256,uint256,address)' \
1 "$DIAMOND" 59 1 1000000000000000000000 \
0x000000000000000000000000000000000000dEaD \
--from 0x000000000000000000000000000000000000dEaD \
--rpc-url "$BASE_MAINNET_RPC"
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |