v0 source realm
Realm vesting answers one question for a gno.land account: of the coins it holds, how many can actually move right now.
View source
r/moul/vesting
How much of a gno.land account's balance can actually move right now.
Read this before trusting a number here
A realm cannot read an account's vesting schedule. banker.GetCoins returns the total
balance with the locked part included, and no native exposes std.VestingSchedule. So the
page reads two things from the chain and is told the third:
| figure | source | trust |
|---|---|---|
| balance | banker.GetCoins, every render |
always true |
| the clock | the block time, every render | always true |
| the schedule | supplied, see below | only as good as its source |
Every rendered figure says which of the two it rests on. Nothing is presented as verified when it is not. That honesty is the feature: a page that quietly guessed the locked amount would be worse than no page.
Where a schedule comes from
The URL, for a one-off that stores nothing:
/r/moul/vesting/v0:g1youraddress?o=106560000000&s=1789225200&e=1852383600
o original vesting in ugnot, s start, e end, both unix seconds, &d=1 for a delayed
schedule. Read your real one off the chain:
1gnokey query auth/accounts/g1youraddress -remote https://rpc.gno.land:443
Or the registry. Declare writes a schedule for the caller's own address and no
other. That is the whole trust model: an address can only misdescribe itself, and a wrong
entry misleads nobody but its author. Forget takes it off again.
Why a cached schedule is honest rather than stale
Because a schedule can never change. std.SetVesting has exactly one caller in the
monorepo, gno.land/pkg/gnoland/app.go, during genesis balance loading, and no message type
creates or modifies one. A schedule declared correctly today is correct forever.
Routes
/r/moul/vesting/v0 |
every schedule on file |
…:g1… |
one address |
…:g1…?o=&s=&e= |
one address, with a schedule you supply |
Notes
The seeded schedules are source constants, not registry rows. This 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. A seeded address is refused by Declare
for the same reason: a redeploy would silently revert whatever it set.
The arithmetic is p/moul/vesting, which mirrors what the chain
enforces, down to the rounding direction.
Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.
Dependency graph:

⚠️ Disclaimer: provided as-is, without warranty; not security-audited. Full disclaimer: DISCLAIMER.
Realm vesting answers one question for a gno.land account: of the coins it holds, how many can actually move right now.
Read this before you trust a number here
A realm CANNOT read an account's vesting schedule. The VM's whole view of an account is banker.GetCoins, which returns the TOTAL balance with the locked part included, and no native exposes std.VestingSchedule. So this realm reads two things from the chain and is told the third:
Example
1balance read from the chain, banker.GetCoins always true
2now read from the chain, block time always true
3schedule supplied, see below only as good as its source
Every rendered figure says which of the two it rests on. Nothing here is presented as verified when it is not.
Where a schedule comes from
Either the query string, for a one-off calculation that stores nothing, or the registry. Declare writes a schedule for the CALLER'S OWN address and no other, which is the whole trust model: an address can only misdescribe itself, and a wrong entry misleads nobody but its author.
Anyone can read their real schedule in one command and declare it:
Example
1gnokey query auth/accounts/g1youraddress -remote https://rpc.gno.land:443
Why the schedule can be cached at all
Because it can never change. std.SetVesting has exactly one caller in the monorepo, gno.land/pkg/gnoland/app.go, during genesis balance loading, and no message type creates or modifies a schedule. A schedule declared once is correct forever, which is what makes a registry honest rather than stale.
1
7
func Count
ActionCount returns how many schedules the registry holds.
func Declare
crossing ActionDeclare 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.
func Forget
crossing ActionForget removes the caller's own declaration.
func LockedOf
ActionLockedOf returns what addr cannot move right now, and whether the answer rests on a declared schedule.
func Render
Render serves three shapes:
Example
1/r/moul/vesting/v0 the seeded schedules
2/r/moul/vesting/v0:g1... one address, its declared schedule
3/r/moul/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.
func ScheduleOf
ActionScheduleOf returns the declared schedule for addr, and whether there is one.
func SpendableOf
ActionSpendableOf 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.
12
- chain stdlib
- chain/banker stdlib
- chain/runtime stdlib
- chain/runtime/unsafe stdlib
- gno.land/p/moul/kit/ui/v0 package
- gno.land/p/moul/realmpath/v0 package
- gno.land/p/moul/vesting/v0 package
- gno.land/p/nt/avl/v0 package
- gno.land/p/nt/ufmt/v0 package
- strconv stdlib
- strings stdlib
- time stdlib