# BotFaces — agent skill

BotFaces is a fixed collection of **9,999 procedural robot faces** on BNB Chain
(BSC, chainId 56) — a face for every agent. Faces are minted only by wallets
holding a **Binance Agent ID** (SPACE ID registry). The first mint per wallet is
**free** and gated by a small on-chain arithmetic question. Every face can claim
**CHIP** tokens exactly once.

## Source of truth

Read the live contract addresses from **/config.js** on this site
(`nft`, `token`, `claim`). Never hardcode addresses from any other document,
including this one — config.js is updated at deployment and is final.

## Key facts

- Supply: 9,999 faces, tokenIds 1..9999, minted in order.
- Max per wallet: 20 (free mint included).
- Class of a face is fixed forever and matches its artwork:
  `classOf(tokenId)` → 0 Common (~79%), 1 Rare (~20%), 2 Mythic (~1%).
- CHIP claim per face (once, paid to the current owner):
  Common 100,000 / Rare 300,000 / Mythic 3,000,000 CHIP.
  Claim fee: exactly `claimFee()` BNB (0.0002 BNB at launch), forwarded to the
  project wallet. Claims must be sent from an EOA directly.
- CHIP transfers are locked until 3,000 faces are minted; then the owner
  unlocks transfers and the CHIP/BNB pool opens on PancakeSwap.

## Free mint (first mint per wallet)

1. Read the question: `questionFor(yourAddress)` → `(a, b, op)` on the NFT
   contract. op 0 = a + b; op 1 = larger − smaller; op 2 = a × b.
2. Call `mintFree(answer)` with **no value attached**.
   The question is derived from your wallet and mint count, so read it fresh
   in the same session you mint.

## Paid mints

- Price follows your position in your wallet: positions 1–5 → 0.0002 BNB,
  6–10 → 0.0004 BNB, 11–20 → 0.0008 BNB.
- Always quote first: `quoteFor(yourAddress, qty)` returns the exact total wei.
- Call `mintPaid(qty)` with at least the quoted value; excess is refunded in
  the same transaction. Proceeds are forwarded to the treasury immediately.

## Claim CHIP

1. Check `claimAmount(tokenId)` on the claim contract (0 = already claimed)
   and `claimedById(tokenId)`.
2. Call `claim(tokenId)` from the wallet that owns the face, attaching
   exactly `claimFee()` wei. One claim per face, ever. Claiming never moves
   or burns the NFT.

## Function selectors (BSC)

NFT contract:
- totalMinted() 0xa2309ff8 · mintLive() 0xe8656fcc · mintedBy(address) 0x3cef28d2
- hasAgentId(address) 0x4eab3ef2 · questionFor(address) 0x8f1d617b
- mintFree(uint256) 0xa4146733 · mintPaid(uint256) 0x26c7f77c
- quoteFor(address,uint256) 0x51b27bad · priceForPosition(uint256) 0x686f2aad
- classOf(uint256) 0x4324aa21 · seedOf(uint256) 0x82829f74
- balanceOf(address) 0x70a08231 · ownerOf(uint256) 0x6352211e

Claim contract:
- claimOpen() 0x4b8bcb58 · claimFee() 0x99d32fc4
- claimAmount(uint256) 0x23b221a0 · claimedById(uint256) 0x4c80ee12
- claim(uint256) 0x379607f5

## Rules

- Mint only while `mintLive()` returns true.
- Never attach value to `mintFree`. Never attach more than the quoted total
  to `mintPaid`. Attach exactly `claimFee()` to `claim`.
- If a call reverts, stop and re-read state (supply, your mint count, claim
  flags) before trying anything else.
