From 4e7815d6cbbb6db5f4b7ce5a249fbce9f13ab9e5 Mon Sep 17 00:00:00 2001 From: lwedge99 <116623885+lwedge99@users.noreply.github.com> Date: Wed, 21 Feb 2024 16:29:21 +0800 Subject: [PATCH] code address field (#11) --- eth/tracers/sentio/tracer.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eth/tracers/sentio/tracer.go b/eth/tracers/sentio/tracer.go index 5408c0f4d5..1be50edf22 100644 --- a/eth/tracers/sentio/tracer.go +++ b/eth/tracers/sentio/tracer.go @@ -326,6 +326,7 @@ func (t *sentioTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, s call.Gas = math.HexOrDecimal64(scope.Stack.Back(0).Uint64()) from := scope.Contract.Address() call.From = &from + call.CodeAddress = scope.Contract.CodeAddr to := common.BigToAddress(scope.Stack.Back(1).ToBig()) call.To = &to call.Value = (*hexutil.Big)(scope.Stack.Back(2).ToBig()) @@ -366,9 +367,11 @@ func (t *sentioTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, s break } from := scope.Contract.CodeAddr + codeAddress := scope.Contract.CodeAddr jump := mergeBase(Trace{ - From: from, + From: from, + CodeAddress: codeAddress, //InputStack: append([]uint256.Int(nil), scope.Stack.Data...), // TODO only need partial }) if t.previousJump != nil {