mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
Co-authored-by: Brandon Liu <lzqcn2000@126.com>
This commit is contained in:
parent
bcf007335a
commit
bb458d0eed
1 changed files with 11 additions and 11 deletions
|
|
@ -676,11 +676,11 @@ func (mo *memoryObj) Length() int {
|
|||
return len(mo.memory)
|
||||
}
|
||||
|
||||
func (m *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))
|
||||
func (mo *memoryObj) setupObject() *goja.Object {
|
||||
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
|
||||
}
|
||||
|
||||
|
|
@ -862,12 +862,12 @@ func (co *contractObj) GetInput() goja.Value {
|
|||
return res
|
||||
}
|
||||
|
||||
func (c *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))
|
||||
func (co *contractObj) setupObject() *goja.Object {
|
||||
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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue