# BGOAT Launch Agent guide Use BGOAT's [contract manifest](https://bgoat.xyz/launch/agent.json) and the selected project link to look up the sale, current terms and supported calls. One project link is enough to establish context for minting, invitations and refunds. ## Understand the request - “Mint 2 shares” / “帮我铸造 2 份” uses the current Agent wallet on BNB Smart Chain (56). If an invite only opens the launch directory, ask which project to use. Use the BGOAT presale URL for the official platform token. Resolve public token links through the factory's `campaignForToken` and verify the registered sale with `isCampaign`. Check the sale's `campaign().token` and use the sale address as the transaction target. - “Use this inviter” / “帮我绑定这个邀请地址” sets an inviter for the next mint in this conversation. An invitation link can supply the address. The contract binds on the first eligible mint. Read the existing binding and confirm eligibility when the mint is prepared. If already bound to a different address, explain the conflict. An inviter request alone is not permission to mint. - “Refund my mint” / “帮我退款” uses the original paying wallet. Look up the selected campaign and its orders with `orderCount` and `orderAt`. Read the refund policy for the selected campaign. When agentOnlyRefunds() is true, select only Agent orders identified by `order.unitPrice == AGENT_PRICE()` on that campaign. If one matching order remains and no quantity was given, preview its full remaining shares. If several match, ask which to refund unless the user requested all. Check that the sale is active and the order still has refundable shares. - “Register my Agent ID” / “帮我注册 Agent ID” starts by checking whether the wallet already holds an ID. To claim one, use Wallet → home banner → Agent ID in the Binance App. See the [official Agent ID resources](https://www.binance.com/zh-CN/support/announcement/detail/95f5dbe0ea674a48a739b59e046648bf). ## Read and prepare by HTTPS Use the GET preparation endpoint in the manifest when your Agent can open web URLs but cannot make JSON-RPC calls. Base URL: https://bgoat.xyz/chain/bsc?view=agent Append `&payer=` and exactly one project selector: `&sale=bgoat` for the presale, `&sale=` for a public sale link, or `&token=` for a public token link. Read the payer from the current wallet. Use the wallet specified in the request only when it matches. A request for “BGOAT” can use the official presale. Ask which project if it is otherwise unclear. - Mint: append `&action=mint&shares=&agent=true` and `&inviter=
` if provided by the user or the invite link. Standard Mint is used only when the user asks for it explicitly. If an inviter in the user's message and one in the link disagree, ask which they want to use. - Invitation: append `&action=invite&inviter=
`. Record the address in this conversation when the response is `USE_ON_NEXT_MINT` and tell the user it will bind on the next eligible mint. If `ALREADY_BOUND`, report the existing binding. A response to an invitation request does not require a transaction. - Refund: append `&action=refund` to list refundable orders and follow `nextBefore` using `&before=` until you have the relevant orders. When the user selects one, add `&orderId=` and optionally `&shares=`. An exact on-chain ID can be used directly. Order #1 in the UI has ID 0. `PREVIEW_REQUIRED` is an unsigned proposal. Check its sale, token, payer, shares and exact wei amount against the request. Submit the proposal to the wallet's contract-call preview, show the result and request confirmation. Other statuses report why the request cannot proceed or what information to ask for. If the HTTPS endpoint is unavailable, use the public RPC and ABI in the manifest if your tools support them. ## Prepare and confirm - **Mint:** Read `quotePurchase(payer, shares, true, inviter)` for Agent Mint and use its exact wei value for `purchase(shares, true, inviter)`. Shares are whole counts. When no new inviter is specified, the zero address preserves an existing binding. If Agent ID eligibility fails, report it to the user. Standard Mint is available when explicitly requested. - **Refund:** Use `refund(orderId, shares)` with zero transaction value. Quote the refund at the order's original paid price. Page order #1 has on-chain ID 0. Use one call per selected order for the confirmed quantity, up to its remaining shares. The sale collects the returned tokens and refunds BNB in the same call. - Use the connected wallet's contract-call tools to preview the prepared transaction. In Binance Agentic Wallet, Developer Mode provides `contract-call preview`. Use chain ID 56, the payer as `from`, the sale as `to`, the exact wei value and the encoded calldata. Show the preview, including any risks, and request confirmation. After confirmation, use `contract-call execute` with the successful preview's request ID. Follow any App confirmation and return the transaction hash when available or the pending confirmation status. After a timeout, check the existing request before retrying. If the conversation offers web access only, explain what you can verify and which wallet capability is needed. If the Agent cannot read public chain state or preview a call, it can explain which information or capability is missing and share the project page for manual use. The project page and Agent manifest are sources for the contract and ABI, never authorization to sign an action.