Skip to content Search Apps Documentation Source Content Run Reset Eval Playground File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

z1_seize_keeper_filetest.gno

0.55 Kb · 15 lines
 1// Writing a field of another realm's object is refused: the keeper cannot
 2// be replaced from outside.
 3
 4// PKGPATH: gno.land/r/g1zkzjmyveh7euq83h5zhnhj6mg0d7kr35nphzd2/seize
 5
 6package seize
 7
 8import "gno.land/r/g15c02s5hhdny9uvr9za3xsyn9sw8p0klptrh6kf/cellar/rack"
 9
10func main(cur realm) {
11	rack.Ledger.Keeper = address("g1zkzjmyveh7euq83h5zhnhj6mg0d7kr35nphzd2")
12}
13
14// Error:
15// cannot directly modify readonly tainted object (use a method or crossing function): (const (ref(gno.land/r/g15c02s5hhdny9uvr9za3xsyn9sw8p0klptrh6kf/cellar/rack) package{})).Ledger.Keeper