Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eth/tracers/js: fix integer types in log object #25668

Merged
merged 1 commit into from Sep 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
44 changes: 15 additions & 29 deletions eth/tracers/js/goja.go
Expand Up @@ -256,11 +256,11 @@ func (t *jsTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope
log.memory.memory = scope.Memory
log.stack.stack = scope.Stack
log.contract.contract = scope.Contract
log.pc = uint(pc)
log.gas = uint(gas)
log.cost = uint(cost)
log.refund = uint(t.env.StateDB.GetRefund())
log.depth = uint(depth)
log.pc = pc
log.gas = gas
log.cost = cost
log.refund = t.env.StateDB.GetRefund()
log.depth = depth
log.err = err
if _, err := t.step(t.obj, t.logValue, t.dbValue); err != nil {
t.onError("step", err)
Expand Down Expand Up @@ -908,33 +908,19 @@ type steplog struct {
stack *stackObj
contract *contractObj

pc uint
gas uint
cost uint
depth uint
refund uint
pc uint64
gas uint64
cost uint64
depth int
refund uint64
err error
}

func (l *steplog) GetPC() uint {
return l.pc
}

func (l *steplog) GetGas() uint {
return l.gas
}

func (l *steplog) GetCost() uint {
return l.cost
}

func (l *steplog) GetDepth() uint {
return l.depth
}

func (l *steplog) GetRefund() uint {
return l.refund
}
func (l *steplog) GetPC() uint64 { return l.pc }
func (l *steplog) GetGas() uint64 { return l.gas }
func (l *steplog) GetCost() uint64 { return l.cost }
func (l *steplog) GetDepth() int { return l.depth }
func (l *steplog) GetRefund() uint64 { return l.refund }

func (l *steplog) GetError() goja.Value {
if l.err != nil {
Expand Down