mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-22 15:59:26 +00:00
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
1 changed files with 7 additions and 0 deletions
|
|
@ -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))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue