Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

nsvote/v1 package

Overview

Package nsvote holds domain requests and the votes on them.

A SEPARATE REALM, and deliberately so. It never writes to nsdata: it only reads it, to answer two questions — does this address hold a name, and who is the admin. So it needs no trusted-logic grant, it cannot corrupt the registry however wrong its own logic turns out to be, and it can be replaced or abandoned without touching a single name anybody owns.

WHAT IT DOES NOT DO

It does not create domains. A vote is advice; creating the domain stays a deliberate admin call in nslogic. Wiring the two together would mean a majority could add a domain nobody had looked at, and the vault has no undo.

It holds no funds, at any point, for anybody. The only cost of proposing or voting is the storage each writer pays for their own bytes, which the chain moves directly and which comes back if the record is ever deleted.

Function

Purge

func Purge(cur realm, id int64) int64

Purge deletes a closed request and its votes, releasing the storage.

The refund goes to WHOEVER SIGNS THIS, which is not the people who paid — so it is admin-only and it is not a tidying operation to run casually. It exists because a registry that can only ever grow is worse, not because reclaiming somebody else's deposit is free money.

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/g1xr6tgxnpled50h74eafmvxway7z0ytr5rsmeme/nsvote/v1" -func "Purge" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "pearl-1" -remote "https://rpc.pearl.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.pearl.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g1xr6tgxnpled50h74eafmvxway7z0ytr5rsmeme/nsvote/v1" -func "Purge" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "pearl-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.pearl.testnets.gno.land" call.tx