1// Package aaa is a throwaway GRC20 with an open faucet, used to exercise the2// pair instances in this repo. It has no value and no owner controls.3package aaa45import (6 "gno.land/p/nt/grc20/v0"7 "gno.land/r/nt/grc20reg/v0"8)910var (11 Token *grc20.Token12 privateLedger *grc20.PrivateLedger13 userTeller grc20.Teller14)1516// Key is this token's grc20reg key, the string an instance realm is17// configured with.18const Key = "gno.land/r/moul/x/pairs/aaa/v0.AAA"1920func init(cur realm) {21 Token, privateLedger = grc20.NewToken("Test Alpha", "AAA", 6, 0, cur)22 userTeller = privateLedger.CallerTeller()23 grc20reg.Register(cross(cur), Token, "")24}2526// Faucet mints a fixed amount to the caller. Unrestricted on purpose.27func Faucet(cur realm) {28 if err := privateLedger.Mint(cur.Previous().Address(), 1_000_000_000); err != nil {29 panic(err)30 }31}3233func TotalSupply() int64 { return userTeller.TotalSupply() }34func BalanceOf(owner address) int64 { return userTeller.BalanceOf(owner) }35func Allowance(owner, spender address) int64 { return userTeller.Allowance(owner, spender) }3637func Transfer(cur realm, to address, amount int64) {38 if err := userTeller.Transfer(0, cur, to, amount); err != nil {39 panic(err)40 }41}4243func Approve(cur realm, spender address, amount int64) {44 if err := userTeller.Approve(0, cur, spender, amount); err != nil {45 panic(err)46 }47}4849func Render(string) string {50 return "# AAA\n\nThrowaway test token for the pair instances. `Faucet` mints 1000 AAA to you.\n"51}52Allowance(owner string, spender string) int64
Approve(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, spender string, amount int64)
BalanceOf(owner string) int64
Faucet(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string})
Render(string) string
TotalSupply() int64
Transfer(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, to string, amount int64)
Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.
vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.