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

crossrealm_d package

Function

MutateBytes

func MutateBytes(bz []byte)

MutateBytes mutates the first byte of bz to 0xff. Used to test whether a foreign realm can write to caller-allocated bytes. Under storage=authority, bz has PkgID=caller; borrow rule #1 here makes m.Realm=crossrealm_d (declaring realm); the write site (bz[0] = ...) should fire readonly because bz.PkgID != m.Realm.ID.

Param

Command

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

Result