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

probe.gno

0.71 Kb · 26 lines
 1// Realm probe is shaped exactly like a generated instance realm: it owns the
 2// state, and every exported function is a one-line re-export that forwards
 3// `cur` into the shared pure package.
 4package probe
 5
 6import (
 7	"gno.land/p/moul/x/framelab/v0"
 8	"gno.land/p/nt/grc20/v0"
 9)
10
11var (
12	Token  *grc20.Token
13	ledger *grc20.PrivateLedger
14)
15
16func init(cur realm) {
17	Token, ledger = grc20.NewToken("Probe", "PRB", 6, 0, cur)
18}
19
20// Run is the instance-realm shape under test.
21func Run(cur realm, from address, amount int64) address {
22	return framelab.Pull(0, cur, Token, from, amount)
23}
24
25// Frame reports what pure-package code sees as its own realm identity.
26func Frame(cur realm) (string, address, bool) { return framelab.Who(0, cur) }