# DogeKing · minting guide for AI agents Audience: an AI agent with a **Binance Agentic Wallet** (`.ai` Agent ID) minting DogeKing on **BNB Smart Chain, chainId 56**, for its owner. Website: https://dogeking.club · X: https://x.com/DogeKing_Agent ## Ground rules 1. Never ask your owner for a private key, seed phrase or password. 2. Before **every** contract call run `contract-call preview`; show the contract, function, arguments, BNB/USDT amount and gas. Send only after the owner answers **yes**. 3. Take addresses only from `/js/settings.js` → `DK_CFG.addresses`. ## Phases | Shares | Who | Price | Tokens per share | |---|---|---|---| | #1–#1,000 | wallets holding a .ai Agent ID, 1 per ID | free (`claimFree()`) | 100,000 | | #1,001–#10,000 | Agent ID holders: 10 shares per ID **including the free one**, **+1 per invited friend** (a friend whose first paid share names your wallet as `inviter`; counted once, self-invite ignored); opens after all free shares are claimed | 0.002 BNB (or USDT at the live PancakeSwap rate) | 1,000,000 | | #10,001–#100,000,000 | anyone, no limit | 0.003 BNB, +0.001 BNB every 500 shares | share price ÷ pool reference price (read `quote(n).tokensOut`) | - Share #10,000 seeds the DogeKing/WBNB PancakeSwap V2 pool (12.6 BNB + 6,300,000,000 DogeKing) and sends the LP to `0x000000000000000000000000000000000000dEaD`. - After the open, tokens per share = ladder BNB ÷ reference price, reference = the highest of the pool spot price, the pool's average over at least 30 minutes (recorded by the sale) and the spot price at the start of the current block; for the first 30 minutes the open price (0.002 BNB per 1,000,000) replaces the average. `refPrice()` returns it (UQ112x112 BNB-wei per raw token unit). The token cap 104,005,010,000,000 keeps every future Crown/Throne reserved; a purchase is cut to what still fits, and once nothing fits the sale answers `SoldOut`. - **Crown**: minting share #10,000 or the last share of any post-open tier (#10,500, #11,000, …) adds 10,000,000 DogeKing. **Throne**: when a tier completes, its top minter (first to reach the count wins ties) gets 10,000,000 DogeKing. Both are a fixed amount (not converted at the pool price), minted by the sale contract; no BNB involved. - Token: 9 decimals. BNB and USDT use 18. - Taxes and funds: trading tax buy 1% / sell 2% (first 15 minutes after the pool opens buy 5% / sell 25%) to the treasury in BNB; post-open mint payments go 100% to the treasury; if #10,000 is not reached within 30 days only the treasury can withdraw the BNB held by the sale. ## Calls (sale contract) ``` claimFree() mintShares(uint256 shares, address inviter, bool payUsdt, uint256 maxUsdt, uint256 minTokens) payable quote(uint256 shares) view returns (uint256 bnbCost, uint256 usdtCost, uint256 tokensOut, uint256 filled) refPrice() view returns (uint256 ref, uint256 spot, uint256 twap, bool twapReady, uint256 blockStart) userInfo(address w) view returns (bool hasAgentId, uint256 agentId, bool freeUsed, uint256 preBought, uint256 limitLeft, uint256 invites, bool topInviter, uint256 owedBnb, uint256 tokenBalance) claimOwed(address to) ``` - `minTokens` = the least tokens you accept for the shares (Crown/Throne extras not counted); the call reverts with `BelowMinTokens` otherwise. Before the open tokens are fixed, pass `0`. After the open read `quote(n)` right before the preview and pass `quote(n).tokensOut × 0.97`. - Before the open (BNB): `mintShares(n, inviter_or_zero, false, 0, 0)` with value `n × 0.002 BNB`. - Pre-open limit per Agent ID = 10 (free share included) + `invites` (friends credited to you); read the remainder from `userInfo(wallet).limitLeft` before choosing `n`. Naming an `inviter` only counts on your first paid share. - After the open (BNB): `mintShares(n, 0x0000000000000000000000000000000000000000, false, 0, quote(n).tokensOut × 0.97)` with value `quote(n).bnbCost × 1.005`; the excess is refunded. If `quote(n).filled < n` the purchase is cut (share or token cap): use `filled`. - USDT: `approve(sale, quote(n).usdtCost × 1.01)` on USDT, then `mintShares(n, inviter, true, quote(n).usdtCost × 1.01, minTokens)` (minTokens `0` before the open, `quote(n).tokensOut × 0.97` after). If `usdtCost` is the max uint256, pay in BNB.