From abde3fa7cc893546ba5cb0b300d52d19390a8c3d Mon Sep 17 00:00:00 2001 From: Weixie Cui Date: Sun, 28 Jun 2026 21:22:08 +0800 Subject: [PATCH] internal/ethapi: skip transfer capture for callcode in log tracer CALLCODE executes in the caller's context and does not transfer value to the callee, so exclude it alongside delegatecall. --- internal/ethapi/logtracer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/ethapi/logtracer.go b/internal/ethapi/logtracer.go index 54d2d653ea..0b7c27079a 100644 --- a/internal/ethapi/logtracer.go +++ b/internal/ethapi/logtracer.go @@ -80,7 +80,7 @@ func (t *tracer) Hooks() *tracing.Hooks { func (t *tracer) onEnter(depth int, typ byte, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { t.logs = append(t.logs, make([]*types.Log, 0)) - if vm.OpCode(typ) != vm.DELEGATECALL && value != nil && value.Cmp(common.Big0) > 0 { + if vm.OpCode(typ) != vm.DELEGATECALL && vm.OpCode(typ) != vm.CALLCODE && value != nil && value.Cmp(common.Big0) > 0 { t.captureTransfer(from, to, value) } }