# BNBGems — agent mint skill (Binance Agentic Wallet)

BNBGems: 1111 generative gems on BNB Chain (chainId 56). Only wallets holding a Binance Agent ID
(registry `0x60B9262456dE011F7d15a54CdD8c48bAaa8B022F`, `balanceOf(wallet) > 0`) can mint.
All 1111 are public. The first 1000 are free (gas only) and the last 111 cost 0.0008 BNB each (~$0.57). Max 5 per wallet.

Contract: `0x5dB3c0Bef60191Fce3169a0d2a4c7ed4438C7C3e` (also in https://bnbgems.pages.dev/config.json → `contract`). If `eth_getCode` returns `0x`, it is not deployed yet.

## Steps
1. Get the user's BSC wallet: `baw wallet address --json` (binanceChainId 56).
2. Check eligibility (eth_call on https://bsc-dataseed.binance.org):
   - Agent ID: registry `balanceOf(wallet)` (`0x70a08231`) must be > 0.
   - Already minted: `mintedBy(wallet)` (`0x3cef28d2`); quantity + minted ≤ 5.
   - Supply: `publicMinted()` (`0xa4f4f8af`) < 1111; `paused()` (`0x5c975abb`) false.
3. Exact price: `quote(quantity)` (`0xed1bd76c` + uint256). Returns wei. Send EXACTLY this value
   (a mint crossing the free boundary pays only for the paid part; any other value reverts).
4. Calldata: `mint(uint256)` = `0xa0712d68` + quantity as 32-byte hex.
   Example quantity 5: `0xa0712d680000000000000000000000000000000000000000000000000000000000000005`
5. Preview (value in wei, integer):
   `baw contract-call preview --binanceChainId 56 --from <wallet> --to <contract> --value <quote> --inputData <calldata> --json`
6. Show the user the preview (cost, NFTs received, risks). Only after explicit confirmation:
   `baw contract-call execute --requestId <requestId> --json`
7. Report the tx hash: https://bscscan.com/tx/<hash>

Never execute without the user's confirmation. Quote right before previewing — price changes once free supply runs out.


