Unverified Commit 948a600e authored by williamberman's avatar williamberman Committed by GitHub

eth/tracers: convert int/hash values from context into js object (#23108)

* Convert int/hash values from context into js object

* Use js fixed buffer
Co-authored-by: 's avatarWilliam <william.berman@coinbase.com>
parent 9e23610b
...@@ -662,6 +662,13 @@ func (jst *Tracer) GetResult() (json.RawMessage, error) { ...@@ -662,6 +662,13 @@ func (jst *Tracer) GetResult() (json.RawMessage, error) {
case *big.Int: case *big.Int:
pushBigInt(val, jst.vm) pushBigInt(val, jst.vm)
case int:
jst.vm.PushInt(val)
case common.Hash:
ptr := jst.vm.PushFixedBuffer(32)
copy(makeSlice(ptr, 32), val[:])
default: default:
panic(fmt.Sprintf("unsupported type: %T", val)) panic(fmt.Sprintf("unsupported type: %T", val))
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment