diff --git a/cli/smartcontract/smart_contract.go b/cli/smartcontract/smart_contract.go index a6f62960e..262050d91 100644 --- a/cli/smartcontract/smart_contract.go +++ b/cli/smartcontract/smart_contract.go @@ -61,8 +61,16 @@ const ( import "github.com/nspcc-dev/neo-go/pkg/interop/runtime" -func Main(op string, args []interface{}) { - runtime.Notify("Hello world!") +var notificationName string + +// init initializes notificationName before calling any other smart-contract method +func init() { + notificationName = "Hello world!" +} + +// RuntimeNotify sends runtime notification with "Hello world!" name +func RuntimeNotify(args []interface{}) { + runtime.Notify(notificationName, args) }` // cosignersSeparator is a special value which is used to distinguish // parameters and cosigners for invoke* commands @@ -326,6 +334,17 @@ func initSmartContract(ctx *cli.Context) error { m := ProjectConfig{ SupportedStandards: []string{}, + Events: []manifest.Event{ + { + Name: "Hello world!", + Parameters: []manifest.Parameter{ + { + Name: "args", + Type: smartcontract.ArrayType, + }, + }, + }, + }, } b, err := yaml.Marshal(m) if err != nil {