exploit.gno

package tests

var MyFoo *Foo

type Foo struct {
	A int
	B *Foo
}

// method to mutate

func (f *Foo) UpdateFoo(x int) {
	f.A = x
}

func init() {
	MyFoo = &Foo{
		A: 1,
		B: &Foo{
			A: 2,
		},
	}
}