---
name: gangstock-mint
description: Mint xGangStock (GSTOCK / 帮派股) shares on BNB Chain with an Agent-ID wallet (Binance Agentic Wallet or any EVM wallet) by calling the GangMint contract directly.
---

# xGangStock (GSTOCK · 帮派股) — agent mint guide

Independent community project. **Not affiliated with Binance or SPACE ID.** No price or return promises.

## Addresses (BSC, chainId 56)
Read them from `https://<site>/deployment.json` (fields `mint`, `token`, `pair`). Until they are
non-null the contracts are **not deployed** — do not send funds to any address from another source.
- Agent ID registrar (SPACE ID "Agent ID", soulbound ERC-721): `0x60B9262456dE011F7d15a54CdD8c48bAaa8B022F`

## Rules
- Only a wallet that holds an Agent ID can mint. Check: `registrar.handleOf(wallet)` is non-empty;
  agentId = `uint256(keccak256(bytes(handle)))`; `registrar.ownerOf(agentId) == wallet`.
  The mint contract exposes this as `agentOf(address) -> (uint256 agentId, bool ok)`.
- Quota: 10 shares per Agent ID, +1 for each invitee Agent ID whose first paid mint names you as `referrer`.
- 1–10 shares per transaction. Each share gives exactly 6,250 GSTOCK.
- Price: tier floor (0.0020 BNB for shares 1–10,000, rising to 0.0060) — after the pool opens,
  `max(floor, poolSpot × 6,250)`. Always quote with `costOf(shares)` right before sending.
- GSTOCK is non-transferable until the pool opens (auto at share 10,000).

## ABI (GangMint)
```
function mintWithBnb(uint256 shares, address referrer, uint256 maxCost) payable
function costOf(uint256 shares) view returns (uint256)      // = bnbQuote(shares)
function agentOf(address) view returns (uint256 agentId, bool ok)
function quotaOf(uint256 agentId) view returns (uint256)
function mintedCount(uint256 agentId) view returns (uint256)
function extraQuota(uint256 agentId) view returns (uint256)
function totalMinted() view returns (uint256)
function opened() view returns (bool)
event Minted(address indexed minter, uint256 indexed agentId, uint256 firstSerial, uint256 shares, uint256 paid)
errors: NoAgent() 0x2611416a · Quota() 0xb7920101 · BadShares() 0x7eb01706 · SoldOut() 0x52df9fe5 ·
        OverMaxCost() 0xb6ba0f43 · IsPaused() 0x1309a563 · BadPayment() 0xbdbbb533
```
`msg.value` must be ≥ cost; any excess is refunded in the same tx. `maxCost` caps what you pay
(use cost × 1.02 after open, since the price follows the pool). Use `referrer = 0x0000…0000` if none.

## Steps (foundry `cast`)
```bash
MINT=<mint from deployment.json>; RPC=https://bsc-dataseed.bnbchain.org; ME=<your wallet>; N=10
cast call $MINT "agentOf(address)(uint256,bool)" $ME -r $RPC          # must return ok=true
ID=$(cast call $MINT "agentOf(address)(uint256,bool)" $ME -r $RPC | head -1 | awk '{print $1}')
cast call $MINT "quotaOf(uint256)(uint256)" $ID -r $RPC; cast call $MINT "mintedCount(uint256)(uint256)" $ID -r $RPC
COST=$(cast call $MINT "costOf(uint256)(uint256)" $N -r $RPC | awk '{print $1}')
MAX=$(python3 -c "print($COST*102//100)")
DATA=$(cast calldata "mintWithBnb(uint256,address,uint256)" $N 0x0000000000000000000000000000000000000000 $MAX)
```

## Binance Agentic Wallet (`baw`)
Developer Mode must be enabled (`baw wallet settings --json` → `devMode.enabled=true`).
```bash
baw contract-call preview --binanceChainId 56 --from $ME --to $MINT --value $MAX --inputData $DATA --json
# show parsedTx + risks to the user, get explicit confirmation, then:
baw contract-call execute --requestId <requestId from preview> --json
```
`--value` is in wei. Never execute without the user's confirmation of the preview.

## After the pool opens
Trade on PancakeSwap V2: `https://pancakeswap.finance/swap?chain=bsc&outputCurrency=<token>`.
Buy tax 2% (project), sell tax 2% (1% burn + 1% project), wallet transfers 0%. Use
fee-on-transfer swap functions and adequate slippage (≥ 3%).
