row
func(id int64, p *v1.Proposal) stringEverything 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.
- OID
- 0909fd…c82a:3
row details
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.
- OID
- 0909fd…c82a:5
ListProposals details
parseKey
func(k string) int64- OID
- 0909fd…c82a:6
parseKey details
GetProposal
func(id int64) string- OID
- 0909fd…c82a:7
GetProposal details
CountProposals
func() int64- OID
- 0909fd…c82a:8
CountProposals details
HasVoted
func(id int64, voter .uverse.address) stringHasVoted lets the page grey out a button instead of letting somebody sign a transaction that is certain to be rejected.
- OID
- 0909fd…c82a:9
HasVoted details
CanTakePart
func(who .uverse.address) boolCanTakePart answers the one question the page needs before it offers any of this: does this address hold a name.
- OID
- 0909fd…c82a:10
CanTakePart details
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.
- OID
- 0909fd…c82a:11
Roster details
Version
func() stringVersion 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\`.
- OID
- 0909fd…c82a:12
Version details
Proposal
typeTwo 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
- OID
- 0909fd…c82a:14
proposals details
votes
v0.Tree// id + "/" + voter -> "y" | "n"
- OID
- 0909fd…c82a:16
votes details
nextID
int64Value
2
maxReason
intValue
280
maxPage
intValue
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.
- OID
- 0909fd…c82a:20
assertHolder details
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.
- OID
- 0909fd…c82a:22
assertNoSend details
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.
- OID
- 0909fd…c82a:23
assertIsAdmin details
key
func(id int64) stringSortable keys, so paging is in creation order rather than the order the strings happen to compare in. 000000001 sorts before 000000010.
- OID
- 0909fd…c82a:24
key details
voteKey
func(id int64, voter .uverse.address) string- OID
- 0909fd…c82a:25
voteKey details
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.
- OID
- 0909fd…c82a:26
assertLabel details
Propose
func(kind string, label string, reason string) int64Propose 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.
- OID
- 0909fd…c82a:27
Propose details
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.
- OID
- 0909fd…c82a:28
Vote details
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.
- OID
- 0909fd…c82a:29
Withdraw details
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.
- OID
- 0909fd…c82a:30
Resolve details
Purge
func(id int64) int64Purge 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.
- OID
- 0909fd…c82a:31