realmPath
untyped stringrealmPath is this realm's own path, the one its gnomod.toml module line declares. Render builds its links from it rather than from unsafe.CurrentRealm(), which in a plain read reports the CALLER.
Value
"gno.land/r/moul/x/social/curated/v0"
Denom
untyped stringValue
"ugnot"
Deposit
int64Value
1000000
ChallengeBlocks
int64Value
1000
list
*v0.Registrylist is every entry and the credit ledger behind them. A redeploy would wipe it while leaving the coins at the address, which is what the note in gnomod.toml is about.
- OID
- 094fa8…3c9c:4
list details
Apply
func(key string, url string, description string)Apply lists an entry under key, in exchange for exactly [Deposit](#Deposit) ugnot. The entry is on the list the moment this returns: there is no application period in v0, and the check on a bad entry is that anybody can challenge it. The deposit comes back through [Unlist](#Unlist) and [Withdraw](#Withdraw) if nobody ever does. key is a slug: lowercase ASCII letters, digits, '-', '\_' and '.', starting alphanumeric. A key whose entry was removed is free to apply for again.
- OID
- 094fa8…3c9c:8
Apply details
Challenge
func(key string)Challenge objects to an entry, in exchange for a bond equal to that entry's own deposit, and opens a vote that closes [ChallengeBlocks](#ChallengeBlocks) blocks later. An owner cannot challenge their own entry: it would cost them nothing and would make the entry immune to a real challenge for the whole window.
- OID
- 094fa8…3c9c:10
Challenge details
Vote
func(key string, keep bool)Vote takes a side on an open challenge: keep the entry, or remove it. One address, one vote, unweighted, and it cannot be changed. An address is free, so this is cheap to manufacture; see the package doc.
- OID
- 094fa8…3c9c:11
Vote details
Resolve
func(key string)Resolve closes a challenge whose window has passed. Anyone may call it, so neither party can stall the other by sitting still. A majority of keep votes keeps the entry and credits its owner the bond. Otherwise the entry is removed and the challenger is credited the bond plus the deposit. A tie, including nobody voting at all, keeps the entry: the incumbent is the one already at risk, so a challenge that convinced nobody loses, which is what makes being wrong cost something.
- OID
- 094fa8…3c9c:12
Resolve details
Unlist
func(key string)Unlist takes the caller's own entry off the list and credits them the deposit back, which [Withdraw](#Withdraw) then pays out. It is refused while a challenge is open: an owner who could walk away mid-challenge would be risking nothing, which is the one thing the deposit exists to prevent.
- OID
- 094fa8…3c9c:13
Unlist details
Withdraw
func() int64Withdraw pays the caller everything credited to them and returns it. This is the only way coins leave the realm. The credit is zeroed before the transfer, so a reentrant call finds nothing left to take.
- OID
- 094fa8…3c9c:14
Withdraw details
Get
func(key string) (url string, description string, owner .uverse.address, deposit int64, at int64, state string)- OID
- 094fa8…3c9c:15
Get details
Count
func() intCount is how many entries are on the list right now. A challenged entry counts: a challenge is an objection, not a verdict.
- OID
- 094fa8…3c9c:16
Count details
Listed
func() []stringListed is every key on the list, oldest first.
- OID
- 094fa8…3c9c:17
Listed details
IsListed
func(key string) boolIsListed reports whether key is on the list right now.
- OID
- 094fa8…3c9c:18
IsListed details
ChallengeOf
func(key string) (challenger .uverse.address, bond int64, deadline int64, keep int64, remove int64, open bool)- OID
- 094fa8…3c9c:19
ChallengeOf details
CreditOf
func(who .uverse.address) int64CreditOf is what who can collect with [Withdraw](#Withdraw) right now.
- OID
- 094fa8…3c9c:20
CreditOf details
caller
func() .uverse.address- OID
- 094fa8…3c9c:21
caller details
Render
func(path string) stringRender routes two views: the list itself, and one entry. A key never contains a slash, so "entry/\<key>" is a prefix strip rather than a path element that would have to be rejoined.
- OID
- 094fa8…3c9c:22
Render details
renderIndex
func() string- OID
- 094fa8…3c9c:24
renderIndex details
renderEntry
func(key string) string- OID
- 094fa8…3c9c:25
renderEntry details
listing
func(entries []*v0.Entry) stringlisting renders the entries as the list itself: the key links to its page, the description links to the thing it describes.
- OID
- 094fa8…3c9c:26
listing details
challengeTable
func(entries []*v0.Entry) stringchallengeTable renders the open challenge against each of entries. An entry with none is skipped rather than shown blank.
- OID
- 094fa8…3c9c:27
challengeTable details
entryURL
func(key string) stringentryURL is the gnoweb path of one entry's page. The chain domain is the first element of a package path and a gnoweb path is the rest of it, so this is a prefix strip and not a hostname to hardcode.
- OID
- 094fa8…3c9c:28
entryURL details
applyURL
func() stringapplyURL is the Apply form with the deposit already attached, so a reader never has to work out what -send should say.
- OID
- 094fa8…3c9c:29
applyURL details
challengeURL
func(key string, bond int64) stringchallengeURL is the same for Challenge, carrying that entry's own bond.
- OID
- 094fa8…3c9c:30
challengeURL details
send
func(amount int64) string- OID
- 094fa8…3c9c:31