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.

v1 state

Back to all declarations

row

func(id int64, p *v1.Proposal) string

Everything a caller needs about one request, on one line. Fields are separated by "|" rather than "," because a reason may well contain a comma; it may not contain "|" or a newline, which Propose enforces.

Open
OID
0909fd…c82a:3
row details

Inspect func

ListProposals

func(after string, limit int) (rows string, next string)

ListProposals pages newest first, which is the order anybody actually wants to read them in.

Open
OID
0909fd…c82a:5
ListProposals details

Inspect func

GetProposal

func(id int64) string
Open
OID
0909fd…c82a:7
GetProposal details

Inspect func

CountProposals

func() int64
Open
OID
0909fd…c82a:8
CountProposals details

Inspect func

HasVoted

func(id int64, voter .uverse.address) string

HasVoted lets the page grey out a button instead of letting somebody sign a transaction that is certain to be rejected.

Open
OID
0909fd…c82a:9
HasVoted details

Inspect func

CanTakePart

func(who .uverse.address) bool

CanTakePart answers the one question the page needs before it offers any of this: does this address hold a name.

Open
OID
0909fd…c82a:10
CanTakePart details

Inspect func

Roster

func(after string, limit int) (rows string, next string)

Roster is the raw material for the leaderboards: one line per name, owner first, so the caller can aggregate however it likes. It lives here rather than in nslogic because this realm is being deployed anyway and nslogic is not — adding it there would have cost a fresh deployment of the largest realm we have, for a read. Paged, and the page walks every name in it. That is fine at the scale this registry is at and it will not be fine at fifty thousand names; at that point the aggregate belongs somewhere it is kept as it changes rather than recomputed on every read.

Open
OID
0909fd…c82a:11
Roster details

Inspect func

Version

func() string

Version lets a caller find out what it is talking to BEFORE it sends a transaction that would be rejected for having the wrong number of arguments. v1 has no such function, so a nil answer is itself the answer: an older realm. That is cheaper and more honest than the site assuming the newest shape and failing at signing time, which is exactly what happened when Propose grew a \`kind\`.

Open
OID
0909fd…c82a:12
Version details

Inspect func

Proposal

type

Two things get asked for here, and they are not the same request. domain a new *domain to sell names under chain a new blockchain to accept an address for on profiles The kind is stored rather than inferred from the label, because "solana" is a plausible request of either sort and guessing wrong files somebody's vote under the wrong question.

Value

v1.Proposal

proposals

v0.Tree

// id (zero-padded) -> \*Proposal

Open
OID
0909fd…c82a:14
proposals details

Inspect ref

votes

v0.Tree

// id + "/" + voter -> "y" | "n"

Open
OID
0909fd…c82a:16
votes details

Inspect ref

nextID

int64

Value

2

maxReason

int

Value

280

maxPage

int

Value

200

assertHolder

func(caller .uverse.address)

A name is the ballot. Not a token balance and not a GNOT balance: holding a name is the one thing that cannot be borrowed for an afternoon, and it is the population this actually concerns.

Open
OID
0909fd…c82a:20
assertHolder details

Inspect func

assertNoSend

func()

assertNoSend refuses coins, on every entry point. types.gno states "It holds no funds, at any point, for anybody" — and until now nothing enforced it. This package contained no banker, no OriginSend and no withdrawal path of any kind, so ugnot attached to a Propose or a Vote landed at the realm's address and stayed there forever, unreachable even by a successor realm. Nobody would do it on purpose; a fat-fingered wallet or a script reusing a payment helper would. The early return matters: a call arriving from another realm carries no OriginSend of its own to inspect, and treating that as an error would break composition for a check that has nothing to look at.

Open
OID
0909fd…c82a:22
assertNoSend details

Inspect func

assertIsAdmin

func(caller .uverse.address)

The admin is READ FROM THE VAULT rather than stored here. Two copies of "who is in charge" is how a revoked admin keeps power somewhere nobody remembered to look.

Open
OID
0909fd…c82a:23
assertIsAdmin details

Inspect func

key

func(id int64) string

Sortable keys, so paging is in creation order rather than the order the strings happen to compare in. 000000001 sorts before 000000010.

Open
OID
0909fd…c82a:24
key details

Inspect func

voteKey

func(id int64, voter .uverse.address) string
Open
OID
0909fd…c82a:25
voteKey details

Inspect func

assertLabel

func(label string)

The same shape a domain must have. A chain is asked for by its ticker, which fits the same rule, so one check covers both — and it keeps a proposal from asking for something that could never be created.

Open
OID
0909fd…c82a:26
assertLabel details

Inspect func

Propose

func(kind string, label string, reason string) int64

Propose asks for a domain or for a chain. Anyone holding a name may ask. The proposer pays the storage for their own proposal, and nothing else. That cost is the whole of the spam control: it is small enough that a real request is nothing to think about and large enough that filling the tree with rubbish is not free.

Open
OID
0909fd…c82a:27
Propose details

Inspect func

Vote

func(id int64, yes bool)

Vote records a yes or no. One per address per proposal, and it cannot be changed: a vote that can be switched turns the count into a race against whoever is watching, and there is no deadline here to make that fair.

Open
OID
0909fd…c82a:28
Vote details

Inspect func

Withdraw

func(id int64)

Withdraw closes a request the proposer no longer wants. The votes already cast stay: deleting them would refund their storage to whoever called this, which is not the person who paid it.

Open
OID
0909fd…c82a:29
Withdraw details

Inspect func

Resolve

func(id int64, accepted bool)

Resolve records what was decided. It does NOT create the domain — that stays a separate, deliberate call in nslogic. A vote is advice, and the vault has no undo.

Open
OID
0909fd…c82a:30
Resolve details

Inspect func

Purge

func(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.

Open
OID
0909fd…c82a:31
Purge details

Inspect func
row : func(id int64, p *v1.Proposal) string Inspect
ListProposals : func(after string, limit int) (rows string, next string) Inspect
parseKey : func(k string) int64 Inspect
GetProposal : func(id int64) string Inspect
CountProposals : func() int64 Inspect
HasVoted : func(id int64, voter .uverse.address) string Inspect
CanTakePart : func(who .uverse.address) bool Inspect
Roster : func(after string, limit int) (rows string, next string) Inspect
Version : func() string Inspect
Proposal : type =v1.Proposal
proposals : v0.Tree Inspect
votes : v0.Tree Inspect
nextID : int64 =2
maxReason : int =280
maxPage : int =200
assertHolder : func(caller .uverse.address) Inspect
assertNoSend : func() Inspect
assertIsAdmin : func(caller .uverse.address) Inspect
key : func(id int64) string Inspect
voteKey : func(id int64, voter .uverse.address) string Inspect
assertLabel : func(label string) Inspect
Propose : func(kind string, label string, reason string) int64 Inspect
Vote : func(id int64, yes bool) Inspect
Withdraw : func(id int64) Inspect
Resolve : func(id int64, accepted bool) Inspect
Purge : func(id int64) int64 Inspect