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.
This commit is contained in:
Anna Shaleva 2020-08-12 17:39:41 +03:00
parent 95d86b67c3
commit 3c170271c4
2 changed files with 5 additions and 3 deletions

View file

@ -195,7 +195,9 @@ func CompileAndSave(src string, o *Options) ([]byte, error) {
}
di.Events[i] = EventDebugInfo{
ID: e.Name,
Name: 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,
}
}

View file

@ -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"`
}