diff --git a/FirstContract/go.mod b/FirstContract/go.mod new file mode 100644 index 0000000..b46780a --- /dev/null +++ b/FirstContract/go.mod @@ -0,0 +1,5 @@ +module FirstContract + +go 1.20 + +require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20221202075445-cb5c18dc73eb diff --git a/FirstContract/go.sum b/FirstContract/go.sum new file mode 100644 index 0000000..a6410fb --- /dev/null +++ b/FirstContract/go.sum @@ -0,0 +1,2 @@ +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20221202075445-cb5c18dc73eb h1:GFxfkpXEYAbMIr69JpKOsQWeLOaGrd49HNAor8uDW+A= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20221202075445-cb5c18dc73eb/go.mod h1:23bBw0v6pBYcrWs8CBEEDIEDJNbcFoIh8pGGcf2Vv8s= diff --git a/FirstContract/main.go b/FirstContract/main.go new file mode 100644 index 0000000..61e4951 --- /dev/null +++ b/FirstContract/main.go @@ -0,0 +1,15 @@ +package FirstContract + +import "github.com/nspcc-dev/neo-go/pkg/interop/runtime" + +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) +} \ No newline at end of file diff --git a/FirstContract/main.nef b/FirstContract/main.nef new file mode 100755 index 0000000..b30f3d1 Binary files /dev/null and b/FirstContract/main.nef differ diff --git a/FirstContract/neo-go.yml b/FirstContract/neo-go.yml new file mode 100644 index 0000000..918a43a --- /dev/null +++ b/FirstContract/neo-go.yml @@ -0,0 +1,11 @@ +name: FirstContract +sourceurl: http://example.com/ +safemethods: [] +supportedstandards: [] +events: + - name: Hello world! + parameters: + - name: args + type: Array +permissions: + - methods: '*'