code: func FormatLogs(logs []vm.StructLog) []StructLogRes {
  	formatted := make([]StructLogRes, len(logs))
  	for index, trace := range logs {
  		formatted[index] = StructLogRes{
  			Pc:      trace.Pc,
  			Op:      trace.Op.String(),
  			Gas:     trace.Gas,
  			GasCost: trace.GasCost,
  			Depth:   trace.Depth,
  			Error:   trace.Err,
  		}
  		if trace.Stack != nil {
  			stack := make([]string, len(trace.Stack))
  			for i, stackValue := range trace.Stack {
  				stack[i] = fmt.Sprintf("%x", math.PaddedBigBytes(stackValue, 32))
  			}
  			formatted[index].Stack = &stack
  		}
  		if trace.Memory != nil {
  			memory := make([]string, 0, (len(trace.Memory)+31)/32)
  			for i := 0; i+32 <= len(trace.Memory); i += 32 {
  				memory = append(memory, fmt.Sprintf("%x", trace.Memory[i:i+32]))
  			}
  			formatted[index].Memory = &memory
  		}
  		if trace.Storage != nil {
  			storage := make(map[string]string)
  			for i, storageValue := range trace.Storage {
  				storage[fmt.Sprintf("%x", i)] = fmt.Sprintf("%x", storageValue)
  			}
  			formatted[index].Storage = &storage
  		}
  	}
  	return formatted
  }
docs: // FormatLogs formats EVM returned structured logs for json output