compiler, cli: support events from .yml config file

We currently can't process events in codegen, so we have to provide
them via .yml config file. Do not delete the rest of the code connected
with conversion of MethodDebugInfo.Event into manifest.Event as we have
issue #1038.
This commit is contained in:
Anna Shaleva 2020-08-11 11:21:54 +03:00
parent de8db692f4
commit b5494320f9
6 changed files with 13 additions and 13 deletions

View file

@ -14,6 +14,7 @@ import (
"strings"
"github.com/nspcc-dev/neo-go/pkg/smartcontract"
"github.com/nspcc-dev/neo-go/pkg/smartcontract/manifest"
"github.com/nspcc-dev/neo-go/pkg/smartcontract/nef"
"golang.org/x/tools/go/loader"
)
@ -37,6 +38,9 @@ type Options struct {
// Contract features.
ContractFeatures smartcontract.PropertyState
// Runtime notifications.
ContractEvents []manifest.Event
// The list of standards supported by the contract.
ContractSupportedStandards []string
}
@ -176,7 +180,7 @@ func CompileAndSave(src string, o *Options) ([]byte, error) {
}
if o.ManifestFile != "" {
m, err := di.ConvertToManifest(o.ContractFeatures, o.ContractSupportedStandards...)
m, err := di.ConvertToManifest(o.ContractFeatures, o.ContractEvents, o.ContractSupportedStandards...)
if err != nil {
return b, fmt.Errorf("failed to convert debug info to manifest: %w", err)
}