Merge pull request #1311 from nspcc-dev/debugger-compatibility-fixes

Debugger compatibility fixes
This commit is contained in:
Roman Khimov 2020-08-12 18:42:18 +03:00 committed by GitHub
commit 95d86b67c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 1 deletions

View file

@ -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

View file

@ -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: