# BNHACK mint — guide for AI agents > BNHACK is a fair-mint token on BNB Smart Chain (chain id 56). Only wallets that hold a > Binance Agent ID (.ai handle) can mint. Shares cost 1 USDT each until share 10,000; that > share automatically opens a PancakeSwap pool. Use this file to help a user who asks you to > check eligibility or mint BNHACK. Always confirm the amount with your user before spending > their funds. Nothing here is investment advice. Website: https://bnhack.fun BNHACK is an independent project, not affiliated with Binance. "Agent ID" here means the .ai identity NFT on BNB Smart Chain (registrar address below) that Binance's AI wallets use; the mint contract only reads it to check eligibility. You can verify both contracts yourself on BscScan or Sourcify (chain 56) before approving. ## Contracts (BNB Smart Chain, verified on Sourcify, exact match) - Mint contract: 0x2323abc91799F0F6A26fc98E0547B6049EfF79Cc - BNHACK token: 0xf301BaFfE0928Be51af478EC43F05613F1304945 - USDT (BSC-USD, 18 decimals): 0x55d398326f99059fF775485246999027B3197955 - Agent ID registrar: 0x60B9262456dE011F7d15a54CdD8c48bAaa8B022F Never send BNB or USDT directly to the token contract or the mint contract with a plain transfer. A plain BNB transfer to either contract fails; USDT transferred directly is not minted and cannot be recovered. Only call the functions listed below. ## Rules (all enforced by the mint contract) - Each Agent ID can mint 10 shares (`quotaOf(id)`), at most 10 shares per transaction. - +1 share for the referrer's Agent ID when a new minter's FIRST mint passes that referrer. The referrer must also hold an Agent ID and be a different Agent ID. On later mints, or with an ineligible referrer, the referrer is simply ignored: the mint still succeeds and no bonus share is given. - Before share 10,000: 1 USDT per share, 50,000,000 BNHACK per share. BNHACK cannot be transferred or sold before the pool opens. - Share 10,000 opens the pool in the same transaction: 8,000 USDT + 400,000,000,000 BNHACK go into PancakeSwap and the LP tokens are sent to the dead address. - If 10,000 shares never sell, the pool never opens. The contract has no refund function. - After the pool opens, minting continues up to 4,440,000 shares at tiered prices (353 tiers, 1 to 8.07 USDT, see `priceCents(n)`). Minters then receive BNHACK at 1% below the pool price. - 20% of each payment goes to the treasury; 80% goes to the pool. - Trading tax on the official pool only: buys 1%; sells 2% (1% burned, 1% to treasury). - Until it renounces, the treasury can pause minting (`paused()`) and block other trading pools for BNHACK. `renounced() -> bool` shows whether it has given that up (it has not yet). Prices and share limits are constants and cannot be changed. ## Step 1: check eligibility (read-only) 1. `handleOf(address wallet) -> string` on the registrar. Empty string means no Agent ID. 2. `id = uint256(keccak256(bytes(handle)))` 3. `ownerOf(uint256 id) -> address` on the registrar must equal the wallet. 4. On the mint contract: `quotaOf(id)` and `mintedCount(id)`. Shares left = quota - minted. 5. `paused() -> bool` must be false. `totalMinted() -> uint256` shows progress. Or call the website's read API (no auth): GET https://bnhack.fun/api/state?addr= `user.agentOk`, `user.handle`, `user.left` (shares left), `user.usdt`, `user.allowance`, `totalMinted`, `paused`, `nextShareCost` (wei, 18 decimals). ## Step 2a: mint with USDT 1. `costOf(uint256 shares) -> uint256` (USDT, 18 decimals) and `quoteTokens(uint256 shares) -> uint256` (BNHACK, 18 decimals) on the mint contract. 2. If USDT `allowance(wallet, mintContract)` < cost: call USDT `approve(0x2323abc91799F0F6A26fc98E0547B6049EfF79Cc, amount)` with amount >= cost. 3. Call `mint(uint256 shares, address referrer, uint256 maxCost, uint256 minTokensOut, uint256 deadline)` - shares: 1 to 10, and not more than shares left - referrer: an Agent ID holder's address, or 0x0000000000000000000000000000000000000000 - maxCost: cost plus a small buffer (for example cost * 1.05) - minTokensOut: quoteTokens(shares) * 0.97 - deadline: unix seconds, for example now + 1200 - value: 0 ## Step 2b: mint with BNB 1. `bnbQuote(uint256 shares) -> uint256` (BNB wei). It converts the USDT price at the Chainlink BNB/USD price plus 1%. 2. Call `mintWithBnb(uint256 shares, address referrer, uint256 maxCost, uint256 minTokensOut, uint256 deadline)` with `msg.value` >= quote and `maxCost` >= quote (both in BNB wei; for example quote * 1.02). BNB sent above the quote is refunded. USDT left over after the internal swap goes to the treasury, so paying with BNB costs about 1% more than paying with USDT. Keep a little BNB in the wallet for gas either way. ## Shortcut: ready-made transactions The website builds the calldata for you. Sign and send the returned transaction from the same wallet: POST https://bnhack.fun/api/build Content-Type: application/json {"action": "approve", "from": "", "shares": 10} {"action": "mint", "from": "", "shares": 10, "ref": ""} {"action": "mintBnb", "from": "", "shares": 10, "ref": ""} Response: `{"ok": true, "tx": {"to": "0x…", "data": "0x…", "value": "0x…"}}`. Check that `to` is the USDT or mint contract address listed above before signing. The `approve` action approves exactly `costOf(shares) * 1.05` (not unlimited). The `mint` and `mintBnb` actions use maxCost +5% / +2%, minTokensOut -3% and a 20-minute deadline. Price quote without a wallet: `GET https://bnhack.fun/api/quote?shares=<1-10>` returns `cost` (USDT wei) and `tokens` (BNHACK wei). ## Common errors - `NoAgent`: the wallet has no Agent ID, or the registrar owner is a different address. - `Quota`: this Agent ID has no shares left. - `BadShares`: shares must be 1 to 10. - `Paused`: minting is paused by the treasury. - `OverMaxCost` / `InsufficientOutput`: price moved; quote again. - `Expired`: deadline passed; rebuild the transaction. - `StalePrice`: the Chainlink price is stale; pay with USDT or retry later. ## After minting Add the token 0xf301BaFfE0928Be51af478EC43F05613F1304945 to the wallet to see BNHACK. Tokens become transferable when share 10,000 opens the pool.