pkgPath
untyped string// must match gnomod.toml
Value
"gno.land/r/g1leu8d2vsplhehcfkjg50mwgdpxdkt8tztu95wr/vesting"
day
int64Value
86400
GNOT
untyped stringValue
"ugnot"
BUBBLE
untyped stringValue
"gno.land/r/g1leu8d2vsplhehcfkjg50mwgdpxdkt8tztu95wr/bubble"
MaxDays
int64// a term, and a cliff, of at most a hundred years: the arithmetic below counts on it
Value
36500
maxNote
untyped bigintValue
(120 <untyped> bigint)
listMax
untyped bigint// grants the front page lists
Value
(50 <untyped> bigint)
kind
typeValue
vesting.kind
kindNative
vesting.kindValue
<zero>
kindBubble
vesting.kindValue
<zero>
kindRegistry
vesting.kindValue
<zero>
Grant
typeGrant is one schedule. The fields are read through Get; only this realm writes them.
Value
vesting.Grant
grants
*v0.Tree// key(id) → \*Grant
- OID
- 01efb8…95f9:4
grants details
last
int64Value
1
init.14
func()- OID
- 01efb8…95f9:7
init.14 details
Count
func() int64- OID
- 01efb8…95f9:9
Count details
Get
func(id int64) vesting.GrantGet is a copy of the grant.
- OID
- 01efb8…95f9:10
Get details
Address
func(id int64) .uverse.address- OID
- 01efb8…95f9:11
Address details
Balance
func(id int64) int64Balance is what the grant's address holds of its token.
- OID
- 01efb8…95f9:12
Balance details
Vested
func(id int64) int64Vested is what the schedule has released by now — or by the revoke, if there was one. Never above Total.
- OID
- 01efb8…95f9:13
Vested details
Claimable
func(id int64) int64Claimable is what Claim would pay now: the vested part not yet paid, as far as the balance goes.
- OID
- 01efb8…95f9:14
Claimable details
subpath
func(id int64) string- OID
- 01efb8…95f9:15
subpath details
key
func(id int64) string- OID
- 01efb8…95f9:16
key details
get
func(id int64) *vesting.Grant- OID
- 01efb8…95f9:17
get details
balance
func(g *vesting.Grant) int64- OID
- 01efb8…95f9:18
balance details
vested
func(g *vesting.Grant) int64- OID
- 01efb8…95f9:19
vested details
vestedAt
func(g *vesting.Grant, t int64) int64vestedAt is the schedule itself. The split of rest\*d/Days into a quotient and a remainder part keeps every intermediate inside int64 for any Total and a term under MaxDays, and equals the exact floor.
- OID
- 01efb8…95f9:20
vestedAt details
claimable
func(g *vesting.Grant) int64- OID
- 01efb8…95f9:21
claimable details
kindOf
func(token string) vesting.kind- OID
- 01efb8…95f9:22
kindOf details
canon
func(token string) stringcanon names the token as the realm stores it: GNOT and BUBBLE by their constants, anything else by its registry key, which must resolve.
- OID
- 01efb8…95f9:23
canon details
caller
func() .uverse.address- OID
- 01efb8…95f9:24
caller details
mustBeOwner
func(g *vesting.Grant)- OID
- 01efb8…95f9:25
mustBeOwner details
Create
func(owner .uverse.address, beneficiary .uverse.address, token string, total int64, upfront int64, start int64, cliffDays int64, days int64, note string) int64Create opens a grant and returns its id. owner may revoke it ("" makes it irrevocable); the tokens are sent to Address(id) afterwards, by anyone. token: "gnot", "bubble" or a registry key. start 0 is now; a past start is allowed, a future one up to a hundred years out. days 0 vests everything at start. note is a label of up to 120 plain characters (no markup: the pages render it).
- OID
- 01efb8…95f9:26
Create details
Claim
func(id int64) int64Claim pays the beneficiary everything claimable and returns the amount. Anyone may call it.
- OID
- 01efb8…95f9:27
Claim details
Revoke
func(id int64) int64Revoke ends the schedule where it stands (the first time) and returns to the owner everything the grant holds beyond what has vested and is still the beneficiary's to claim. Before the up-front share has arrived, counting what was already paid out as arrived, it voids the grant instead: nothing vests, ever — so a unit of dust sent ahead of the owner's revoke, claimed or not, cannot turn a void into a freeze that keeps the up-front share. (A grant with no up-front share measures against what the schedule had released by the revoke.) Returns what went back; 0 when nothing did.
- OID
- 01efb8…95f9:28
Revoke details
Sweep
func(id int64) int64Sweep returns to the owner what the schedule can never owe the beneficiary — above the unpaid rest of the grant while it runs, above what is still claimable once revoked — without ending anything. Owner only; on a grant with no owner the excess is the beneficiary's, and anyone may send it there.
- OID
- 01efb8…95f9:29
Sweep details
sweep
func(g *vesting.Grant) int64- OID
- 01efb8…95f9:30
sweep details
sweepTo
func(g *vesting.Grant, to .uverse.address) int64- OID
- 01efb8…95f9:31
sweepTo details
send
func(g *vesting.Grant, to .uverse.address, n int64)send moves n of the grant's token out of the grant's own address: the sub-realm is the sender, so one grant can never pay from another's balance.
- OID
- 01efb8…95f9:32
send details
SetOwner
func(id int64, to .uverse.address)SetOwner names the next owner; nothing moves until they AcceptOwner. Naming "" withdraws the offer.
- OID
- 01efb8…95f9:33
SetOwner details
AcceptOwner
func(id int64)AcceptOwner takes the owner role of a grant, by the one named.
- OID
- 01efb8…95f9:34
AcceptOwner details
Render
func(path string) stringRender: "" the newest grants; "\<id>" one grant; "json/\<id>" its figures in base units; "by/\<address>" the grants an address owns or receives.
- OID
- 01efb8…95f9:35
Render details
home
func() string- OID
- 01efb8…95f9:36
home details
page
func(g *vesting.Grant) string- OID
- 01efb8…95f9:37
page details
by
func(who .uverse.address) string- OID
- 01efb8…95f9:38
by details
json
func(g *vesting.Grant) string- OID
- 01efb8…95f9:39
json details
state
func(g *vesting.Grant) string- OID
- 01efb8…95f9:40
state details
date
func(unix int64) string- OID
- 01efb8…95f9:41
date details
amount
func(g *vesting.Grant, n int64) stringamount prints base units in the token's own unit, trailing zeros dropped.
- OID
- 01efb8…95f9:42