From 3c170271c419e55193f2624ccb6d3ce7e2c75d11 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Wed, 12 Aug 2020 17:39:41 +0300 Subject: [PATCH] compiler: provide namespace for events names For proper NEO3 debugger work we should provide namespaces for events names in .debug.json files. But we don't have namespaces in .yml configuration files and don't need this information for .manifest.json generation, so let's just keep namespaces empty. This do not prevents debugger from accepting our .debug.json files. --- pkg/compiler/compiler.go | 6 ++++-- pkg/compiler/debug.go | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/compiler/compiler.go b/pkg/compiler/compiler.go index 5df26aea2..16c28d146 100644 --- a/pkg/compiler/compiler.go +++ b/pkg/compiler/compiler.go @@ -194,8 +194,10 @@ func CompileAndSave(src string, o *Options) ([]byte, error) { } } di.Events[i] = EventDebugInfo{ - ID: e.Name, - Name: e.Name, + ID: e.Name, + // DebugInfo event name should be at the format {namespace},{name} + // but we don't provide namespace via .yml config + Name: "," + e.Name, Parameters: params, } } diff --git a/pkg/compiler/debug.go b/pkg/compiler/debug.go index 71e8f4adb..df99aca3d 100644 --- a/pkg/compiler/debug.go +++ b/pkg/compiler/debug.go @@ -51,7 +51,7 @@ type DebugMethodName struct { // EventDebugInfo represents smart-contract's event debug information. type EventDebugInfo struct { ID string `json:"id"` - // Name is a human-readable event name in a format "{namespace}-{name}". + // Name is a human-readable event name in a format "{namespace},{name}". Name string `json:"name"` Parameters []DebugParam `json:"params"` }