ProposeAdd
func(payload string) dao.ProposalRequestProposeAdd adds an item at once, with no veto window: GovDAO is the veto.
- OID
- 0dd03e…f00c:3
ProposeAdd details
ProposeVeto
func(id int) dao.ProposalRequestProposeVeto vetoes an item still in its veto window.
- OID
- 0dd03e…f00c:5
ProposeVeto details
ProposeRemove
func(id int) dao.ProposalRequestProposeRemove removes an item at once.
- OID
- 0dd03e…f00c:6
ProposeRemove details
ProposePause
func(on bool) dao.ProposalRequestProposePause pauses sugar proxy (on) or resumes it: while paused, apps carry nothing and nothing new is added except by GovDAO.
- OID
- 0dd03e…f00c:7
ProposePause details
ProposeDelegate
func(path string) dao.ProposalRequestProposeDelegate names the realm that may add and remove sites ("" for none).
- OID
- 0dd03e…f00c:8
ProposeDelegate details
ProposeGuardian
func(a .uverse.address) dao.ProposalRequestProposeGuardian names the address that may veto and pause ("" for none).
- OID
- 0dd03e…f00c:9
ProposeGuardian details
ProposeVetoWindow
func(kind string, seconds int64) dao.ProposalRequestProposeVetoWindow sets how long an added item of a kind waits before it counts, in seconds (one hour to 60 days).
- OID
- 0dd03e…f00c:10
ProposeVetoWindow details
describeItem
func(id int) string- OID
- 0dd03e…f00c:11
describeItem details
joinFields
func(f []string) string- OID
- 0dd03e…f00c:12
joinFields details
ledger
*v0.LedgerSUGAR, the governance token: kourt's grc20votes ledger (balances checkpointed per epoch of 720 blocks, about an hour, so a vote weighs what a holder held before the proposal) and kourt's governor over it. Both packages are deployed under Jae's address on gnoland-1. The governor's proposals here are of two kinds of this realm's own: add an item, remove one. Holders propose with Propose(cur, kind, payload, title), vote with Vote, and anyone may Execute a proposal that passed and whose delay is over.
- OID
- 0dd03e…f00c:14
ledger details
engine
*v0.GovernorSUGAR, the governance token: kourt's grc20votes ledger (balances checkpointed per epoch of 720 blocks, about an hour, so a vote weighs what a holder held before the proposal) and kourt's governor over it. Both packages are deployed under Jae's address on gnoland-1. The governor's proposals here are of two kinds of this realm's own: add an item, remove one. Holders propose with Propose(cur, kind, payload, title), vote with Vote, and anyone may Execute a proposal that passed and whose delay is over.
- OID
- 0dd03e…f00c:26
engine details
InitialSupply
int64InitialSupply is minted to the deployer at init: 1,000,000 SUGAR of 6 decimals.
Value
1000000000000
kindAdd
untyped stringValue
"govern:sugar-add"
kindRemove
untyped stringValue
"govern:sugar-remove"
rules
func() v0.Rulesrules are kourt's bootstrap rules (a fifth of the supply turns out, two thirds of the votes cast say yes, a week to vote, two days' delay, two weeks to execute), except that proposing takes 0.1% of the supply: kourt's lets anyone propose.
- OID
- 0dd03e…f00c:58
rules details
setupGovernor
func()setupGovernor adopts this realm's two kinds; init calls it.
- OID
- 0dd03e…f00c:60
setupGovernor details
mintInitial
func(to .uverse.address)- OID
- 0dd03e…f00c:61
mintInitial details
KindAdd
func() stringKindAdd and KindRemove are the names to propose under.
- OID
- 0dd03e…f00c:62
KindAdd details
KindRemove
func() string- OID
- 0dd03e…f00c:63
KindRemove details
addKind
typeValue
sugarproxy.addKind
removeKind
typeValue
sugarproxy.removeKind
errStaleRealm
untyped stringValue
"sugarproxy: that realm value is not live; pass your own cur"
live
func()- OID
- 0dd03e…f00c:64
live details
Propose
func(kind string, payload string, title string) int64Propose opens a proposal: kind is KindAdd() with a payload "kind|field|...", or KindRemove() with an item's number. It needs the governor's share of the supply to propose.
- OID
- 0dd03e…f00c:65
Propose details
Vote
func(id int64, choice string)Vote casts the caller's weight: "yes", "no" or "abstain".
- OID
- 0dd03e…f00c:66
Vote details
Execute
func(id int64)Execute carries out a proposal that passed, once its delay is over.
- OID
- 0dd03e…f00c:67
Execute details
Cancel
func(id int64)Cancel withdraws the caller's own open proposal.
- OID
- 0dd03e…f00c:68
Cancel details
Settle
func(id int64)Settle closes a proposal whose voting is over.
- OID
- 0dd03e…f00c:69
Settle details
State
func(id int64) stringState, Describe and Tally read a proposal.
- OID
- 0dd03e…f00c:70
State details
DescribeProposal
func(id int64) string- OID
- 0dd03e…f00c:71
DescribeProposal details
Tally
func(id int64) (yes int64, no int64, abstain int64, total int64)- OID
- 0dd03e…f00c:72
Tally details
TotalSupply
func() int64- OID
- 0dd03e…f00c:73
TotalSupply details
BalanceOf
func(who .uverse.address) int64- OID
- 0dd03e…f00c:74
BalanceOf details
VotesOf
func(who .uverse.address) int64- OID
- 0dd03e…f00c:75
VotesOf details
DelegateOf
func(who .uverse.address) .uverse.address- OID
- 0dd03e…f00c:76
DelegateOf details
Allowance
func(o .uverse.address, s .uverse.address) int64- OID
- 0dd03e…f00c:77
Allowance details
Transfer
func(to .uverse.address, amount int64)Transfer sends SUGAR from the caller.
- OID
- 0dd03e…f00c:78
Transfer details
Approve
func(spender .uverse.address, amount int64)Approve lets spender move up to amount of the caller's SUGAR.
- OID
- 0dd03e…f00c:79
Approve details
TransferFrom
func(from .uverse.address, to .uverse.address, amount int64)TransferFrom moves SUGAR the owner approved the caller to move.
- OID
- 0dd03e…f00c:80
TransferFrom details
DelegateVotes
func(to .uverse.address)DelegateVotes gives the caller's voting weight to another address (its own, to take it back).
- OID
- 0dd03e…f00c:81
DelegateVotes details
LaunchDays
untyped bigintValue
(14 <untyped> bigint)
owner
.uverse.addressValue
<gnolang.StringValue>
launcher
.uverse.addressValue
<gnolang.StringValue>
launchSeed
[]string- OID
- 0dd03e…f00c:85
launchSeed details
launchEnd
int64Value
1794774381
launch
func()launch seeds the first install's items, counting at once (they are in the deployed code, which Jae signs), and starts the launcher's window. init calls it.
- OID
- 0dd03e…f00c:87
launch details
Launcher
func() (.uverse.address, int64)- OID
- 0dd03e…f00c:89
Launcher details
LauncherAdd
func(payload string) intLauncherAdd adds a site ("site|pattern|customer|purpose"), counting at once, from the launcher during its window.
- OID
- 0dd03e…f00c:90
LauncherAdd details
LauncherRemove
func(id int)LauncherRemove removes a site, from the launcher during its window.
- OID
- 0dd03e…f00c:91
LauncherRemove details
mustLauncher
func()- OID
- 0dd03e…f00c:92
mustLauncher details
denom
untyped stringValue
"ugnot"
Totals
typeTotals is what a sharer has been paid, all told.
Value
sugarproxy.Totals
Payout
typePayout is one call to Pay.
Value
sugarproxy.Payout
totals
*v0.Tree// address -> \*Totals
- OID
- 0dd03e…f00c:94
totals details
payouts
[]*sugarproxy.Payout- OID
- 0dd03e…f00c:227
payouts details
Pay
func(period string, receipts string, lines string)Pay pays sharers with the GNOT sent along. lines has one sharer a line: "address ugnot bytes"; the amounts must add up to what was sent, and a payout is at most 500 lines. period names what it pays for ("2026-11-01", say); receipts is the hex sha256 of the payer's receipts for it (one line per confirmed download: its tag, the file's sha256 and size, who carried how much), recorded here so the receipts can be checked against it later. Only an approved payer may call it; pausing doesn't stop it (sharers are owed for what they carried).
- OID
- 0dd03e…f00c:97
Pay details
PaidTo
func(a .uverse.address) (ugnot int64, bytes int64, count int)PaidTo is what a sharer has been paid, all told.
- OID
- 0dd03e…f00c:99
PaidTo details
payerActive
func(a .uverse.address) bool- OID
- 0dd03e…f00c:100
payerActive details
coinsSent
func() int64coinsSent returns the ugnot sent with a direct call, refusing other denoms. Coins sent with a run go to the run's own address, not here, so a run sends none.
- OID
- 0dd03e…f00c:101
coinsSent details
Render
func(path string) stringRender shows the rules as people read them on gno.land.
- OID
- 0dd03e…f00c:102
Render details
days
func(s int64) string- OID
- 0dd03e…f00c:104
days details
errorf
func(format string, args []interface{...}) .uverse.error- OID
- 0dd03e…f00c:105
errorf details
Item
typeItem is one entry of the rules: a site, a release, a hub, a customer or a payer.
Value
sugarproxy.Item
KindSite
untyped string// fields: pattern, customer, purpose
Value
"site"
KindRelease
untyped string// fields: version, platform, sha256, url
Value
"release"
KindHub
untyped string// fields: host:port, pin (hex sha256 of its certificate's public key)
Value
"hub"
KindCustomer
untyped string// fields: name, purpose
Value
"customer"
KindPayer
untyped string// fields: address (may call Pay)
Value
"payer"
StateApproved
untyped stringValue
"approved"
StateVetoed
untyped stringValue
"vetoed"
StateRevoked
untyped stringValue
"revoked"
items
[]*sugarproxy.Item- OID
- 0dd03e…f00c:168
items details
nextID
intValue
19
paused
boolValue
false
delegate
string// the realm path that may add and remove sites; "" is none
Value
""
guardian
.uverse.address// may veto and pause; GovDAO names it
Value
<gnolang.StringValue>
vetoWin
map[string]int64- OID
- 0dd03e…f00c:113
vetoWin details
doc
string// the canonical JSON the apps read, as params "doc"
Value
"{\"v\":1,\"seq\":2,\"paused\":false,\"items\":[{\"id\":1,\"kind\":\"customer\",\"fields\":[\"sugar\",\"sugar.video fetches the videos its users paste, to caption, translate and dub them\"],\"state\":\"approved\",\"by\":\"init\",\"approved\":1793564781,\"after\":1793564781},{\"id\":2,\"kind\""...
digest
string// its hex sha256
Value
"0d92648daa3583ff38bc19e1e671a2b9aa85571df9fadc7877161e565772f051"
docSeq
int// how many times it has changed
Value
2
requests
[]*sugarproxy.RequestValue
<zero>
nextReqID
intValue
1
launching
bool// launch.gno: while the first install's items go in
Value
false
Request
typeRequest is anyone's suggestion of an item, for the token holders or the delegate to consider. It changes nothing.
Value
sugarproxy.Request
init.84
func()- OID
- 0dd03e…f00c:120
init.84 details
parse
func(payload string) (string, []string, .uverse.error)parse turns "kind|field|field..." into an item's kind and fields, checking each field.
- OID
- 0dd03e…f00c:121
parse details
word
func(s string, min int, max int) bool- OID
- 0dd03e…f00c:122
word details
hexOf
func(s string, n int) bool- OID
- 0dd03e…f00c:123
hexOf details
sitePattern
func(s string) boolsitePattern is a lowercase DNS name of two or more labels, or "\*." and one: what an app matches a host against.
- OID
- 0dd03e…f00c:124
sitePattern details
customerActive
func(name string) bool- OID
- 0dd03e…f00c:125
customerActive details
add
func(payload string, by string) (int, .uverse.error)add puts an item in, approved. by says who: its veto window applies unless GovDAO added it.
- OID
- 0dd03e…f00c:126
add details
end
func(id int, veto bool, by string) .uverse.errorend vetoes or removes an item: a veto only while its window is open, a removal any time. It counts at once.
- OID
- 0dd03e…f00c:127
end details
setPaused
func(on bool, by string)- OID
- 0dd03e…f00c:128
setPaused details
find
func(id int) *sugarproxy.Item- OID
- 0dd03e…f00c:129
find details
publish
func()publish writes the doc the apps read: params "doc", at gno.land's main store key "/pv/vm:\<this realm's path>:doc", which a light client proves against a block's app hash.
- OID
- 0dd03e…f00c:130
publish details
render
func() stringrender is the canonical JSON of the rules: every item ever approved, in order, with its state, so an app can tell what counts at any time (approved, and its After passed) without trusting anyone's clock but its own.
- OID
- 0dd03e…f00c:131
render details
jstr
func(s string) stringjstr quotes s as a JSON string.
- OID
- 0dd03e…f00c:132
jstr details
Doc
func() stringDoc is the canonical JSON the apps read (the same bytes as params "doc"); Digest is its hex sha256.
- OID
- 0dd03e…f00c:133
Doc details
Digest
func() string- OID
- 0dd03e…f00c:134
Digest details
ItemID
func(payload string) intItemID is the number of the approved item that says exactly payload ("kind|field|..."), or 0.
- OID
- 0dd03e…f00c:135
ItemID details
Paused
func() boolPaused reports whether sugar proxy is paused: apps carry nothing while it is.
- OID
- 0dd03e…f00c:136
Paused details
Delegate
func() stringDelegate is the realm that may add and remove sites ("" is none); Guardian may veto and pause.
- OID
- 0dd03e…f00c:137
Delegate details
Guardian
func() .uverse.address- OID
- 0dd03e…f00c:138
Guardian details
VetoWindow
func(kind string) int64VetoWindow is how long an added item of a kind waits before it counts, in seconds.
- OID
- 0dd03e…f00c:139
VetoWindow details
Suggest
func(payload string, reason string) intSuggest records a suggestion of an item ("kind|field|..."), for the token holders or the delegate to consider. It changes nothing. Each address may have three open at a time.
- OID
- 0dd03e…f00c:140
Suggest details
Withdraw
func(id int)Withdraw closes your own suggestion.
- OID
- 0dd03e…f00c:141
Withdraw details
DelegateAdd
func(payload string) intDelegateAdd adds a site ("site|pattern|customer|purpose"), from the delegate realm only; it waits out the site veto window.
- OID
- 0dd03e…f00c:142
DelegateAdd details
DelegateRemove
func(id int)DelegateRemove removes a site, from the delegate realm only.
- OID
- 0dd03e…f00c:143
DelegateRemove details
mustDelegate
func()mustDelegate refuses any caller but the delegate realm itself, the way r/sys/params checks its delegates: none named refuses everyone, and the caller's realm path must match exactly.
- OID
- 0dd03e…f00c:144
mustDelegate details
GuardianVeto
func(id int)GuardianVeto vetoes an item still in its veto window.
- OID
- 0dd03e…f00c:145
GuardianVeto details
GuardianRemove
func(id int)GuardianRemove removes a site, at once: the safe direction, so the guardian may (the launcher's sites count at once, so there is no window to veto them in).
- OID
- 0dd03e…f00c:146
GuardianRemove details
GuardianPause
func(on bool)GuardianPause pauses or resumes sugar proxy.
- OID
- 0dd03e…f00c:147
GuardianPause details
mustGuardian
func()- OID
- 0dd03e…f00c:148
mustGuardian details
mustUser
func() .uverse.address- OID
- 0dd03e…f00c:149