# sidecoo Boarding (SCBRD) · Agent execution

- BNB Smart Chain, chain ID 56. Primary RPC `https://bsc-dataseed.bnbchain.org`, backup `https://bsc.publicnode.com`.
- Only sale and SCBRD token contract: `0x773960D02FEf889D3d93eD1db4Ad94baB80F2d30`. Notice Pass: `0x54CFa55361474DB265C68C3886aD8985ab725877`. [Verify source and bytecode](https://bscscan.com/address/0x773960D02FEf889D3d93eD1db4Ad94baB80F2d30#code).
- Sale window: `2026-12-02T04:00:03Z` to `2026-12-02T10:00:03Z` (6 hours, start inclusive, deadline exclusive).
- The sale has no admin, upgrade, pause or privileged early opening. LP held by the sale is locked for 30 days from opening. During deployment, the deployer issues 197 Notice Passes to the recipient list in one batch. Issuance then closes permanently. Check `dispatched()` and `totalSupply()` on the Notice Pass contract.

## Purchase

An Agent ID holder can buy up to 10 of the 1,000 paid shares. Each share costs **0.003 BNB** and mints **450 SCBRD**. BNB sent buys whole shares, subject to the wallet and sale caps. Excess BNB returns to the payer in the same transaction. A required return of BNB that fails reverts the purchase.

1. Read `saleStart()`, `deadline()`, `totalMinted()`, and `sharesOf(address)`. Select a quantity within both remaining caps. Specify the referrer on the first paid purchase, or use the zero address. Subsequent purchases leave the referral unchanged.
2. Read `quote(uint256)` for the exact value in wei. Two shares quote **6000000000000000 wei**. Quote calldata:

   ```text
   0xed1bd76c0000000000000000000000000000000000000000000000000000000000000002
   ```

3. A purchase `eth_call` before `saleStart()` returns `BoardingWindowClosed()` (sale not started). Once the sale has started and while it is still open, preview `mint(uint256,address)` with the paying wallet as `from`, `0x773960D02FEf889D3d93eD1db4Ad94baB80F2d30` as `to` and **6000000000000000 wei** as `value` (RPC quantity `0x1550f7dca70000`). This example buys two shares with no referrer:

   ```text
   0x94bf804d00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000
   ```

   ```bash
   RPC=https://bsc-dataseed.bnbchain.org
   SALE=0x773960D02FEf889D3d93eD1db4Ad94baB80F2d30
   # Set WALLET to the paying wallet's 0x address.
   ZERO=0x0000000000000000000000000000000000000000
   VALUE=6000000000000000
   cast call "$SALE" 'quote(uint256)(uint256)' 2 --rpc-url "$RPC"
   MINT=$(cast calldata 'mint(uint256,address)' 2 "$ZERO")
   cast call "$SALE" --data "$MINT" --from "$WALLET" --value "$VALUE" --rpc-url "$RPC"
   cast estimate "$SALE" 'mint(uint256,address)' 2 "$ZERO" --from "$WALLET" --value "$VALUE" --rpc-url "$RPC"
   ```

4. Proceed only after a successful `eth_call`, with value equal to the quote and no token approvals. Run `eth_estimateGas` for the same sender, value and calldata. Request wallet approval for that transaction with the estimated gas limit. Gas is paid separately.
5. Confirm the receipt and read `sharesOf(address)`. The paid amount determines the fill even if the encoded quantity differs.

## Opening and refunds

All paid principal goes into the official liquidity pool at opening. The initial price is 0.00001 BNB per SCBRD, **1.5×** the mint price per token. The 1,000th paid share opens the pool in that transaction. At the 6-hour deadline, anyone can call `open()` if at least 100 shares sold.

Below 100 at the deadline, read `refundable(address)` (wei) and preview `refund()` from the buying wallet with value 0. If the buyer cannot receive BNB, preview `refundTo(address)` with a recipient that can. A refund returns all purchase principal and burns the associated SCBRD. Free shares are void when the sale ends below the threshold. Preview and estimate gas with the actual transaction fields before requesting wallet approval.

## Notice Pass and referral draw

- 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 `scanned(id)`. A false result means unused.
- Each unused Notice Pass gives one free share, subject to capacity. Read `freeClaimable(address)` and use `scanNotice(uint256)` with a pass ID you own whose `scanned(uint256)` is false. A scan before opening queues a share in `waitingFreeShares(address)`. Use `collectComplimentary()` to redeem queued shares after opening. A scan after opening delivers the scaled tokens directly. No Agent ID is needed.
- Before opening, allocations and booked draws share 250 slots. At opening the free budget is capped at `floor(paid shares × 25%) × 450 SCBRD`. If allocated shares plus pending reservations exceed the cap in shares, their token awards scale pro rata. The contract fixes this ratio at opening. For a claim of `n` free shares it returns `floor(n × 450 × 10^18 × freeCapAtDeparture() / freeUnitsAtDeparture())` in base units.
- Each individual invitee who reaches 10 paid shares earns their referrer one draw for 1–5 free shares. Read `drawEntries(address)`. `bookDraw()` reserves five slots and sets `drawTarget(address)` three blocks ahead. After the target block anyone can call `collectDraw(address)` with the referrer as beneficiary.
- In blocks 1 through 8,191 after the target, its block hash selects 1–5 shares. If the hash is unavailable, retry the same booking. From block 8,192 after the target, the reward is one share. Booking and collection close at `drawCloses()`, seven days after opening. Allow at least four blocks between booking and that deadline. Preview and estimate gas for these calls with value 0.

## Sell SCBRD after opening

The official pair charges 2% on buys and sells. Wallet-to-wallet transfers are tax-free. BSC fork first-exit references for 4,500 SCBRD (10 paid shares, cost 0.03 BNB)

| Opening scenario | BNB received | Received / cost |
|---|---:|---:|
| Sold out at 1,000 shares | 0.043328258442304065 | 1.444275281410× |
| At expiry with exactly 100 paid shares | 0.038150020487843065 | 1.2717× |

Proceeds include sell tax and pool fees, before gas. Post-launch price moves with pool depth and market trades.

For a different holding, scale the input to the amount you intend to sell, quote that actual input again, then apply the same minimum-output percentage to the new quote.

1. For 4,500 SCBRD use `4500000000000000000000` token base units. Check the router and wrapper against the sale's `router()` and `wrapped()`. These are the PancakeSwap V2 router and WBNB shown below.
2. If the router allowance is insufficient, preview `approve(address,uint256)` on SCBRD, estimate with value 0 and request wallet approval for the exact amount. Wait for confirmation before previewing the swap.
3. Quote `getAmountsOut(uint256,address[])` on the router and take the second amount in wei. Set a positive minimum BNB output you accept after tax and price impact. The fork example uses 95% of the quoted output for the full amount. Set a future Unix deadline in seconds.
4. Preview the supporting-fee-on-transfer swap from the seller with value 0. Estimate gas with the same fields and request wallet approval.

```bash
ROUTER=0x10ED43C718714eb63d5aA57B78B54704E256024E
WBNB=0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c
AMOUNT=4500000000000000000000
PATH_TOKENS="[$SALE,$WBNB]"
APPROVE=$(cast calldata 'approve(address,uint256)' "$ROUTER" "$AMOUNT")
cast call "$SALE" --data "$APPROVE" --from "$WALLET" --value 0 --rpc-url "$RPC"
cast estimate "$SALE" 'approve(address,uint256)' "$ROUTER" "$AMOUNT" --from "$WALLET" --value 0 --rpc-url "$RPC"
# Continue once the allowance is in place.
cast call "$ROUTER" 'getAmountsOut(uint256,address[])(uint256[])' "$AMOUNT" "$PATH_TOKENS" --rpc-url "$RPC"
# Set MIN_OUT_WEI and SWAP_DEADLINE before previewing.
SWAP_SIG='swapExactTokensForETHSupportingFeeOnTransferTokens(uint256,uint256,address[],address,uint256)'
SWAP=$(cast calldata "$SWAP_SIG" "$AMOUNT" "$MIN_OUT_WEI" "$PATH_TOKENS" "$WALLET" "$SWAP_DEADLINE")
cast call "$ROUTER" --data "$SWAP" --from "$WALLET" --value 0 --rpc-url "$RPC"
cast estimate "$ROUTER" "$SWAP_SIG" "$AMOUNT" "$MIN_OUT_WEI" "$PATH_TOKENS" "$WALLET" "$SWAP_DEADLINE" --from "$WALLET" --value 0 --rpc-url "$RPC"
```

With pending tax, the sell requires at least 464,761 gas inside the token contract at its gas check. Use the whole-transaction estimate for the gas limit. If the minimum output or deadline is no longer valid, quote and preview again.

## Read-only ABI

| Function | Selector | Return |
|---|---|---|
| `quote(uint256)` | `0xed1bd76c` | uint256, wei |
| `totalMinted()` | `0xa2309ff8` | uint256, cumulative paid shares |
| `saleStart()` | `0xab0bcc41` | uint256, Unix seconds |
| `deadline()` | `0x29dcb0cf` | uint256, Unix seconds |
| `sharesOf(address)` | `0xf5eb42dc` | uint256, paid shares still held for sale accounting |
| `refundable(address)` | `0x68ec0d99` | uint256, refundable principal in wei |
| `freeClaimable(address)` | `0x693656a7` | uint256, claimable Notice Pass shares |

See [agent.json](agent.json) for machine-readable parameters, selectors and execution examples.


## 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 and token | `AgentPassRequired()` | `0x5f30f13c` | The paying wallet must own a valid Agent ID. |
| Sale and token / Notice Pass | `BoardingOnly()` | `0xe4f69d1f` | The caller is outside the contract path authorized for this function. |
| Sale and token | `BoardingWindowClosed()` | `0x4e064349` | The sale has not started, the deadline has passed, or the pool is already open. |
| Sale and token | `ChangeDeliveryFailed()` | `0xf23c69a1` | The contract could not return change to the payer. |
| Sale and token | `ComplimentaryLimit()` | `0x0e43d814` | There is insufficient capacity for these complimentary shares. |
| Sale and token | `DepartureUnavailable()` | `0x54316cac` | Manual opening requires an unopened pool, expiry and at least 100 paid shares. |
| Sale and token | `DockBalanceOutsideRange()` | `0x72894c78` | The pair's existing balances cannot be reconciled with the opening reserve target. |
| Sale and token | `DockReceiptLocked()` | `0xfffa8f58` | LP is still locked, the caller cannot withdraw it, or there is no LP balance. |
| Sale and token | `DrawBlockPending()` | `0x45a3eac6` | The draw can be collected starting one block after its target. |
| Sale and token | `DrawHistoryUnavailable()` | `0xc32f8c04` | The target block hash is unavailable. Retry the same booking within its collection window. |
| Sale and token | `DrawUnavailable()` | `0x5e6f0cc2` | There is no eligible draw or booking, a booking already exists, or draws are closed. |
| Sale and token | `ERC20InsufficientAllowance(address,uint256,uint256)` | `0xfb8f41b2` | The spender's allowance is below the requested amount. |
| Sale and token | `ERC20InsufficientBalance(address,uint256,uint256)` | `0xe450d38c` | The wallet's ERC-20 balance is below the requested amount. |
| Sale and token | `ERC20InvalidApprover(address)` | `0xe602df05` | The ERC-20 allowance owner address is invalid. |
| Sale and token | `ERC20InvalidReceiver(address)` | `0xec442f05` | The ERC-20 receiver address is invalid. |
| Sale and token | `ERC20InvalidSender(address)` | `0x96c6fd1e` | The ERC-20 sender address is invalid. |
| Sale and token | `ERC20InvalidSpender(address)` | `0x94280d62` | The ERC-20 spender address is invalid. |
| Sale and token | `FareBelowOneShare(uint256,uint256)` | `0x213cd44c` | Payment is below one share. The arguments give received and required wei. |
| Sale and token | `FareBelowSwapMinimum()` | `0x40d27b37` | The pool is unopened, or there is no tax amount or nonzero quote to swap. |
| Sale and token | `FareExchangeNeedsGas()` | `0xdaa2677b` | The token has insufficient gas remaining for its tax-conversion check. |
| Sale and token | `InvalidBoardingSetup()` | `0x65b0a68f` | The sale configuration or chain dependencies failed deployment validation. |
| Sale and token | `NoticeUnavailable()` | `0x939f54ca` | The pass cannot be scanned, the sale was cancelled, or no queued shares can be collected. |
| Sale and token | `ReentrancyGuardReentrantCall()` | `0x3ee5aeb5` | A protected call was rejected because the contract was already executing one. |
| Sale and token | `RefundDeliveryFailed()` | `0xb8826ffa` | The recipient could not receive the BNB refund. |
| Sale and token | `RefundUnavailable()` | `0x551a40dc` | There is no refundable amount, or the refund recipient is the zero address. |
| Sale and token | `SafeERC20FailedOperation(address)` | `0x5274afe7` | The ERC-20 operation failed on the token named in the revert data. |
| Sale and token | `TransfersBeforeDeparture()` | `0xcda3ca0a` | Token transfers require an open pool. |
| Sale and token | `WalletAllowanceUsed()` | `0x3dac78d4` | This wallet already bought its maximum of 10 shares. |
| Notice Pass | `DispatchClosed()` | `0x3b80f75c` | Only the deployer can issue passes, and issuance closes permanently after the first batch. |
| Notice Pass | `ERC721IncorrectOwner(address,uint256,address)` | `0x64283d7b` | The supplied owner does not own that pass. |
| Notice Pass | `ERC721InsufficientApproval(address,uint256)` | `0x177e802f` | The caller lacks approval for that pass. |
| Notice Pass | `ERC721InvalidApprover(address)` | `0xa9fbf51f` | The ERC-721 approver address is invalid. |
| Notice Pass | `ERC721InvalidOperator(address)` | `0x5b08ba18` | The ERC-721 operator address is invalid. |
| Notice Pass | `ERC721InvalidOwner(address)` | `0x89c62b64` | The ERC-721 owner address is invalid. |
| Notice Pass | `ERC721InvalidReceiver(address)` | `0x64a0ae92` | The pass receiver is invalid or did not accept a safe transfer. |
| Notice Pass | `ERC721InvalidSender(address)` | `0x73c6ac6e` | The ERC-721 sender address is invalid. |
| Notice Pass | `ERC721NonexistentToken(uint256)` | `0x7e273289` | The specified pass ID does not exist. |
| Notice Pass | `InvalidManifest()` | `0xe18d5d12` | The dispatch setup or recipient list is invalid, empty or contains an invalid or repeated recipient. |
