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.

nsmarket/v2 package

Overview

nsmarket — names for sale, without anybody holding anything.

HOW A SALE WORKS, and why it is built this way.

The seller keeps their name. Listing does not move it here: it records an asking price and relies on the GRC-721 approval the seller has already granted this realm. Ownership does not change until somebody buys, and the seller can walk away at any moment by revoking the approval — at which point the listing simply stops working.

The buyer's money is never held either. Buy is ONE call: it checks the listing still stands, moves the name, pays the seller, takes the fee, refunds any overpayment. All of it inside the transaction the buyer signed. If any part fails the whole thing reverts and nothing moved.

Which means: at no point does this realm hold somebody else's name or somebody else's money. That is not a nice-to-have. An escrow that holds either one is a different kind of business, with a different set of rules, run by people with licences.

THIS REALM HAS NO VAULT PRIVILEGES. It is not in nsdata's trusted set and does not ask to be. Every transfer goes through nslogic's ordinary GRC-721 path, which means it can only move a name the owner has explicitly approved — the same permission any other marketplace would need. However wrong the code below turns out to be, the worst it can do is fail.

Function

SetFee

func SetFee(cur realm, spec string)
Ask AI Claude ChatGPT

SetFee changes it. Admin only, and validated here rather than trusted, because a malformed spec would otherwise be read on every sale and silently resolve to zero.

SetFee CANNOT WORK FROM HERE, and saying so is the fix.

nsdata.SetGlobalRecord opens with assertIsTrustedLogic, and this realm is deliberately outside the trusted set — types.gno says so in capitals, and the deploy panel actively revokes anything but nslogic. So every call here passed its own admin check and its own validation and then panicked inside the vault, for everybody, including the correct admin. A dead control that reads as live is worse than no control: it fails at signing time, during the incident that prompted reaching for it.

Granting nsmarket vault trust to fix this would surrender the property the whole realm is built around. So the setter moved to nslogic, which already has the grant, and runs the same parseFee validation there.

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/nsmarket/v2" -func "SetFee" -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/nsmarket/v2" -func "SetFee" -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