A mintpad is a page that sells a collection or a token to whoever opens it: press the button, confirm, and a random piece of the collection (or a lot of the token) is yours. The Launchpad wizard (Create → Launchpad wizard) makes one from a set of ready-made looks. This guide is for building your own page instead: any design, any animation, anything a page can do, selling through the same wallet machinery.
A mintpad is two things, and only one of them is the page.
What makes a page a mintpad is the JSON inscribed beside it. The Exchange's Mintpads tab lists every page whose JSON says it is a pad for its own creator's collection or token, as long as there is something left to mint. If you inscribe a new pad for the same collection or token, it replaces the old one in that list.
A collection: run the Launchpad wizard for it once, with your price.
The price is in coins, or in any token: fill in Paid in with the token's
number (19 for PLASMA) and the price is that many of it. The piece and the
token then move in one transaction, or neither does. It
signs your pieces over, puts the sales on the chain and inscribes a
standard page. Your own page, inscribed afterwards, replaces the standard
one on the Exchange, and both keep working.
A token: put a sell order on the Exchange (Exchange → Tokens → your token → Sell) for the whole amount you want to sell, at your price per token. No wizard needed. Each mint takes one lot from that order, and partial fills are automatic.
Start from a working one: open any mintpad's page on its own at
/content/<its id> and view its source. The standard pages are short, and
everything below is visible in them.
GET /r/mintpad/<creator>/<collection>
{ "left": 12, "prices": [1000000], "price_texts": ["0.01 coins"],
"next": { "listing": "…", "piece": "…", "number": 57, "edition": 12,
"price": 1000000, "maker": "…" },
"listed": ["…", "…"] }
left is how many pieces can still be minted; next is one of them,
picked at random each time you ask. A mint is always a random piece.prices are in the chain's smallest unit (100,000,000 is one coin).
For a pad priced in a token they are 0: read price_texts instead, which
says every price in words ("200 PLASMA"), whatever it is paid in.GET /r/collection/<creator>/<collection> gives the pictures and the
count, for drawing the collection.To mint, ask the wallet:
parent.postMessage({arcade: "mint", seq: 1, listing: next.listing,
piece: next.piece, name: "My Collection #12"}, "*");
GET /r/book/<property id>?address=<your address>
{ "property_id": 19, "name": "PLASMA", "divisible": true,
"asks": [ { "order": "…", "address": "…", "tokens": 100000000000,
"coins": 1000000000, "pending": false, "taking": 0 } ] }
pending and has at least one lot free:
tokens - taking units.floor(coins × lot ÷ tokens) in the smallest unit.To mint a lot, ask the wallet to take it from the order:
parent.postMessage({arcade: "take", seq: 1, order: ask.order, units: LOT}, "*");
The wallet answers with messages carrying the same arcade and seq:
{heard: true}: it has the request and is asking the person.{ok: true, txid}: bought. It is theirs when the block lands; read the
counts again after a few seconds.{error}: not bought. "Cancelled." means the person closed the card;
anything else is a reason to show them.If no heard arrives within about four seconds, the page is not open inside
the arcade: say "Open this mintpad on DogecoinArcade to mint from it."
A page shown in a post can ask for the room it needs:
parent.postMessage({arcade: "size", height: 640}, "*").
What the person sees is the arcade's own confirmation card, outside your page: what they get, the price, the network fee. The purchase is one transaction their own browser checks and signs. Your page cannot change the price or press anything on their behalf.
Inscribe your page from your own wallet, with Inscribe one thing on the NFTs page. Open JSON beside the file and enter one of these, with your own address as the creator (it is on Wallet → Coins):
A collection:
{"name": "Space Frogs mintpad",
"mintpad": {"creator": "<your address>", "collection": "Space Frogs"}}
A token (lot in base units: 50 whole tokens of a divisible token is
5000000000):
{"name": "PLASMA mintpad",
"tokenpad": {"creator": "<your address>", "property_id": 19, "lot": 5000000000}}
The creator has to be the address that inscribes the page, so nobody can make a pad that claims to sell your collection. Once the inscription is in a block, your page is on the Exchange under Mintpads.