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.

assets/v1 package

Overview

Package assets is Sinopia's immutable asset store for uploaded collections (docs/uploaded-collections.md §4–§6, §0a). An artist creates a store, declares artworks (on-chain bytes or IPFS CIDs, each with its sha256, editions, a creator-assigned tier and trait values), uploads the on-chain bytes in chunks, and seals it. A sealed store never changes: the upload engine (r/…/engines/upload) binds one sealed store to one Draft collection and reads its art from here.

Guarantees (design §14):

  • only the store's owner writes, and only from a wallet (direct MsgCall, IsUserCall); nothing here accepts or holds coins;
  • a store is Draft until Seal, which is irreversible: records, titles, dictionaries and bytes are immutable afterwards;
  • an "on-chain" artwork is complete only when every byte is stored, its sha256 equals the declared one and media.CheckImage passed (magic + dimensions; SVG through safe.AssertSVG, 16 KiB cap);
  • an "ipfs" artwork always says ipfs; a raw CID's digest is checked against the declared sha256 on chain;
  • every user string passed safe.AssertText; JSON goes through safe.JSONWriter.

Storage is paid by the owner who writes it, and only the owner can free Draft data (Truncate), so refunds go back to the payer (T8).

Function

NewStore

func NewStore(cur realm, label, traitTypes, tiers string) string
Ask AI Claude ChatGPT

NewStore creates an empty Draft store owned by the calling wallet. traitTypes and tiers are '|'-separated name lists ("" = none): at most 16 trait types and 8 tiers (tiers ordered low -> high), names 1..20 bytes, no ':' and no leading/trailing space, unique ignoring case; "Tier", "Edition", "Storage", "Status" and "Artwork" are reserved trait types. Returns the store id. Event StoreCreated{store, owner}.

Params

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/assets/v1" -func "NewStore" -args $'' -args $'' -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/assets/v1" -func "NewStore" -args $'' -args $'' -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/assets/v1, for example a function call with arguments.