1package abt23import (4 "chain"5 "testing"67 "gno.land/p/nt/grc20/v0"8 "gno.land/p/nt/testutils/v0"9 "gno.land/r/akkadia/beta/admin"10)1112var abtTest = struct {13 Admin, Operator, Owner, Other address14}{15 Admin: testutils.TestAddress("abtAdmin"),16 Operator: testutils.TestAddress("abtOperator"),17 Owner: testutils.TestAddress("abtOwner"),18 Other: testutils.TestAddress("abtOther"),19}2021// Call with cross(cur) so token construction uses a live ABT realm.22func setupABT(cur realm, t *testing.T) {23 t.Helper()24 token, ledger = grc20.NewToken("Akkadia Beta Token", "abt", 6, 0, cur)25 frozen = true26 testing.SetOriginSend(chain.Coins{})27 originalAdmin := admin.GetAdmin()28 if originalAdmin != abtTest.Admin {29 testing.SetOriginCaller(originalAdmin)30 testing.SetRealm(testing.NewUserRealm(originalAdmin))31 admin.TransferAdmin(cross(cur), abtTest.Admin)32 testing.SetOriginCaller(abtTest.Admin)33 testing.SetRealm(testing.NewUserRealm(abtTest.Admin))34 admin.AcceptAdmin(cross(cur))35 }36 testing.SetOriginCaller(abtTest.Admin)37 testing.SetRealm(testing.NewUserRealm(abtTest.Admin))38 for _, operator := range admin.GetOperators() {39 admin.UnsetOperator(cross(cur), operator)40 }41 admin.SetOperator(cross(cur), abtTest.Operator)42}4344func captureABTRealm(cur realm) realm { return cur }45Allowance(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
GetDecimals() int
GetName() string
GetSymbol() string
IsFrozen() bool
Mint(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)
Render(path string) string
SetFrozen(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}, value bool)
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)
TransferFrom(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}, from 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.