Render
func(path string) stringRender serves three shapes: /r/nym-moultest123/vesting/v0 the seeded schedules /r/nym-moultest123/vesting/v0:g1... one address, its declared schedule /r/nym-moultest123/vesting/v0:g1...?o=&s=&e=&d= one address, a schedule you supply The query form stores nothing. It exists so an address that has not declared anything can still get a real answer: paste the schedule out of \`gnokey query auth/accounts/\<addr>\` and the balance is still read from chain.
- OID
- 058ed5…0366:3
Render details
source
typeWhere a schedule came from. This is the distinction the whole page turns on, so it is a value and not a boolean buried in a branch.
Value
v0.source
sourceSeeded
v0.source// a source constant in this realm
Value
<zero>
sourceDeclared
v0.source// written by the address itself
Value
<zero>
sourceQuery
v0.source// typed into the URL by whoever is looking
Value
<zero>
sourceNone
v0.source// there is none
Value
<zero>
header
func() string- OID
- 058ed5…0366:5
header details
pageSize
untyped bigintpageSize bounds the declared table. vm/qrender runs on a gas meter and a large return value fails with OutOfGasError{Descriptor:"CPUCycles"} rather than answering slowly, so an unbounded index is a page that eventually stops rendering for everyone. Anyone may Declare, so "eventually" is somebody else's choice unless it is capped here.
Value
(25 <untyped> bigint)
renderIndex
func() string- OID
- 058ed5…0366:6
renderIndex details
curPage
intcurPage is the page renderIndex is currently building, set by Render before it delegates. A parameter would be cleaner; Render's signature is fixed by the VM, and threading it through every helper for one value is worse.
Value
1
pageOffset
func(page int) int- OID
- 058ed5…0366:8
pageOffset details
rowFor
func(addr .uverse.address, e *v0.entry) []stringrowFor builds one table row. Shared so the seeded and declared tables cannot drift apart in what they show.
- OID
- 058ed5…0366:9
rowFor details
pager
func(total int) stringpager renders the page links, and nothing at all when everything fits.
- OID
- 058ed5…0366:10
pager details
renderAccount
func(addr .uverse.address, s v0.Schedule, src v0.source, label string) string- OID
- 058ed5…0366:11
renderAccount details
renderUnknown
func(addr .uverse.address) string- OID
- 058ed5…0366:12
renderUnknown details
sourceNote
func(src v0.source) string- OID
- 058ed5…0366:13
sourceNote details
lookupForm
func() string- OID
- 058ed5…0366:14
lookupForm details
scheduleFromQuery
func(req *v0.Request) (v0.Schedule, string)scheduleFromQuery reads a one-off schedule out of the URL. It returns a human-readable reason rather than an error value, because every caller turns it straight into page text.
- OID
- 058ed5…0366:15
scheduleFromQuery details
orZero
func(s string) string- OID
- 058ed5…0366:16
orZero details
lockedCapped
func(s v0.Schedule, balance int64, n int64) int64lockedCapped is what the account cannot move, which is never more than it holds. The schedule alone can say otherwise once coins have been spent.
- OID
- 058ed5…0366:17
lockedCapped details
tstamp
func(sec int64) stringtstamp renders a unix second as a plain UTC date, which is all a two-year term needs. gno has no time formatting worth the dependency here.
- OID
- 058ed5…0366:18
tstamp details
civil
func(z int64) (year int64, month int64, day int64)civil converts a day count since 1970-01-01 to a calendar date, by Howard Hinnant's civil\_from\_days. Integer only, no time package, no locale.
- OID
- 058ed5…0366:19
civil details
ufmtDate
func(y int64, m int64, d int64) string- OID
- 058ed5…0366:20
ufmtDate details
pad2
func(n int64) string- OID
- 058ed5…0366:21
pad2 details
Path
untyped stringValue
"gno.land/r/nym-moultest123/vesting/v0"
Link
untyped stringValue
"/r/nym-moultest123/vesting/v0"
Denom
untyped stringValue
"ugnot"
seeded
[]struct{...}seeded are the schedules this realm ships with, restored by init() after every redeploy. They are source constants and not registry rows on purpose: the realm is private = true, so a redeploy wipes realm state, and the one schedule the page exists to show should not need a transaction to come back. Each is copied from the genesis allocation sheet that built mainnet, which is the public, pinned input named in misc/deployments/mainnet.gno.land/gen-genesis.sh. An address is seeded here only when its LABEL is public too. The addresses are all on chain, but naming one is a claim about who holds it, and this realm is public and permanent. gen-genesis.sh names the investors-vesting multisig outright, so that one ships; the treasuries and the other buckets are identified nowhere public, so they do not, and the URL form serves anyone who wants to check them anyway.
- OID
- 058ed5…0366:23
seeded details
declared
v0.Treedeclared maps an address to the schedule that address declared for itself. Seeded schedules are NOT in here: they are read from the seeded slice, which is what lets the index render them in full while paging everything else. Anyone may Declare, so this tree is unbounded and the page that shows it cannot be.
- OID
- 058ed5…0366:49
declared details
seedIndex
v0.TreeseedIndex resolves a seeded address without walking the slice twice.
- OID
- 058ed5…0366:50
seedIndex details
entry
typeentry is one row of the registry.
Value
v0.entry
init.31
func()- OID
- 058ed5…0366:30
init.31 details
reset
func()reset restores the registry to exactly what the source declares. init() is its only caller on chain; a test calls it to render a page that does not depend on what the test before it wrote, since an Example runs after every Test in the package and sees the state they left.
- OID
- 058ed5…0366:32
reset details
Declare
func(original int64, start int64, end int64, delayed bool)Declare records the caller's own vesting schedule, replacing any previous one. It cannot write a row for anybody else, which is what keeps the registry honest without the realm being able to verify a thing. Pass original = 0 to declare that the address has no schedule at all.
- OID
- 058ed5…0366:33
Declare details
Forget
func()Forget removes the caller's own declaration.
- OID
- 058ed5…0366:34
Forget details
Count
func() intCount returns how many schedules addresses have declared for themselves. Seeded schedules are not included; SeededCount reports those.
- OID
- 058ed5…0366:35
Count details
SeededCount
func() intSeededCount returns how many schedules this realm ships in its source.
- OID
- 058ed5…0366:36
SeededCount details
ScheduleOf
func(addr .uverse.address) (original int64, start int64, end int64, delayed bool, ok bool)ScheduleOf returns the declared schedule for addr, and whether there is one.
- OID
- 058ed5…0366:37
ScheduleOf details
SpendableOf
func(addr .uverse.address) (spendable int64, ok bool)SpendableOf returns what addr can move right now, and whether the answer rests on a declared schedule. With ok false the figure is the whole balance, which is correct only if the address really has no schedule.
- OID
- 058ed5…0366:38
SpendableOf details
LockedOf
func(addr .uverse.address) (locked int64, ok bool)LockedOf returns what addr cannot move right now, and whether the answer rests on a declared schedule.
- OID
- 058ed5…0366:39
LockedOf details
lookup
func(addr .uverse.address) (*v0.entry, bool)lookup reads a row, seeded first so a seeded address can never be shadowed. avl's Get returns ONE value and nil for a miss, unlike Remove which returns two; that asymmetry is a documented gno-vs-Go trap.
- OID
- 058ed5…0366:40
lookup details
balanceOf
func(addr .uverse.address) int64balanceOf reads the address's TOTAL ugnot, locked included. That is what banker.GetCoins reports and the only balance figure a realm can obtain. A readonly banker takes no realm, so this works from inside Render.
- OID
- 058ed5…0366:41
balanceOf details
gnot
func(u int64) stringgnot renders a ugnot amount as GNOT with six decimals and no float.
- OID
- 058ed5…0366:42
gnot details
pad6
func(n int64) stringpad6 left-pads to six digits. ufmt has no width flags, so this is by hand.
- OID
- 058ed5…0366:43
pad6 details
permille
func(p int64) stringpermille renders tenths of a percent as a percentage with one decimal.
- OID
- 058ed5…0366:44
permille details
duration
func(sec int64) stringduration renders a span of seconds as days and hours, which is the only resolution worth reading on a two-year schedule.
- OID
- 058ed5…0366:45
duration details
isAddr
func(s string) boolisAddr is a cheap shape check, so a typo renders as "not an address" rather than as an account with a zero balance.
- OID
- 058ed5…0366:46
isAddr details
now
func() int64now is the chain's own clock, in unix seconds. time.Now() in a realm returns the BLOCK time, not a wall clock, which is exactly the value the ante handler compares a vesting schedule against.
- OID
- 058ed5…0366:47
now details
chainHeight
func() int64- OID
- 058ed5…0366:48