How a card is made
Three contracts, three signatures. Each step does one thing, and none of them is custodial.
A card is not minted in one call. It is assembled: parts are bought, burned into a circuit, and then numbered. The three steps are separate because they touch three different contracts with three different jobs.
Step 1 — buy the parts
mint(uint256 transistorId, uint256 amount)
value = amount × 0.0000234 + 0.0001 BNB
This transfers the gates to your wallet. Nothing is burned yet, and no card exists.
Step 2 — tape out
tapeout(bytes netlist, uint32 nIn, uint32 nOut)
value = 0.0002 BNB exactly
The calldata contains the full netlist. For a 46-gate adder that is 322 bytes; for a 2,118-gate multiplier it is 14,826 bytes. The contract decodes the gates, counts them, burns that many from your balance, and stores the netlist under a new token id.
After this step you own a card, but it has no edition number. It is a circuit with a token id and a gate count.
Step 3 — stamp the edition
claim(uint16 epoch, uint8 drawingId, address cpu, uint256 circuitId)
The registry hashes the stored netlist, compares it with the drawing registered for this foundry, and issues the next number for that drawing. The drawing's maximum is enforced here: if all numbers are issued, the call reverts.
Why three transactions
They are three contracts, and each does one job. A single button would require a router that takes custody of your funds between steps. We chose the extra signature.
What each step costs
| Step | Value | Gas (observed) | Produces |
|---|---|---|---|
| Mint parts | gates × 0.0000234 + 0.0001 | ~60k–200k, scales with amount | ERC-1155 gates |
| Tape out | 0.0002 | ~330k–400k, scales with netlist | ERC-721 circuit + netlist on chain |
| Claim edition | 0 | ~88k | A number in the registry |
Gas varies with network conditions and netlist size. It is paid to BNB Chain, not to the foundry.
Failure modes
- Mint reverts — usually an incorrect value. Nothing changes; retry with the quoted amount.
- Tapeout reverts — the wallet's simulation rejects the call, or the balance is short. Gates stay in your wallet.
- Claim reverts — the drawing is at its cap, or the drawing id does not match the netlist. The circuit is still yours; it simply has no number.