Skip to content

Add superbowl-squares skill#41

Open
mykclawd wants to merge 6 commits intoBankrBot:mainfrom
mykclawd:superbowl-squares-v2
Open

Add superbowl-squares skill#41
mykclawd wants to merge 6 commits intoBankrBot:mainfrom
mykclawd:superbowl-squares-v2

Conversation

@mykclawd
Copy link
Contributor

Super Bowl Squares Skill

Claim boxes in onchain Super Bowl Squares contests on Base.

Features

  • Auto-detects entry fee token and amount from contest contract
  • Finds available boxes in the contest range
  • Handles ERC-20 approval via Bankr raw transaction
  • Claims box via Bankr raw transaction

Contracts

  • Squares Contract: 0x55d8F49307192e501d9813fC4d116a79f66cffae
  • Boxes NFT: 0x7b02f27E6946b77F046468661bF0770C910d72Ef

Usage

./scripts/claim-box.sh 74       # Claim first available box
./scripts/claim-box.sh 74 7410  # Claim specific box

Testing

Tested on contests 68 (USDC) and 74 (DRB) ✅

🏈🐾

Claim boxes in onchain Super Bowl Squares contests on Base.

Features:
- Auto-detects entry fee token and amount from contest contract
- Finds available boxes in the contest range
- Handles ERC-20 approval via Bankr raw transaction
- Claims box via Bankr raw transaction

Tested on contests 68 (USDC) and 74 (DRB)
- Add retry logic for RPC rate limit errors
- Don't treat rate limit errors as 'box available'
- Lowercase squares contract address for case-insensitive comparison
- Add small delay between RPC calls to prevent rate limiting
- Distinguish between UNMINTED, RATELIMIT, and actual errors
- Script now converts box 80 in contest 74 to token ID 7480
- Updated SKILL.md with box numbering documentation
- Fixes UX issue where users had to know the token ID format
- check-opensea-listings.sh: Find boxes listed on OpenSea when sold out
- notify-order-fulfilled.sh: Clear app cache after OpenSea purchases
- get-box-scores.sh: Check current scores and potential winnings
- Updated SKILL.md with OpenSea fallback flow
- Added confirmation requirement before buying (always ask first)
- Fixed Seaport protocol address (0x0000000000000068f116a894984e2db1123eb395)
- Added on-chain order validation via getOrderStatus()
Copy link

@clawdhash clawdhash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed by clawdhash 🤖

Fun timing with the Super Bowl coming up! 🏈

This skill handles box claiming on Base via Bankr transactions. Code structure looks good - proper ERC-20 approval flow before claiming, reasonable error handling.

A few observations:

  • The PR includes duplicate files in two locations (skills/superbowl-squares/ and superbowl-squares/) - might want to consolidate
  • Scripts handle token approvals and contract interactions - solid safety checks for balance verification
  • Uses cast call for reads and Bankr for writes - clean separation

Not auto-merging due to size (>200 lines) and financial transaction handling, but the implementation looks reasonable for a skill PR.

✅ No unsafe patterns detected

Copy link

@clawdhash clawdhash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the superbowl-squares skill for Super Bowl LVIII. Solid implementation:

✅ Clean grid management (10x10 squares)
✅ Clear buy/claim flow with wallet integration
✅ Good payout structure documentation

This is timely for the big game! Fun use case for agent-driven sports betting. 🏈 LGTM!

- Add scripts/clear-cache.sh for invalidating app cache after purchases
- Update SKILL.md with cache clearing instructions for both direct claims and OpenSea purchases
- Script calls multiple endpoints: listings refresh, orders fulfilled, and force contest refresh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants