---
name: gstock-brokers-mint
description: Mint Gstock Brokers (GBROKER) ERC-721 NFTs on BNB Chain with one contract call.
---

# Gstock Brokers — agent mint guide

Gstock Brokers is a 3,000-piece ERC-721 collection on **BNB Chain (BSC, chainId 56)**.
Website: https://gstockbrokers.pages.dev · Machine summary: /llms.txt

## Status / contract address
- Current address: read `https://gstockbrokers.pages.dev/deployment.json` → `address`.
  **`null` means the contract is not deployed yet — do not send anything.**
- Only use the address published on gstockbrokers.pages.dev (mint page, deployment.json).
- ABI: `/abi/GstockBrokers.json`

## Rules (enforced by the contract)
- Max supply 3,000; token ids 1..3000 minted in order.
- First 1,000 mints (global counter) are free. From #1,001: **0.0025 BNB each**.
  A mint that crosses #1,000 only pays for tokens above #1,000.
- Max **4 mints per wallet** in total (counted by `mintedBy(wallet)`, not balance).
- Minting must be open: `mintActive() == true`.

## Mint in one call
```
function mint(uint256 quantity) payable      // selector 0xa0712d68, quantity 1..4
```
`value` must be **≥ costFor(quantity)** (wei). Any excess is refunded in the same transaction.
Always read the price right before sending, because the free phase can run out.

Read-only helpers:
| call | selector | meaning |
|---|---|---|
| `totalSupply()` | 0x18160ddd | minted so far |
| `mintActive()` | 0x25fd90f3 | minting open? |
| `costFor(uint256)` | 0xb31dfc8f | wei required for `quantity` now |
| `remainingFor(address)` | 0x24c0c499 | how many this wallet may still mint |
| `mintedBy(address)` | 0x3cef28d2 | how many this wallet already minted |
| `freeRemaining()` | 0x5a781a6b | free mints left globally |

### Example with Foundry `cast`
```bash
NFT=$(curl -s https://gstockbrokers.pages.dev/deployment.json | jq -r .address)   # must not be null
RPC=https://bsc-dataseed.bnbchain.org
cast call $NFT "mintActive()(bool)" --rpc-url $RPC
cast call $NFT "remainingFor(address)(uint256)" $ME --rpc-url $RPC
COST=$(cast call $NFT "costFor(uint256)(uint256)" 2 --rpc-url $RPC | awk '{print $1}')
cast send $NFT "mint(uint256)" 2 --value $COST --rpc-url $RPC --private-key <your key, from your own secret store>
```

### Raw transaction fields
- `to`: contract address · `chainId`: 56
- `data`: `0xa0712d68` + quantity as 32-byte uint (e.g. 2 → `0xa0712d680000000000000000000000000000000000000000000000000000000000000002`)
- `value`: result of `costFor(quantity)` (0 during the free phase)
- gas: ~70k + ~30k per token is typical; use `eth_estimateGas`.

### Errors you may see
`MintNotActive`, `BadQuantity` (0 or >4), `WalletLimit`, `SoldOut`, `WrongPayment(required)`.

## Metadata
`tokenURI(N)` = `https://gstockbrokers.pages.dev/meta/N.json` (baseURI is owner-updatable). Images: `/img/N.svg`, previews `/png/N.png`.

Collectible art only; no promise of value or returns. Independent project, not affiliated with Binance or BNB Chain.
