From 9132066039ec00ba73a8ff1101285f8996334a6b Mon Sep 17 00:00:00 2001 From: Dmitry Date: Fri, 21 Jun 2024 11:41:17 +0300 Subject: [PATCH] Add ethereum traced call structures --- domain/ethereum.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/domain/ethereum.go b/domain/ethereum.go index 2a3a6f0..4bebe45 100644 --- a/domain/ethereum.go +++ b/domain/ethereum.go @@ -451,3 +451,21 @@ type ClientSubscription interface { Err() <-chan error Unsubscribe() } + +// debug_traceCall response structure with such params: +// { "tracer": "callTracer", "tracerConfig": { "withLog": true } } +type TracedCall struct { + From common.Address `json:"from"` + To common.Address `json:"to"` + CallType string `json:"callType"` + GasUsed *hexutil.Big `json:"gasUsed"` + Calls []TracedCall `json:"calls"` + Logs []TracedLog `json:"logs"` +} + +type TracedLog struct { + Index int `json:"index"` + Address common.Address `json:"address"` + Topics []string `json:"topics"` + Data *hexutil.Bytes `json:"data"` +}