Skip to content Search Apps Documentation Source Content 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.

nsnft/v1 package

Overview

Package nsnft is the token, and only the token.

WHY THIS REALM EXISTS AT ALL.

A name here is a GRC-721. An external marketplace that wants to list one has to hard-code an address, and whatever address that is becomes the thing we can never move. Until now the interface was split: the READS lived on nsdata, which is permanent, and the WRITES — Approve, SetApprovalForAll, TransferFrom — lived on nslogic, which changed address three times in a single day. So the half an integrator needs in order to settle a sale was the half that kept moving, and the reads kept answering while it did, which is the worst way for it to break.

The fix is to pick ONE realm to freeze and make it the smallest, most boring one there is. That is this realm: an ownership ledger, the approval bookkeeping GRC-721 requires, the governance that decides who may mint, and nothing else. No prices, no expiry, no profiles, no policy — none of the things that will certainly need changing.

Everything with an opinion in it stays in the registry, which becomes replaceable BECAUSE ownership no longer lives there. A migration then moves records, not tokens: nobody's holdings are stranded and no listing anywhere goes stale, because the token contract never moved.

THE LEDGER IS THE CHAIN'S OWN gno.land/p/nt/grc721/v0, NOT A COPY.

chain.Emit stamps the package whose code emits, and wallets and indexers (Adena, the Onbloc indexer) accept only Transfer and NewToken events stamped gno.land/p/nt/grc721/v0. The first version of this realm minted on a vendored GRC-721 deployed under our own p/ path, so every event it would ever have emitted carried OUR path, and no wallet would ever have listed a single name — permanently, because events cannot be re-emitted and this realm cannot be replaced. The ledger object lives here, created once in init; only this realm holds its PrivateLedger, and no Teller is ever handed out (see the note on holds below).

THIS REALM HAS ITS OWN GOVERNANCE, AND THAT IS THE POINT.

It would be shorter to ask nsdata who the admin is. It would also re-couple this realm to the exact thing it exists to let us replace — nsnft would then depend on one nsdata forever and we would have moved the problem rather than solved it. So roles, trust and the timelock are local (governance.gno), and nsdata is not imported.

WHAT MAY BE CHANGED LATER AND WHAT MAY NOT.

May, slowly: which registries are trusted, the roles, the timelock, and which view realm draws the art. May, instantly: withdrawing a registry's trust or the art, which only ever removes a power. Through a trusted registry only: the hold bits on a token. May not: anything else. If this realm ever needs a new function, the design has failed and the honest answer is that it was not small enough to freeze.

Function

ProposeTrust

func ProposeTrust(cur realm, pkgPath string)
Ask AI Claude ChatGPT

ProposeTrust starts trusting a registry, by package path, after the timelock. Admin 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/nym-mnsrehearsal001/nsnft/v1" -func "ProposeTrust" -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/nym-mnsrehearsal001/nsnft/v1" -func "ProposeTrust" -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