From 676ec9d10ce8e871e7f5b93e3a80fee63317680a Mon Sep 17 00:00:00 2001 From: bnovil Date: Thu, 28 Mar 2024 14:20:33 +0800 Subject: [PATCH] fix different receiver names --- eth/tracers/js/goja.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/eth/tracers/js/goja.go b/eth/tracers/js/goja.go index ae8e9f3269..82666155ec 100644 --- a/eth/tracers/js/goja.go +++ b/eth/tracers/js/goja.go @@ -678,10 +678,10 @@ func (mo *memoryObj) Length() int { } func (mo *memoryObj) setupObject() *goja.Object { - o := m.vm.NewObject() - o.Set("slice", m.vm.ToValue(m.Slice)) - o.Set("getUint", m.vm.ToValue(m.GetUint)) - o.Set("length", m.vm.ToValue(m.Length)) + o := mo.vm.NewObject() + o.Set("slice", mo.vm.ToValue(mo.Slice)) + o.Set("getUint", mo.vm.ToValue(mo.GetUint)) + o.Set("length", mo.vm.ToValue(mo.Length)) return o } @@ -864,11 +864,11 @@ func (co *contractObj) GetInput() goja.Value { } func (co *contractObj) setupObject() *goja.Object { - o := c.vm.NewObject() - o.Set("getCaller", c.vm.ToValue(c.GetCaller)) - o.Set("getAddress", c.vm.ToValue(c.GetAddress)) - o.Set("getValue", c.vm.ToValue(c.GetValue)) - o.Set("getInput", c.vm.ToValue(c.GetInput)) + o := co.vm.NewObject() + o.Set("getCaller", co.vm.ToValue(co.GetCaller)) + o.Set("getAddress", co.vm.ToValue(co.GetAddress)) + o.Set("getValue", co.vm.ToValue(co.GetValue)) + o.Set("getInput", co.vm.ToValue(co.GetInput)) return o }