forked from cerc-io/plugeth
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: William <william.berman@coinbase.com>
This commit is contained in:
parent
9e23610b0f
commit
948a600ed5
@ -662,6 +662,13 @@ func (jst *Tracer) GetResult() (json.RawMessage, error) {
|
||||
case *big.Int:
|
||||
pushBigInt(val, jst.vm)
|
||||
|
||||
case int:
|
||||
jst.vm.PushInt(val)
|
||||
|
||||
case common.Hash:
|
||||
ptr := jst.vm.PushFixedBuffer(32)
|
||||
copy(makeSlice(ptr, 32), val[:])
|
||||
|
||||
default:
|
||||
panic(fmt.Sprintf("unsupported type: %T", val))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user