neo-go/examples/engine/engine.go

30 lines
896 B
Go
Raw Normal View History

package enginecontract
import (
"github.com/nspcc-dev/neo-go/pkg/interop/runtime"
)
// NotifyScriptContainer sends runtime notification with script container hash.
2020-08-10 10:42:02 +00:00
func NotifyScriptContainer() {
tx := runtime.GetScriptContainer()
runtime.Notify("Tx", tx.Hash)
2020-08-10 10:42:02 +00:00
}
// NotifyCallingScriptHash sends runtime notification with calling script hash.
2020-08-10 10:42:02 +00:00
func NotifyCallingScriptHash() {
callingScriptHash := runtime.GetCallingScriptHash()
runtime.Notify("Calling", callingScriptHash)
2020-08-10 10:42:02 +00:00
}
// NotifyExecutingScriptHash sends runtime notification about executing script hash.
2020-08-10 10:42:02 +00:00
func NotifyExecutingScriptHash() {
execScriptHash := runtime.GetExecutingScriptHash()
runtime.Notify("Executing", execScriptHash)
2020-08-10 10:42:02 +00:00
}
// NotifyEntryScriptHash sends notification about entry script hash.
2020-08-10 10:42:02 +00:00
func NotifyEntryScriptHash() {
entryScriptHash := runtime.GetEntryScriptHash()
runtime.Notify("Entry", entryScriptHash)
}