Unverified Commit b5a129ea authored by Zhang Zhuo's avatar Zhang Zhuo Committed by GitHub

internal/ethapi: add refund to StructLogRes (#24567)

* internal/ethapi: add refund to StructLogRes

* Update internal/ethapi/api.go
Co-authored-by: 's avatarrjl493456442 <garyrong0905@gmail.com>
Co-authored-by: 's avatarrjl493456442 <garyrong0905@gmail.com>
parent 763b3f8d
...@@ -1144,6 +1144,7 @@ type StructLogRes struct { ...@@ -1144,6 +1144,7 @@ type StructLogRes struct {
Stack *[]string `json:"stack,omitempty"` Stack *[]string `json:"stack,omitempty"`
Memory *[]string `json:"memory,omitempty"` Memory *[]string `json:"memory,omitempty"`
Storage *map[string]string `json:"storage,omitempty"` Storage *map[string]string `json:"storage,omitempty"`
RefundCounter uint64 `json:"refund,omitempty"`
} }
// FormatLogs formats EVM returned structured logs for json output // FormatLogs formats EVM returned structured logs for json output
...@@ -1157,6 +1158,7 @@ func FormatLogs(logs []logger.StructLog) []StructLogRes { ...@@ -1157,6 +1158,7 @@ func FormatLogs(logs []logger.StructLog) []StructLogRes {
GasCost: trace.GasCost, GasCost: trace.GasCost,
Depth: trace.Depth, Depth: trace.Depth,
Error: trace.ErrorString(), Error: trace.ErrorString(),
RefundCounter: trace.RefundCounter,
} }
if trace.Stack != nil { if trace.Stack != nil {
stack := make([]string, len(trace.Stack)) stack := make([]string, len(trace.Stack))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment