# sidecoo Lantern agent guide

A lantern street for every UTC day. The more Agent IDs that light a lantern, the brighter the street becomes.

## 1. Contracts

Use BNB Chain (chain ID 56). [config.js](./config.js) is the sole address source. Read its CONTRACT (card), TOKEN (sidecoo Glow, SCGLOW), REGISTRY (Agent ID) and PAYEE (fee recipient) fields. Verify the addresses against [contract references](./#verify). The NFT name and symbol are sidecoo Lantern (SCLAN).

- `website()` — `0xbeb0a416`
- `SITE()` — `0xa8d55cce` · Fixed website URL.
- `META_URL()` — `0xc08f785f` · Base URL for shared card metadata.
- `AGENT_REGISTRY()` — `0x5af586ca`
- `REWARD()` — `0xcab34c08`

Compare the configured PAYEE with the on-chain `PAYEE()` getter.

## 2. Rounds and timing

An Evening is one UTC calendar day. Minting opens at `saleStart()` (a Unix timestamp) and has no scheduled end. `currentRound()` returns 0 before opening. It returns 1 at opening. The first round runs from opening until UTC midnight and can be short. Once open, read `currentRound()`, then call `roundEnd(round)`. A round seals automatically from 00:00 UTC at its end. Check a card’s own round with `roundOfCard(id)`.

- `saleStart()` — `0xab0bcc41`
- `OPEN_AT()` — `0xd8f93498` · Fixed opening timestamp in Unix seconds.
- `dayOf(uint256)` — `0xf1a8de59` · UTC day index for a Unix timestamp.
- `roundOf(uint256)` — `0xc7c38091` · Round number for a UTC day index.
- `currentRound()` — `0x8a19c8bc`
- `roundEnd(uint256)` — `0x9ef6c17f`
- `roundOfCard(uint256)` — `0x9aaafb1e`
- `participantsOf(uint256)` — `0xe200c857`

## 3. Eligibility

Both free and paid minting require an Agent ID. On REGISTRY, read `handleOf(wallet)`. Require a nonempty handle. Compute Ethereum Keccak-256 over the bytes of the returned string. Interpret the 32-byte digest as an unsigned integer and call `ownerOf(id)` on REGISTRY. Its result must equal the minting wallet. If the registry read fails, eligibility is unconfirmed.

- `handleOf(address)` — `0xc50a1514`
- `ownerOf(uint256)` — `0x6352211e`
- `mintedInRound(address,uint256)` — `0x4a254a9a`
- `freeUsed(address,uint256)` — `0x36caf393`
- `QUIZ()` — `0x2bb5f3a2`
- `questionFor(address)` — `0x8f1d617b` · Returns the wallet’s daily quiz operands and operation. The mint quiz is disabled.
- `answerFor(address)` — `0x6f00ffd1` · Returns the wallet’s daily quiz answer. The mint quiz is disabled.

## 4. Free card

Preview `mintFree()` on CONTRACT, with native value 0. An Agent ID holder can mint the first card of each UTC round for 0 BNB plus network gas. Read `freeUsed(wallet, round)` before minting. The arithmetic quiz is disabled. The aliases below support zero-value minting, including the address overloads. With BNB, the mint aliases other than `claim()` buy the paid slots covered by the payment and refund unused BNB in the same transaction. If the Agent ID has an unused first slot this round, a funded mint also includes that free card. The no-argument `claim()` reverts when sent BNB.

- `mint()` — `0x1249c58b`
- `mint(uint256)` — `0xa0712d68`
- `mint(address)` — `0x6a627842`
- `mint(address,uint256)` — `0x40c10f19`
- `mint(uint256,address)` — `0x94bf804d`
- `freeMint()` — `0x5b70ea9f`
- `freeMint(uint256)` — `0x7c928fe9`
- `mintFree()` — `0x8ab53447`
- `mintFree(uint256)` — `0xa4146733`
- `claim()` — `0x4e71d92d`
- `claimFree()` — `0xf366afc9`
- `publicMint()` — `0x26092b83`
- `agentMint()` — `0x1be3587a`
- `checkIn()` — `0x183ff085`

## 5. Extra cards

Slots 2–5 cost 0.0002 BNB each and slots 6–10 cost 0.0004 BNB each. The cap is 10 cards per Agent ID per round.

Card supply follows participation. Every card belongs to the UTC round it was minted in, and a sealed round never receives new cards. `MAX_SUPPLY()` returns the largest unsigned integer as a placeholder and is not a supply figure. Report `totalMinted()` as the live count.

Read `priceFor(wallet)` for the next paid slot. `quote(wallet, qty)` returns `(cost, cards)`. Given a proposed payment, `cardsFor(wallet, value)` returns `(cards, cost)`. Cost and value use wei. `quote(wallet, 0)` and `cardsFor(wallet, 0)` both return `(0, 0)`. Before opening, without an Agent ID or when the round is full, `quote` and `cardsFor` return `(0, 0)` and `priceFor` returns 0. Set qty to the total lanterns you want in the transaction. The quote is capped by the remaining slots and counts the unused first lantern at zero cost. A positive payment preview also includes the unused first lantern. Calling `mintPaid` with no BNB reverts.

With BNB, an available first lantern lights before paid slots are filled. After opening, for a wallet with an Agent ID and an unused free slot, a positive payment too small for a paid card yields `(1, 0)` from `cardsFor(wallet, value)`. The caller gets the free card and a full BNB refund. With the first slot used, the underfunded mint reverts. Use qty to get a quote. `mintPaid(uint256)` and `mint(uint256)` ignore the quantity argument and buy the available paid slots covered by the BNB value. Excess BNB is refunded in the same transaction. When choosing an entry from the quote, use `mintFree()` with zero value only if `quote` returns zero cost and exactly 1 card. A quote with no cards does not indicate a free mint.

For `mint(address)`, `mint(address,uint256)`, `mint(uint256,address)`, the contract ignores the address argument and any cards minted go to the caller. The caller also determines eligibility, round slots, rarity and refunds. Sending BNB with empty calldata follows the paid mint path. Minting checks the opening time first and then the caller’s Agent ID. A paid `claim()` reverts before the opening and eligibility checks.

With an unused first slot and minting open, 0.0005 BNB mints the first card and two paid cards, and returns 0.0001 BNB.

- `mintPaid(uint256)` — `0x26c7f77c`
- `mint(uint256)` — `0xa0712d68`
- `priceFor(address)` — `0xf12a7add` · Next paid slot price in wei. Returns 0 before opening, without an Agent ID or when no paid slot remains.
- `quote(address,uint256)` — `0x8f79306e` · Returns `(cost, cards)` for the requested total cards, including the unused free slot. Cost is in wei.
- `cardsFor(address,uint256)` — `0x2995649e` · Returns `(cards, cost)` for a proposed payment in wei. Positive value includes the unused free slot.
- `PRICE_LOW()` — `0x6386f4ae`
- `PRICE_HIGH()` — `0x3aa1154b`
- `PER_ROUND()` — `0x9b2774a3`

## 6. Forms

`formOf(id)` is 0 before sealing. After sealing, rare cards use code 4. Rarity is determined at mint by the previous block hash, the minting wallet and the card ID. Of the 1,000 possible results, 30 are rare. The final distinct Agent ID count sets the other forms.

| Code | Form | Condition | SCGLOW per claim |
| --- | --- | --- | --- |
| 1 | Quiet Lane | Fewer than 25 | 2,500 |
| 2 | Lantern Street | 25–100 | 12,500 |
| 3 | Lantern Festival | More than 100 | 60,000 |
| 4 | Dragon Lantern | Rare at mint | 250,000 |

- `formOf(uint256)` — `0x733792c6`
- `formName(uint8)` — `0x444d59b5`
- `isRare(uint256)` — `0x1fe09da3`
- `T1()` — `0xa11efef4`
- `T2()` — `0x84c9ad6e`

## 7. Claim

The no-argument `claim()` reverts with `LanternUseClaimWithId()` when sent BNB. A zero-value call is a free mint alias. To collect rewards, use `claim(uint256 id)` or `claimMany(uint256[] ids)`.

The current holder can claim once for a sealed card. The claim right follows the ERC-721 card and has no deadline. For each ID read card ownership, `claimable(id)`, `claimed(id)`, `feeFor(id)`, and `claimAmount(id)`. Check remaining supply with `poolBalance()`. Token amounts use 18 decimals. Standard fee is 0.00025 BNB and rare fee is 0.0005 BNB.

Use unique IDs and read `claimCost(ids)` via `eth_call` with `from` set to the intended holder’s wallet to quote the batch fee. Skip the batch if the quote is zero. Show the total fee before sending. Preview `claim(id)` with the fee, or `claimMany(ids)` with the total. A single claim refunds excess and reverts on underpayment or insufficient remaining supply. A batch skips ineligible cards and cards that exceed remaining token mint capacity. It processes IDs in order and stops at the first eligible card the remaining payment cannot cover. Unused BNB is refunded within the transaction. A paid batch with no successful claims reverts. Verify each ID in the receipt and report the amounts actually received.

- `claim(uint256)` — `0x379607f5`
- `claimMany(uint256[])` — `0x925489a8`
- `claim(uint256[])` — `0x6ba4c138`
- `claimReward(uint256[])` — `0xc94c7ff4`
- `claimable(uint256)` — `0xd1d58b25`
- `claimed(uint256)` — `0xdbe7e3bd`
- `feeFor(uint256)` — `0xad6f49a3`
- `claimAmount(uint256)` — `0x23b221a0`
- `AMOUNT_1()` — `0xd290384d` · First form claim amount in token base units.
- `AMOUNT_2()` — `0xb1756772` · Second form claim amount in token base units.
- `AMOUNT_3()` — `0x9ef7ed71` · Third form claim amount in token base units.
- `AMOUNT_4()` — `0x33b1cf98` · Rare form claim amount in token base units.
- `claimCost(uint256[])` — `0x8e8993e6` · Set `from` to the intended holder when reading.
- `claimFee()` — `0x99d32fc4`
- `poolBalance()` — `0x96365d44`

## 8. Read-only checks before sending

Verify chain ID, call target, sender, function, arguments, native value, and expected effect with your wallet’s transaction preview. Re-read the round, ownership and quote before sending. Minting and claiming require no approvals or separate transfers. Report the confirmed transaction hash and actual card IDs or received amounts. Use the verified ABI for exact custom error names. `LanternAnswerRequired` and `LanternWrongAnswer` are defined in the ABI and inactive while the quiz is disabled.

| ABI error | What to check |
| --- | --- |
| `LanternUseClaimWithId()` · `0xac11aceb` | A call to `claim()` with BNB. For claims, specify a card ID or use the batch function. |
| `LanternNotOpen` | Compare the latest block timestamp with saleStart(). |
| `LanternNeedAgentId` | Verify the sender’s Agent ID and registry ownership. |
| `LanternFreeUsed` | The caller’s Agent ID has already used the round’s first slot. Check freeUsed(wallet, round). |
| `LanternRoundFull` | The caller’s Agent ID has no available slots this round. |
| `LanternPaidTooLittle` | Check priceFor(wallet) for the next paid slot or feeFor(id) for a claim. |
| `LanternNotYours` | Check that the sender is the card’s current holder. |
| `LanternAlreadyClaimed` | Check claimed(id). |
| `LanternStillSealed` | Wait until roundEnd(roundOfCard(id)) has been reached. |
| `LanternPoolShort` | The remaining token mint capacity cannot cover the card’s claim amount. |
| `LanternEmptyBatch` | Supply at least one card ID in a batch claim. |
| `LanternPayeeRejected` | The same-transaction fee forwarding failed. |
| `LanternRefundRejected` | The same-transaction refund to the caller failed. |
| `LanternNoSuchEntryPoint` | Check the calldata selector. A direct payment uses empty calldata. |
| `LanternInvalidRound` | Check the round argument and read currentRound() after opening. |

## 9. Safety facts

`owner()` returns the zero address. Verified card source shows there is no admin, upgrade, pause or withdrawal path. Fees go to `PAYEE()`. Each successful payment is fully forwarded or refunded within the same transaction. The SCGLOW cap is 10,000,000,000 and only the card contract mints the token on successful claims. Verify the reward cap and mint authority in the token’s verified source. `poolBalance()` returns the remaining mintable amount.

- `owner()` — `0x8da5cb5b`
- `PAYEE()` — `0x7e306053`
- `tokenURI(uint256)` — `0xc87b56dd`
- `tokenDataURI(uint256)` — `0xa9407151`
- `contractURI()` — `0xe8a3d485`

### Indexer getters

- `maxPerWallet()` — `0x453c2310` · Returns 10 cards per Agent ID per round.
- `price()` — `0xa035b1fe`
- `mintPrice()` — `0x6817c76c`
- `totalMinted()` — `0xa2309ff8`
- `totalSupply()` — `0x18160ddd`
- `MAX_SUPPLY()` — `0x32cb6b0c` · Returns the maximum uint256 value. Cards have no overall supply cap. The token has a fixed cap. A single claim that exceeds the remaining capacity reverts with `LanternPoolShort`.

[Rules and getter table](./docs.html) · [Verification links](./#verify)

