diff --git a/pkg/compiler/compiler.go b/pkg/compiler/compiler.go index 4950dc93e..5df26aea2 100644 --- a/pkg/compiler/compiler.go +++ b/pkg/compiler/compiler.go @@ -184,6 +184,21 @@ func CompileAndSave(src string, o *Options) ([]byte, error) { } if o.DebugInfo != "" { + di.Events = make([]EventDebugInfo, len(o.ContractEvents)) + for i, e := range o.ContractEvents { + params := make([]DebugParam, len(e.Parameters)) + for j, p := range e.Parameters { + params[j] = DebugParam{ + Name: p.Name, + Type: p.Type.String(), + } + } + di.Events[i] = EventDebugInfo{ + ID: e.Name, + Name: e.Name, + Parameters: params, + } + } data, err := json.Marshal(di) if err != nil { return b, err diff --git a/pkg/smartcontract/param_type.go b/pkg/smartcontract/param_type.go index eb7c7b2b7..20b13df43 100644 --- a/pkg/smartcontract/param_type.go +++ b/pkg/smartcontract/param_type.go @@ -49,7 +49,7 @@ func (pt ParamType) String() string { case Hash256Type: return "Hash256" case ByteArrayType: - return "ByteString" + return "ByteArray" case PublicKeyType: return "PublicKey" case StringType: