---
name: jinmian
description: Preview and prepare JINMIAN purchases, notification pass reservations, refunds and sells on BNB Smart Chain.
---

# 金面 JINMIAN

- BNB Smart Chain, chain ID `56`. Primary RPC `https://bsc-dataseed.bnbchain.org`. Fallback `https://bsc.publicnode.com`.
- Sale `0x1f1b1D17230B8Ea69cB06442bA1820A8EB6b839f`. Token `0x224925fDeE735f7810Da5E6333cF587Fa9b54274` from sale `face()`. Notification pass `0xb70a5684458F5B4d486F8385bEBe75765456888A` from sale `playbill()`.
- Verified sale source `https://bscscan.com/address/0x1f1b1D17230B8Ea69cB06442bA1820A8EB6b839f#code`. Sale `2026-12-02T12:00:03Z` to `2026-12-02T20:00:03Z`.

- The sale and token contracts have no administrator, upgrade, pause or early-opening authority. LP is locked for 30 days from opening. During deployment, the deployer issues 278 notification passes to the recipient list in one batch. Issuance then closes permanently. Check `sealedEdition()` and `totalSupply()` on the pass contract.

## Purchase 3 shares

1. Verify the chain and sale address. Check `saleStart()`, `deadline()`, `opened()`, `sharesOf(buyer)` and `totalMinted()`. The window is `saleStart <= block.timestamp < deadline`, before opening. The wallet needs a valid Agent ID and space for 3 paid shares under the 15-per-wallet and 2,000-global caps. To check the ID, read `identity()`, then registry `handleOf(buyer)` and `ownerOf(uint256(keccak256(bytes(handle))))`. The handle must be nonempty and the returned owner must equal the buyer.
2. Call `quote(uint256)` with 3. Expected cost is **6000000000000000 wei (0.006 BNB)**.

   ```text
   0xed1bd76c0000000000000000000000000000000000000000000000000000000000000003
   ```

3. Prepare `mint(uint256,address)` with 3 and the zero address. Use the buyer as `from`, sale `0x1f1b1D17230B8Ea69cB06442bA1820A8EB6b839f` as `to`, exact quote `6000000000000000` wei as `value`, and this `data`.

   ```text
   0x94bf804d00000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000000
   ```

4. A purchase `eth_call` before `saleStart()` returns `BoxOfficeClosed()` (sale not started). Once the sale has started and while it is still open, preview the same `from`, `to`, `data` and `value` with `eth_call` and the wallet preview. Verify the expected three shares, value equal to the quote and any wallet approval required to submit. An empty successful return is expected. Run `eth_estimateGas` with those same fields. Ask the wallet owner to approve the transaction before submitting.

Payment determines the fill (照付款金额成交). The contract fills the minimum of `floor(value / 2000000000000000)`, the wallet's remaining allowance and the sale's remaining supply. The quantity argument is a quote hint. Change returns in the same transaction. A rejected change payment or a payment below one share reverts. The purchase requires BNB and no token approval.

An eligible referrer can be supplied on each paid purchase. Encode their address in the second argument of `mint(uint256,address)` only when specified by the buyer. They must be a different wallet with a valid Agent ID. The contract books 5% of that purchase's accepted fare to the referrer and attempts payout at pool opening. The remaining 95% goes to the pool. Other purchases contribute 100%. A referrer can claim an unpaid balance after opening with `collectHostGilt(address)` to an eligible BNB recipient. At expiry below the threshold all paid buyers remain entitled to their full fare.

## Pass and refund

- On the pass contract, read `totalSupply()` for the total issued, then check `ownerOf(id)` for IDs 1 through that total against your wallet address. For each match, read `stamped(id)`. A false result means unused.
- Read `freeClaimable(address)` on the sale for remaining free reservations. During the sale, verify ownership of the specific unused pass ID on `0xb70a5684458F5B4d486F8385bEBe75765456888A` and preview `claim(uint256)` on the sale with that ID and 0 value. Each unused pass can reserve one share without an Agent ID. `mintWithPlaybill(uint256,address)` combines a pass reservation with a payment-based buy using the same quote and preview checks.
- Once the pool opens, `collectMasks()` on the sale delivers the reserved tokens. Read `reservedMasks(address)` for the allocation after opening. The total free allocation is capped at `floor(paidShares / 4)` shares and divided pro rata across reservations, with token amounts rounded down in smallest units. Reservations lapse at expiry if fewer than 300 paid shares sold.
- The 2,000th paid share opens the pool in the purchase transaction. At expiry with at least 300 paid shares, anyone can call `open()`. Below 300, read `refundable(address)` and preview `refund()` with 0 value from the buyer. A contract wallet may instead preview `refundTo(address)` with a recipient that accepts BNB.

## Sell the 4,800 JINMIAN from this purchase

Use the buyer's own address and verify the pool is open. Retrieve the router with `router()` on `0x224925fDeE735f7810Da5E6333cF587Fa9b54274` and WBNB with `wrapped()` on `0x1f1b1D17230B8Ea69cB06442bA1820A8EB6b839f`. The designated pair has a 1% buy tax and a 3% sell tax. Ordinary wallet-to-wallet transfers have 0% tax. The token uses 18 decimals. For a different holding, scale the sell amount and post-tax quote input to the amount you intend to sell. Get a fresh quote for that input and apply the same minimum-output percentage.

1. Check the buyer's balance. Preview and estimate approval of exactly `4800000000000000000000` units on the token. Use the router as spender. Wait for approval confirmation and verify allowance before previewing the swap.
2. Quote `getAmountsOut(uint256,address[])` on the router with `amountIn - floor(amountIn * 3 / 100)` (here `4656000000000000000000`) and path [token, WBNB]. The second returned amount is the quoted BNB in wei. The example uses `floor(q * 97 / 100)` as minimum output. Use a fresh quote and a minimum the buyer accepts.
3. Set a short future Unix deadline. Encode the calls below with real values for the shell variables. Approval goes to the token. The swap goes to the router, pays BNB to the buyer and uses `value = 0`. Preview each with `eth_call` from the buyer and run `eth_estimateGas` on the actual calldata before obtaining approval to submit.

   ```sh
   AMOUNT=4800000000000000000000
   APPROVE_DATA=$(cast calldata 'approve(address,uint256)' "$ROUTER" "$AMOUNT")
   QUOTE_DATA=$(cast calldata 'getAmountsOut(uint256,address[])' 4656000000000000000000 "[$TOKEN,$WBNB]")
   SWAP_DATA=$(cast calldata 'swapExactTokensForETHSupportingFeeOnTransferTokens(uint256,uint256,address[],address,uint256)' "$AMOUNT" "$MIN_OUT" "[$TOKEN,$WBNB]" "$BUYER" "$SWAP_DEADLINE")
   ```

The sell can revert if market movement takes proceeds below the chosen minimum. When tax is pending, the token may attempt a tax conversion once per block. Execution of that path requires at least 424,761 gas **remaining inside the token** at its check. If estimation skipped the conversion because the current block already attempted it, re-estimate where the conversion is eligible or use a limit that covers the conversion path before submitting a swap that may land in the next block.

Each paid share costs 0.002 BNB and receives 1,600 JINMIAN. The opening reserve price is 0.0032 BNB per share (1.6×). The BSC fork first-exit reference sold 24,000 JINMIAN (15 paid shares, cost 0.03 BNB), without referrals or free shares.

| Opening scenario | BNB received | Received / cost |
|---|---:|---:|
| Sold out at 2,000 shares | 0.045877730367664561 | 1.52925768× |
| At expiry with exactly 300 paid shares | 0.042908336835617787 | 1.4303× |

Proceeds include sell tax and pool fees, before gas. 开盘后价格依池子深度与买卖变动。 Post-launch price moves with pool depth and market trades.


## Custom errors

Match the first four bytes of the revert data against the sale, token and notice contract errors below. Amount arguments are in wei when they refer to BNB.

| Contract | Error signature | Selector | Meaning |
|---|---|---|---|
| Sale | `BoxOfficeClosed()` | `0x37c68d0b` | The sale has not started, the deadline has passed, or the pool is already open. |
| Sale | `CurtainNotReady()` | `0x634ac0bd` | Manual opening requires an unopened pool, expiry and at least 300 paid shares. |
| Sale | `FareDeliveryFailed()` | `0x4ebb0494` | The BNB transfer failed, the recipient is invalid, or the fallback settlement is still locked. |
| Sale | `FareTooLow()` | `0x101dbe7c` | Payment is below the 0.002 BNB price of one paid share. |
| Sale | `GiltUnavailable()` | `0x42fa4363` | The pool is unopened or the referrer has no unpaid reward. |
| Sale | `IdentityRequired()` | `0xd6fba885` | The paying wallet must own a valid Agent ID. |
| Sale | `InvalidTheatre()` | `0xa1c2be47` | The constructor rejected the sale configuration or its chain dependencies. |
| Sale | `NoFareToReturn()` | `0x401e57bb` | The caller has no refundable paid fare. |
| Sale | `PlaybillUnavailable()` | `0x5cca079a` | The reservation window is closed, the pass is used, free slots are full, or there are no reserved tokens to collect. |
| Sale | `PropsLocked()` | `0xb46905e4` | LP is still locked, the caller cannot withdraw it, or there is no LP balance. |
| Sale | `ReentrancyGuardReentrantCall()` | `0x3ee5aeb5` | A protected call was rejected because the contract was already executing one. |
| Sale | `SafeERC20FailedOperation(address)` | `0x5274afe7` | The ERC-20 operation failed on the token named in the revert data. |
| Sale | `SeatLimit()` | `0x24a3bd64` | There is no remaining paid capacity for the wallet or the sale. |
| Sale | `UnbalancedStage()` | `0x744ece81` | The pair already holds at least the target opening quantity of JINMIAN. |
| Token | `CurtainDown()` | `0x782ef33a` | Token transfers or tax conversion require an open pool. |
| Token | `ERC20InsufficientAllowance(address,uint256,uint256)` | `0xfb8f41b2` | The spender's allowance is below the requested amount. |
| Token | `ERC20InsufficientBalance(address,uint256,uint256)` | `0xe450d38c` | The wallet's ERC-20 balance is below the requested amount. |
| Token | `ERC20InvalidApprover(address)` | `0xe602df05` | The ERC-20 allowance owner address is invalid. |
| Token | `ERC20InvalidReceiver(address)` | `0xec442f05` | The ERC-20 receiver address is invalid. |
| Token | `ERC20InvalidSender(address)` | `0x96c6fd1e` | The ERC-20 sender address is invalid. |
| Token | `ERC20InvalidSpender(address)` | `0x94280d62` | The ERC-20 spender address is invalid. |
| Token | `EmptyGiltQuote()` | `0x30e58e88` | The tax swap quote is zero. |
| Token | `GiltGasShort()` | `0xb83f0ffa` | The token has insufficient gas remaining for its tax-conversion check. |
| Token | `InvalidStaging()` | `0xe115963b` | Only the sale contract can activate the token before trading begins. |
| Token | `StageOnly()` | `0x832f3d54` | The caller or trading state is ineligible for this internal token operation. |
| Notification pass | `ERC721IncorrectOwner(address,uint256,address)` | `0x64283d7b` | The supplied owner does not own that pass. |
| Notification pass | `ERC721InsufficientApproval(address,uint256)` | `0x177e802f` | The caller lacks approval for that pass. |
| Notification pass | `ERC721InvalidApprover(address)` | `0xa9fbf51f` | The ERC-721 approver address is invalid. |
| Notification pass | `ERC721InvalidOperator(address)` | `0x5b08ba18` | The ERC-721 operator address is invalid. |
| Notification pass | `ERC721InvalidOwner(address)` | `0x89c62b64` | The ERC-721 owner address is invalid. |
| Notification pass | `ERC721InvalidReceiver(address)` | `0x64a0ae92` | The pass receiver is invalid or did not accept a safe transfer. |
| Notification pass | `ERC721InvalidSender(address)` | `0x73c6ac6e` | The ERC-721 sender address is invalid. |
| Notification pass | `ERC721NonexistentToken(uint256)` | `0x7e273289` | The specified pass ID does not exist. |
| Notification pass | `InvalidPlaybillList()` | `0x0a116693` | Invalid issuer or edition limit, or a recipient list outside the allowed size. |
| Notification pass | `PlaybillCannotBeStamped()` | `0x0df93dd3` | The pass is used, is not owned by the specified wallet, or was called from outside the sale contract. |
| Notification pass | `PlaybillsSealed()` | `0x39efb70b` | Only the deployer can issue passes, and issuance closes permanently after the first batch. |
