mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-06 13:11:17 +00:00
This change fixes a bug in js tracer, where `ctx.GasPrice.toString(16)` returns a number string in base `10`. Co-authored-by: Joe Netti <joe@netti.dev>
This commit is contained in:
parent
e4d4fb7d9c
commit
242ea9e0e9
1 changed files with 6 additions and 1 deletions
|
|
@ -235,7 +235,12 @@ func (t *jsTracer) CaptureStart(env *vm.EVM, from common.Address, to common.Addr
|
||||||
t.ctx["to"] = t.vm.ToValue(to.Bytes())
|
t.ctx["to"] = t.vm.ToValue(to.Bytes())
|
||||||
t.ctx["input"] = t.vm.ToValue(input)
|
t.ctx["input"] = t.vm.ToValue(input)
|
||||||
t.ctx["gas"] = t.vm.ToValue(t.gasLimit)
|
t.ctx["gas"] = t.vm.ToValue(t.gasLimit)
|
||||||
t.ctx["gasPrice"] = t.vm.ToValue(env.TxContext.GasPrice)
|
gasPriceBig, err := t.toBig(t.vm, env.TxContext.GasPrice.String())
|
||||||
|
if err != nil {
|
||||||
|
t.err = err
|
||||||
|
return
|
||||||
|
}
|
||||||
|
t.ctx["gasPrice"] = gasPriceBig
|
||||||
valueBig, err := t.toBig(t.vm, value.String())
|
valueBig, err := t.toBig(t.vm, value.String())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.err = err
|
t.err = err
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue