---
name: agentry-inscription-minter
description: |
  Use when the user wants to mint, launch, deploy or check a BSC-20 inscription through the
  Binance Agentic Wallet (baw) — 铭文 / inscription / ordinals-style calldata assets on BNB
  Smart Chain. Covers: deploy the tick inscription, quote a mint at a flat BNB price,
  check remaining spots and per-wallet quota, preview a mint, execute it, and verify the
  receipt. Handles paid mints enforced by an on-chain gate contract.
metadata:
  author: local
  version: '1.0.0'
  requiredCliVersion: '1.12.0'
  openclaw:
    requires:
      bins:
        - baw
    install:
      - kind: node
        package: '@binance/agentic-wallet'
        bins: [baw]
        label: Install Binance Agentic Wallet CLI (npm)
---

# BSC Inscription Minter (AGNT)

Drives `baw contract-call` to mint a **BSC-20 inscription** from an Agentic Wallet. The inscription is
plain calldata (`data:,{...}`) — it is **not** a BEP-20 token and will never appear in
`baw wallet balance`.

## Launch terms (this deployment)

| Field | Value |
|---|---|
| protocol | `bsc-20` |
| tick | `AGNT` |
| max supply | `21,000,000` |
| spots | `50,000` — one mint = one spot = **420 tokens** |
| per wallet | **50 spots** (21,000 tokens) — max **2 free** per wallet |
| pause | The gate is pausable by its owner (the Launchpad owner / treasury) via `setPaused(bool)`. While paused, `admissionOpen()` returns false and `mint()` reverts `MintPaused()` — treat it exactly like admission closed: do not sign, report and stop. |
| price | First **10,000 mints free** (4,200,000 AGNT; max 2 free per wallet), then **0.0003 BNB per mint** (~$0.225 @ $750 ref) — flat in BNB, no oracle. **Free mints are AGNT-only**: the launchpad reverts `freeSpots > 0` for any other tick. Gate `requiredWeiFor(wallet, qty)` is authoritative. |
| fair-launch ceiling | 50 spots max per wallet; 40,000 paid mints ≈ 12 BNB if fully minted. Treasury = the Launchpad owner's wallet (automatic — `createLaunch` has no treasury parameter; proceeds from every launch go to the launchpad owner). Launch fee: **0.005 BNB** per launch, paid with `createLaunch`; owner-adjustable via `setLaunchFee`, withdrawable via `withdrawFees`. **Flagship lock:** the first launch is owner-only (AGNT); every other `createLaunch` reverts with `LaunchesLockedUntilFlagshipSoldOut` until the AGNT gate sells out — check `launchpad.launchesOpen()` before previewing a launch. Full launch instructions: `GET https://agentrybaw.xyz/api/launch-prompt`. Market/escrow trading rules: `GET https://agentrybaw.xyz/api/market-prompt` (trading unlocks per tick at sell-out). Paid mints ALWAYS go through the gate contract's `mint(qty)` — never send BNB to an EOA and call it a mint. |

All of this lives in `config.json`. Never restate different numbers to the user — read the config.

## Command routing

| User intent | Command |
|---|---|
| What's the status / how many spots left / my quota | `node scripts/status.mjs --json` |
| What will one mint cost right now | `node scripts/quote.mjs --qty <n> --json` |
| Mint (dry run, preview only) | `node scripts/mint.mjs --qty <n>` |
| Mint for real | `node scripts/mint.mjs --qty <n> --execute` |
| Publish the tick (one-time operator step) | `node scripts/deploy.mjs` then `--execute` |
| Is my spot on chain | `node scripts/status.mjs` + explorer link from the mint result |
| Verify the deployment before signing | `node scripts/verify-contracts.mjs --json` |
| Confirm a mint actually landed | `node scripts/confirm.mjs --tx <hash>` |
| Recover an uncertain attempt | `node scripts/mint.mjs recover` |
| Get the copy-paste agent prompt | `node scripts/agent-prompt.mjs` |
| Browse the market / what is the floor | `node scripts/market.mjs orders` |
| Is trading open yet | `node scripts/market.mjs orders` then read the lock, or `curl -s localhost:8787/api/health` |
| Sell spots | `node scripts/market.mjs list --spot <n> --price <bnb>` |
| Buy spots | `node scripts/market.mjs buy --listing <id>` (escrows BNB) |
| Deliver after a sale | `node scripts/market.mjs deliver --listing <id> --buyer <addr>` |
| Release or reclaim escrow | `node scripts/market.mjs attest ...` (attestor) / `refund ...` (buyer) |

Always run from the skill directory. Add `--json` for machine-readable output; exit codes are documented in
[references/errors.md](references/errors.md).

## Hard rules

1. **Preview before execute. Always.** `scripts/mint.mjs` without `--execute` signs nothing. Show the user:
   tick, quantity, tokens, recipient, BNB value (+ USD reference), the decoded inscription JSON, risks and
   `authorityChanges`. Only then run `--execute`.
2. **Developer Mode must be on.** `contract-call` is refused otherwise. It can only be enabled in the
   Binance App (Agentic Wallet management page → Settings → Developer Mode → risk warning → approve).
   Never attempt to enable or change limits through the CLI — you can't.
3. **Check the gate exists before promising a mint.** In `gate` mode the price and caps are enforced by
   `deploy/MintGate.sol`. If `config.gate` is empty the mint is impossible, not merely risky — say so.
4. **Inscriptions are irreversible.** No refunds, no undo, no cancel. A wasted tx is wasted BNB.
5. **Never hand-edit calldata** or switch route silently after an error. Show the raw error.
6. **Confirm the tick is free before deploying.** Indexers credit the *first* deploy carrying a tick.
   Check the user's indexer first; a duplicate deploy is a burned tx.
7. **Trading is closed until the mint sells out.** Do not list, buy, or promise a trade during the
   mint. `AgentryMarket.buy()` reverts `TradingClosed(minted, required)` and `scripts/market.mjs`
   exits `12` — that is the design, not an obstacle to route around. Marketplaces are post-launch.
8. **Quota is per wallet and permanent.** 50 spots, no exceptions, no admin override. If the wallet is
   exhausted, the answer is another wallet — not a retry.

## Definition of done

A mint is only done when you have a `txHash` **and** a receipt with `status: success`. Broadcast is not
mined, and `PENDING_CONFIRMATION` is not approval — the user must approve in the App, then re-check
`baw wallet tx-history --json`.

## Agent minting protocol (in order — do not skip steps)

Modelled on how mature agent launches run: public information before credentials, verification
before signatures, one idempotent attempt, and a confirmed receipt before reporting success.

1. **Admission first (no signature).** Read `protocolInfo()` / `admissionOpen()` on the gate, or
   `GET /api/protocol-info`. Closed = report and stop (exit 16).
2. **Verify the deployment.** `verify-contracts.mjs` checks bytecode, `gate()`/`attestor()` links and
   every immutable against `config.json`. Any mismatch = exit 13, **do not sign**. A bytecode check
   does not prove an audit — say so.
3. **Wallet checks.** Connected on chain 56, Developer Mode on (exit 6), **Agent ID required by
   default** — `baw wallet agent-id --json` must report `claimed=true`, else exit 17 (service error
   `20003008` = eligibility unknown, retry later, never assume). On-chain `spotsOf(wallet)` quota
   before the local ledger.
4. **One attempt, idempotent.** `--idempotency-key <uuid>`; a pending/previewed attempt blocks a
   second mint (exit 14) — recover with `mint.mjs recover`, never duplicate.
5. **Preview → explicit confirmation → execute.** Show decoded value/recipient/calldata/risks.
6. **Confirm.** Broadcast is not completion: `confirm.mjs` requires a successful receipt, 12
   confirmations and the `Inscribed` event. Only then report the spot number — from the event,
   never inferred.

## Trading lock

The market is armed but closed for the entire mint. The lock lives in the contract: `buy()` reads
`gate.totalSpots()` and reverts until it equals `MAX_SPOTS()`. The order book and the site mirror that
state so nobody escrows early. When the 50,000th spot mints, trading opens with no admin action.

## Marketplace in one paragraph

A BSC-20 balance can only move in the holder's own transaction, so the asset cannot be escrowed — only
the payment can. `AgentryMarket` holds the buyer's BNB, the seller delivers a transfer inscription, and
a designated **attestor** releases the funds; after the delivery window the buyer can refund. Tell users
that attestation is a trust assumption, and never claim a trade is atomic.

## Reference files

- [references/mint-flow.md](references/mint-flow.md) — the exact agent protocol, step by step
- [references/errors.md](references/errors.md) — exit codes, baw error codes, and what to tell the user
- [references/launch-ops.md](references/launch-ops.md) — deploying the gate, publishing the tick, indexer checks
- [deploy/REMIX.md](deploy/REMIX.md) — deploying both contracts by hand in Remix IDE
- [deploy/mainnet.md](deploy/mainnet.md) — the mainnet runbook, verbatim, with cost estimates
