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

* internal/ethapi: add refund to StructLogRes

* Update internal/ethapi/api.go

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
This commit is contained in:
Zhang Zhuo 2022-03-30 04:34:10 +08:00 committed by GitHub
parent 763b3f8d1f
commit b5a129ea24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1144,6 +1144,7 @@ type StructLogRes struct {
Stack *[]string `json:"stack,omitempty"`
Memory *[]string `json:"memory,omitempty"`
Storage *map[string]string `json:"storage,omitempty"`
RefundCounter uint64 `json:"refund,omitempty"`
}
// FormatLogs formats EVM returned structured logs for json output
@ -1157,6 +1158,7 @@ func FormatLogs(logs []logger.StructLog) []StructLogRes {
GasCost: trace.GasCost,
Depth: trace.Depth,
Error: trace.ErrorString(),
RefundCounter: trace.RefundCounter,
}
if trace.Stack != nil {
stack := make([]string, len(trace.Stack))