@@ -425,17 +425,17 @@ type ExecutionResult struct {
425
425
// StructLogRes stores a structured log emitted by the EVM while replaying a
426
426
// transaction in debug mode
427
427
type StructLogRes struct {
428
- Pc uint64 `json:"pc"`
429
- Op string `json:"op"`
430
- Gas uint64 `json:"gas"`
431
- GasCost uint64 `json:"gasCost"`
432
- Depth int `json:"depth"`
433
- Error string `json:"error,omitempty"`
434
- Stack * []string `json:"stack,omitempty"`
435
- ReturnData string `json:"returnData,omitempty"`
436
- Memory * []string `json:"memory,omitempty"`
437
- Storage * map [string ]string `json:"storage,omitempty"`
438
- RefundCounter uint64 `json:"refund,omitempty"`
428
+ Pc uint64 `json:"pc"`
429
+ Op string `json:"op"`
430
+ Gas uint64 `json:"gas"`
431
+ GasCost uint64 `json:"gasCost"`
432
+ Depth int `json:"depth"`
433
+ Error string `json:"error,omitempty"`
434
+ Stack []string `json:"stack,omitempty"`
435
+ ReturnData string `json:"returnData,omitempty"`
436
+ Memory []string `json:"memory,omitempty"`
437
+ Storage map [string ]string `json:"storage,omitempty"`
438
+ RefundCounter uint64 `json:"refund,omitempty"`
439
439
}
440
440
441
441
// formatLogs formats EVM returned structured logs for json output
@@ -456,7 +456,7 @@ func formatLogs(logs []StructLog) []StructLogRes {
456
456
for i , stackValue := range trace .Stack {
457
457
stack [i ] = stackValue .Hex ()
458
458
}
459
- formatted [index ].Stack = & stack
459
+ formatted [index ].Stack = stack
460
460
}
461
461
if trace .ReturnData != nil && len (trace .ReturnData ) > 0 {
462
462
formatted [index ].ReturnData = hexutil .Bytes (trace .ReturnData ).String ()
@@ -466,14 +466,14 @@ func formatLogs(logs []StructLog) []StructLogRes {
466
466
for i := 0 ; i + 32 <= len (trace .Memory ); i += 32 {
467
467
memory = append (memory , fmt .Sprintf ("%x" , trace .Memory [i :i + 32 ]))
468
468
}
469
- formatted [index ].Memory = & memory
469
+ formatted [index ].Memory = memory
470
470
}
471
471
if trace .Storage != nil {
472
472
storage := make (map [string ]string )
473
473
for i , storageValue := range trace .Storage {
474
474
storage [fmt .Sprintf ("%x" , i )] = fmt .Sprintf ("%x" , storageValue )
475
475
}
476
- formatted [index ].Storage = & storage
476
+ formatted [index ].Storage = storage
477
477
}
478
478
}
479
479
return formatted
0 commit comments