From fa1b1efbb6373d090bc18dd268dcffbfe3a81707 Mon Sep 17 00:00:00 2001 From: Lebedeva Ekaterina Date: Thu, 13 Jul 2023 16:00:15 +0300 Subject: [PATCH] [#XX] Added GetNumber contract It always returns 42. Signed-off-by: Lebedeva Ekaterina --- .gitignore | 1 + FirstContract/{main.go => contract/contract.go} | 11 ++++++++--- FirstContract/{main.nef => contract/contract.nef} | Bin 3 files changed, 9 insertions(+), 3 deletions(-) rename FirstContract/{main.go => contract/contract.go} (64%) rename FirstContract/{main.nef => contract/contract.nef} (100%) diff --git a/.gitignore b/.gitignore index adf8f72..8b1cd89 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ *.dll *.so *.dylib +**/*.nef # Test binary, built with `go test -c` *.test diff --git a/FirstContract/main.go b/FirstContract/contract/contract.go similarity index 64% rename from FirstContract/main.go rename to FirstContract/contract/contract.go index 61e4951..6a1d652 100644 --- a/FirstContract/main.go +++ b/FirstContract/contract/contract.go @@ -1,4 +1,4 @@ -package FirstContract +package contract import "github.com/nspcc-dev/neo-go/pkg/interop/runtime" @@ -11,5 +11,10 @@ func init() { // RuntimeNotify sends runtime notification with "Hello world!" name func RuntimeNotify(args []interface{}) { - runtime.Notify(notificationName, args) -} \ No newline at end of file + runtime.Notify(notificationName, args) +} + +// the answer to the “Great Question” of “Life, the Universe and Everything” +func GetNumber() int { + return 42 +} diff --git a/FirstContract/main.nef b/FirstContract/contract/contract.nef similarity index 100% rename from FirstContract/main.nef rename to FirstContract/contract/contract.nef