eth/tracers: include log index in erc7562 tracer output (#35200)

Populate the Index field on captured logs, matching callTracer
behaviour.
This commit is contained in:
cui 2026-07-06 17:31:08 +08:00 committed by GitHub
parent 7c1959b306
commit 69d88aee93
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -308,6 +308,7 @@ func (t *erc7562Tracer) OnLog(log1 *types.Log) {
Address: log1.Address,
Topics: log1.Topics,
Data: log1.Data,
Index: hexutil.Uint(log1.Index),
Position: hexutil.Uint(len(t.callstackWithOpcodes[len(t.callstackWithOpcodes)-1].Calls)),
}
t.callstackWithOpcodes[len(t.callstackWithOpcodes)-1].Logs = append(t.callstackWithOpcodes[len(t.callstackWithOpcodes)-1].Logs, l)