const ReasonNotUpload, ReasonNoStore, ReasonNotSealed, ReasonBoundElsewhere, ReasonSupply, ReasonUnbound, ReasonReady
Readiness reasons (Status.reason).
Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.
Package upload is the engine/v1 adapter for uploaded collections (docs/uploaded-collections.md §5.3, §7–§10, §0a). Co...
Package upload is the engine/v1 adapter for uploaded collections (docs/uploaded-collections.md §5.3, §7–§10, §0a). Core knows it as one more engine; each collection's params name one sealed asset store ("store:<id>", r/…/assets/v1) and Bind locks that store to the collection while it is a Draft. After the reveal every token shows the artwork of the slot a salt-keyed permutation gives it.
What holds, and why:
The adapter is stateful by design (bindings and cached keys), declares Living false, takes no fee (D3) and holds no coins.
Readiness reasons (Status.reason).
Core-path trait slots (engine/v1 manifests fix their trait types at registration, so creator trait types appear as "Trait k" = "<Type>: <Value>").
MaxTraitsBatch bounds TraitsBatch (JSON); MaxTraitLists bounds the typed TraitLists the reader pages rarity counts with. Both compute the permutation key once per call (§0a), never per token. Sized so the worst store the asset limits allow stays <= 1B test gas per call (review UP-M1; r/reader/zz_worst_gas_test.gno).
FeeBps is the engine-author fee (D3: none; fixed forever at Register).
Assignment is the typed TokenArtwork for other realms (gallery): ready is false before Final or when the collection is not ready; a is a copy.
Bind locks the collection's store (its params "store:<id>") to the collection. Caller == core creator == store owner, from a wallet; core state Draft; the collection uses this engine; the store is sealed and not bound elsewhere; maxSupply == the store's slots; no primary or royalty payee is this realm or assets/v1 (SA-L5). Event StoreBound{store, cid}.
IsUpload reports whether cid's engine is this adapter.
Readiness is the typed Status for other realms.
Register is an explicit call (not init: under the inert package policy init runs in the approver's tx). Anyone may call it, once.
Render stays minimal; uploaded collections are browsed in the gallery.
SelfPath and AssetsPath are the engine id and the store realm it reads.
SetComposition is {collection, store, ready, reason, set}, set = assets.Composition of the collection's store: slots per tier and per trait value over the planned set (public and fixed before the sale, D8).
Settle caches the permutation key once the collection is Final. Anyone may call it; it is deterministic (the salt is final) and idempotent, and it only saves read gas: the lazy path computes the same key. Event Settled{cid, key} (first call only).
Status is {cid, upload, state, store, bound, ready, reason, badge, settled, maxSupply, slots}. The frontend shows the mint UI only when ready (T14).
StorageBadge is "computed" (any other engine), "onchain", "ipfs", "mixed", or "unbound" for an upload collection that is not ready (§9).
StoreOf is the store named by cid's params ("" if none).
TokenArtwork is the token's assignment as JSON: {collection, tid, revealed, ready, reason} and, once revealed and ready, {store, artwork, slot, edition, editions, assignment, kind, mime, mimeType, size, sha256, digest, cid, uri, tier, tierSource, title, traits}. uri is "ipfs://<cid>" for IPFS art and "" for on-chain art (read its bytes with TokenImage / TokenURI: base64 of up to 256 KiB is not free).
TokenImage is the inline image: a data URI for on-chain art, "" for IPFS art (never a remote URL); core's placeholder before Final.
TokenMetadata is the canonical metadata (§10.2). Before Final: core's placeholder image and [{Status: Unrevealed}].
TokenTraitList is the typed real-name trait list of one token (a copy).
TokenTraits is TokenTraitList as [{"trait_type","value"}] JSON.
TokenURI is the canonical art URI: "data:<mime>;base64,…" for on-chain art, "ipfs://<cidv1>" for IPFS art; core's placeholder before Final and core's TokenURI (the generic card) for a collection that is not ready.
TraitCounts is {"n": tokens counted, "counts": {type: {value: count}}} over tokens offset+1 … offset+limit (limit <= MaxTraitCounts, burned skipped), with the creator's real names: Tier, the creator's trait types (store order, values in dictionary order), Edition, Storage. Before Final every token counts as {"Status": "Unrevealed"}, Final but not ready as {"Status": "Not ready"}. One permutation key per call; the counting runs in assets/v1 over integer ids (review UP-M1).
TraitJSONLists is TraitLists with each token's traits as a JSON array (the bytes TokenTraits returns), for pages that print them (reader.Cards). limit <= MaxTraitJSONLists.
TraitLists returns, for tokens offset+1 … offset+limit (limit <= MaxTraitLists, burned tokens skipped), the token ids and their real-name traits. The permutation key is computed once per call.
TraitsBatch is [{tid, traits:[{trait_type, value}]}] for tokens offset+1 … offset+limit (limit <= MaxTraitsBatch), burned tokens skipped.
Unbind releases the store while the collection is still a Draft. Creator only. Event StoreUnbound{store, cid}.