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

README.md

2.55 Kb · 55 lines

MiniToken (ERC-20)

⚠️ 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


A minimal fungible-token realm for gno.land (gno 0.9 / sapphire), porting the classic Solidity ERC-20 idea. It keeps package-level state — a balances map, a total supply, and per-owner allowances — behind gno 0.9 crossing functions that authenticate the caller via cur.IsCurrent() + cur.Previous(). Render returns a Markdown dashboard with the token metadata and a table of holders.

Realm path: gno.land/r/REPLACE_ADDR/erc20 (deploy address injected at deploy time).

Exported API

  • Mint(cur realm, to address, amount uint64) — create new tokens for to.
  • Transfer(cur realm, to address, amount uint64) — send tokens from the caller.
  • Approve(cur realm, spender address, amount uint64) — grant a spending allowance.
  • TransferFrom(cur realm, from, to address, amount uint64) — spend an allowance.
  • BalanceOf(holder address) uint64 · Allowance(owner, spender address) uint64
  • TotalSupply() uint64 · Name() string · Symbol() string
  • Render(path string) string — Markdown view for gnoweb.

Example calls

1# Mint 1000 MINI to yourself
2gnokey maketx call -pkgpath "gno.land/r/REPLACE_ADDR/erc20" \
3  -func Mint -args "<your-addr>" -args 1000 \
4  -gas-fee 1000000ugnot -gas-wanted 2000000 -broadcast -chainid sapphire-1 <key>
5
6# Transfer 250 MINI to another account
7gnokey maketx call -pkgpath "gno.land/r/REPLACE_ADDR/erc20" \
8  -func Transfer -args "<recipient-addr>" -args 250 \
9  -gas-fee 1000000ugnot -gas-wanted 2000000 -broadcast -chainid sapphire-1 <key>

View the token dashboard at https://gno.land/r/REPLACE_ADDR/erc20 on gnoweb.


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.