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

/launderrvictim package

Overview

Package launderrvictim is the /r/-DATA-DECLARED variant of the launder-game victim. Its Immutable type is declared HERE (in /r/), not in /p/launderpkg. This is the recommended inter-realm pattern: realms declare their own logic data types.

The hypothesis under test: with /r/-declared logic data, the Attack H/I/J/K/L laundering shapes are structurally impossible. Tests against this victim should all fail to mutate gImm.

Function

MakeApplyTrampoline

func MakeApplyTrampoline() func(func(*Immutable))

MakeApplyTrampoline returns a closure that captures &gImm.Field indirectly: it captures *Immutable, and dispatches a caller-supplied callback fn on it. /r/-victim-declared body → borrow rule #1 → m.Realm = /r/-victim. If `fn` is /p/-declared (e.g. EvilWrite), it inherits victim authority. This is "victim returns a closure that's itself an Apply-style trampoline" — a packaged Apply.

Command

gnokey query vm/qeval -remote "https://api.gno.berty.io:443" -data "gno.land/r/tests/vm/launderrvictim.MakeApplyTrampoline()"

Result