Skip to content Search Apps Documentation Source Content Run Reset Eval Playground File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

upload package

Overview

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:

  • art theft (T1): ValidateParams accepts a store only when its owner signs the Create tx; Bind needs caller == collection creator == store owner, from a wallet;
  • no swap after sale (T2): stores are sealed before Bind and never change; params are fixed by core; Bind and Unbind run only while core says Draft, i.e. before any token was ever minted;
  • one collection per store (T3); slots == maxSupply (T13);
  • snipe resistance (T4/T5): before Final core shows its placeholder and never calls Render/Traits; every read here checks Final too; the assignment needs the final salt; Render answers core's real call only (CollectionID, params and seed must match core's), so RenderWith (CollectionID "0") always gets the generic card;
  • SA-L5: this realm and assets/v1 may not be payees (Bind refuses);
  • I-12: Render, Traits and ValidateParams only read; Bind, Unbind and Settle are crossing functions; there is no exported non-crossing mutator.

The adapter is stateful by design (bindings and cached keys), declares Living false, takes no fee (D3) and holds no coins.

Functions

AssetsPath

func AssetsPath() string
Ask AI Claude ChatGPT

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1jz6j9hj6rdf5ltl2kcrpa4jwtdh3w30z0yul06/sinopia3/engines/upload.AssetsPath()"

Result

Assignment

func Assignment(cid, tid string) (ready bool, slot, edition int64, a media.Artwork)
Ask AI Claude ChatGPT

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.

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1jz6j9hj6rdf5ltl2kcrpa4jwtdh3w30z0yul06/sinopia3/engines/upload.Assignment(,)"

Result

Bind

func Bind(cur realm, cid string)
Ask AI Claude ChatGPT

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}.

Param

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/g1jz6j9hj6rdf5ltl2kcrpa4jwtdh3w30z0yul06/sinopia3/engines/upload" -func "Bind" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "onyx-1" -remote "https://rpc.onyx.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.onyx.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g1jz6j9hj6rdf5ltl2kcrpa4jwtdh3w30z0yul06/sinopia3/engines/upload" -func "Bind" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "onyx-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.onyx.testnets.gno.land" call.tx
  

IsUpload

func IsUpload(cid string) bool
Ask AI Claude ChatGPT

IsUpload reports whether cid's engine is this adapter.

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1jz6j9hj6rdf5ltl2kcrpa4jwtdh3w30z0yul06/sinopia3/engines/upload.IsUpload()"

Result

Readiness

func Readiness(cid string) (ready bool, reason, store, badge string)
Ask AI Claude ChatGPT

Readiness is the typed Status for other realms.

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1jz6j9hj6rdf5ltl2kcrpa4jwtdh3w30z0yul06/sinopia3/engines/upload.Readiness()"

Result

Register

func Register(cur realm) string
Ask AI Claude ChatGPT

Register is an explicit call (not init: under the inert package policy init runs in the approver's tx). Anyone may call it, once.

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/g1jz6j9hj6rdf5ltl2kcrpa4jwtdh3w30z0yul06/sinopia3/engines/upload" -func "Register" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "onyx-1" -remote "https://rpc.onyx.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.onyx.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g1jz6j9hj6rdf5ltl2kcrpa4jwtdh3w30z0yul06/sinopia3/engines/upload" -func "Register" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "onyx-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.onyx.testnets.gno.land" call.tx
  

Render

func Render(path string) string
Ask AI Claude ChatGPT

Render stays minimal; uploaded collections are browsed in the gallery.

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1jz6j9hj6rdf5ltl2kcrpa4jwtdh3w30z0yul06/sinopia3/engines/upload.Render()"

Result

SelfPath

func SelfPath() string
Ask AI Claude ChatGPT

SelfPath and AssetsPath are the engine id and the store realm it reads.

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1jz6j9hj6rdf5ltl2kcrpa4jwtdh3w30z0yul06/sinopia3/engines/upload.SelfPath()"

Result

SetComposition

func SetComposition(cid string) string
Ask AI Claude ChatGPT

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).

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1jz6j9hj6rdf5ltl2kcrpa4jwtdh3w30z0yul06/sinopia3/engines/upload.SetComposition()"

Result

Settle

func Settle(cur realm, cid string)
Ask AI Claude ChatGPT

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).

Param

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/g1jz6j9hj6rdf5ltl2kcrpa4jwtdh3w30z0yul06/sinopia3/engines/upload" -func "Settle" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "onyx-1" -remote "https://rpc.onyx.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.onyx.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g1jz6j9hj6rdf5ltl2kcrpa4jwtdh3w30z0yul06/sinopia3/engines/upload" -func "Settle" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "onyx-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.onyx.testnets.gno.land" call.tx
  

Status

func Status(cid string) string
Ask AI Claude ChatGPT

Status is {cid, upload, state, store, bound, ready, reason, badge, settled, maxSupply, slots}. The frontend shows the mint UI only when ready (T14).

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1jz6j9hj6rdf5ltl2kcrpa4jwtdh3w30z0yul06/sinopia3/engines/upload.Status()"

Result

StorageBadge

func StorageBadge(cid string) string
Ask AI Claude ChatGPT

StorageBadge is "computed" (any other engine), "onchain", "ipfs", "mixed", or "unbound" for an upload collection that is not ready (§9).

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1jz6j9hj6rdf5ltl2kcrpa4jwtdh3w30z0yul06/sinopia3/engines/upload.StorageBadge()"

Result

StoreOf

func StoreOf(cid string) string
Ask AI Claude ChatGPT

StoreOf is the store named by cid's params ("" if none).

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1jz6j9hj6rdf5ltl2kcrpa4jwtdh3w30z0yul06/sinopia3/engines/upload.StoreOf()"

Result

TokenArtwork

func TokenArtwork(cid, tid string) string
Ask AI Claude ChatGPT

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).

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1jz6j9hj6rdf5ltl2kcrpa4jwtdh3w30z0yul06/sinopia3/engines/upload.TokenArtwork(,)"

Result

TokenImage

func TokenImage(cid, tid string) string
Ask AI Claude ChatGPT

TokenImage is the inline image: a data URI for on-chain art, "" for IPFS art (never a remote URL); core's placeholder before Final.

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1jz6j9hj6rdf5ltl2kcrpa4jwtdh3w30z0yul06/sinopia3/engines/upload.TokenImage(,)"

Result

TokenMetadata

func TokenMetadata(cid, tid string) string
Ask AI Claude ChatGPT

TokenMetadata is the canonical metadata (§10.2). Before Final: core's placeholder image and [{Status: Unrevealed}].

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1jz6j9hj6rdf5ltl2kcrpa4jwtdh3w30z0yul06/sinopia3/engines/upload.TokenMetadata(,)"

Result

TokenTraitList

func TokenTraitList(cid, tid string) []engine.Trait
Ask AI Claude ChatGPT

TokenTraitList is the typed real-name trait list of one token (a copy).

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1jz6j9hj6rdf5ltl2kcrpa4jwtdh3w30z0yul06/sinopia3/engines/upload.TokenTraitList(,)"

Result

TokenTraits

func TokenTraits(cid, tid string) string
Ask AI Claude ChatGPT

TokenTraits is TokenTraitList as [{"trait_type","value"}] JSON.

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1jz6j9hj6rdf5ltl2kcrpa4jwtdh3w30z0yul06/sinopia3/engines/upload.TokenTraits(,)"

Result

TokenURI

func TokenURI(cid, tid string) (string, error)
Ask AI Claude ChatGPT

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.

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1jz6j9hj6rdf5ltl2kcrpa4jwtdh3w30z0yul06/sinopia3/engines/upload.TokenURI(,)"

Result

TraitCounts

func TraitCounts(cid string, offset, limit int64) string
Ask AI Claude ChatGPT

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).

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1jz6j9hj6rdf5ltl2kcrpa4jwtdh3w30z0yul06/sinopia3/engines/upload.TraitCounts(,,)"

Result

TraitJSONLists

func TraitJSONLists(cid string, offset, limit int64) ([]string, []string)
Ask AI Claude ChatGPT

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.

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1jz6j9hj6rdf5ltl2kcrpa4jwtdh3w30z0yul06/sinopia3/engines/upload.TraitJSONLists(,,)"

Result

TraitLists

func TraitLists(cid string, offset, limit int64) ([]string, [][]engine.Trait)
Ask AI Claude ChatGPT

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.

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1jz6j9hj6rdf5ltl2kcrpa4jwtdh3w30z0yul06/sinopia3/engines/upload.TraitLists(,,)"

Result

TraitsBatch

func TraitsBatch(cid string, offset, limit int64) string
Ask AI Claude ChatGPT

TraitsBatch is [{tid, traits:[{trait_type, value}]}] for tokens offset+1 … offset+limit (limit <= MaxTraitsBatch), burned tokens skipped.

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1jz6j9hj6rdf5ltl2kcrpa4jwtdh3w30z0yul06/sinopia3/engines/upload.TraitsBatch(,,)"

Result

Unbind

func Unbind(cur realm, cid string)
Ask AI Claude ChatGPT

Unbind releases the store while the collection is still a Draft. Creator only. Event StoreUnbound{store, cid}.

Param

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/g1jz6j9hj6rdf5ltl2kcrpa4jwtdh3w30z0yul06/sinopia3/engines/upload" -func "Unbind" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "onyx-1" -remote "https://rpc.onyx.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.onyx.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g1jz6j9hj6rdf5ltl2kcrpa4jwtdh3w30z0yul06/sinopia3/engines/upload" -func "Unbind" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "onyx-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.onyx.testnets.gno.land" call.tx
  

Gno Expression Evaluator

Evaluate any read-only Gno expression against gno.land/r/g1jz6j9hj6rdf5ltl2kcrpa4jwtdh3w30z0yul06/sinopia3/engines/upload, for example a function call with arguments.