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.

nsdata/v2 package

Overview

Package nsdata is the registry — the records behind every name.

IT IS REPLACEABLE NOW, and that changes what every comment below means.

Until this generation the vault held ownership as well as records, which made it the one realm that could never be redeployed: a "new nsdata" was an empty registry and everybody's names with it. So everything here was written as if it would ship forever — no constants, no policy, no display code — and the comments say "can never be replaced" throughout.

Ownership has moved to nsnft, the small frozen token realm. This realm keeps records — dates, the frozen bit, TTL, profile data, reverse resolution, pricing globals, domains — and reads every owner from the ledger rather than storing one. Replacing it is a new package plus one Trust call on nsnft; no token moves, no holder notices. The integration address the outside world keeps is nsnft's, not this one's.

The two old rules still hold, for a better reason than before:

  1. NOTHING IS A CONSTANT. Term length, grace period, size caps — all settable. Not because a mistake would be permanent any more, but because a registry that needs a redeploy to change a number is a registry that gets redeployed carelessly.

  2. THE REGISTRY STORES, IT DOES NOT DECIDE. Pricing math, validation, what a profile field means — all of it lives in nslogic. Anything this realm "knows" is a rule that needs a migration to change.

Rule 2 is why Domain and Name carry an `extra` tree instead of a growing list of typed fields.

Function

ClearGuardian

func ClearGuardian(cur realm)
Ask AI Claude ChatGPT

ClearGuardian stands the pause capability down.

"Removing a power is never the dangerous direction" was the old reasoning here, and it is wrong in one specific way: removing this power restores the state in which SetGuardian is admin-callable. SetGuardian demands the RECOVERY key whenever a guardian is already set, and says why — a stolen admin key must not be able to disarm the emergency stop. ClearGuardian then SetGuardian was a two-transaction admin-only replacement of a live guardian, which defeats exactly that rule.

So standing down a LIVE guardian now takes the same key that replacing one takes. Clearing when there is no guardian stays open to either role, because then there is nothing to defeat.

The practical stakes are small — assertCanPause admits admin, recovery and guardian, so an operator holding recovery keeps Pause and RevokeTrustedLogic either way. It is fixed because this realm can never be redeployed, and a documented authorization rule that a two-call sequence walks around is not something to leave in permanent code.

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/nsdata/v2" -func "ClearGuardian" -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/nsdata/v2" -func "ClearGuardian" -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