Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

v0 source realm

Package vestoken is a fungible token where new supply is never handed out instantly — it ports the idea behind Solidi...

Readme View source

vestoken

⚠️ Experimental — generated with no human supervision. This realm was produced automatically by an MCP-driven agent to exercise the gno MCP server and tooling, and to generate test content for gno compilers, linters and formatters. Not audited. Not for production. Full context & folder README: r/moul/x/daily



Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.

🧪 Highly experimental — potentially vibe-coded. Not audited; may break, change, or be removed at any time. Do not use with anything of value. Full disclaimer: DISCLAIMER.

Overview

Package vestoken is a fungible token where new supply is never handed out instantly — it ports the idea behind Solidity's VestingWallet / linear token-streaming contracts (e.g. Sablier) into a single gno.land realm.

MintVested opens a linear vesting grant instead of crediting a balance directly. The beneficiary calls Claim over time to pull whatever has unlocked so far into their liquid, transferable balance. State is package-level and persistent; state-mutating functions are crossing functions (`cur realm`) per the gno 0.9 interrealm convention.

Functions 9

func BalanceOf

Action
1func BalanceOf(holder address) uint64
source

BalanceOf returns the liquid (claimed, transferable) balance of holder.

func Claim

crossing Action
1func Claim(cur realm) uint64
source

Claim pulls whatever has unlocked so far from the caller's grant into their liquid balance, and returns how much was claimed. Crossing function.

func GrantOf

Action
1func GrantOf(beneficiary address) (total uint64, claimed uint64, claimable uint64)
source

GrantOf returns the beneficiary's active grant, if any: total amount, amount claimed so far, and the amount currently claimable.

func MintVested

crossing Action
1func MintVested(cur realm, to address, amount uint64, durationBlocks int64)
source

MintVested opens a new linear vesting grant for `to`: `amount` tokens unlock block-by-block over the next `durationBlocks` blocks, starting now. A beneficiary may only hold one active grant at a time. Crossing function.

func Render

1func Render(path string) string
source

Render produces the gnoweb Markdown view: metadata, active vesting grants, and liquid balances — both tables sorted by address for deterministic output. Render is NOT a crossing function.

func Transfer

crossing Action
1func Transfer(cur realm, to address, amount uint64)
source

Transfer moves `amount` of the caller's liquid (already-claimed) balance to `to`. Crossing function.

Imports 5

  • chain/runtime stdlib
  • errors stdlib
  • sort stdlib
  • strconv stdlib
  • strings stdlib

Source Files 3