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

curchain_a.gno

0.56 Kb · 16 lines
 1// Package curchain_a is a test helper for multi-level cross-call chain tests.
 2// A is the middle hop: when called via cross, it cross-calls into curchain_b.
 3package curchain_a
 4
 5import (
 6	"gno.land/r/tests/vm/curchain_b"
 7)
 8
 9// A is a crossing function that cross-calls curchain_b.B(cross).
10// Use from a filetest as: curchain_a.A(cross) to set up a 3-level chain
11// caller → A → B with the filetest's main as the chain root.
12func A(cur realm) {
13	println("A cur.PkgPath:", cur.PkgPath())
14	println("A prev.PkgPath:", cur.Previous().PkgPath())
15	curchain_b.B(cross(cur))
16}