2019-09-03 18:00:10 +03:00
|
|
|
package enginecontract
|
2018-08-22 09:51:35 +02:00
|
|
|
|
|
|
|
import (
|
2020-03-03 17:21:42 +03:00
|
|
|
"github.com/nspcc-dev/neo-go/pkg/interop/runtime"
|
2018-08-22 09:51:35 +02:00
|
|
|
)
|
|
|
|
|
2020-08-10 13:42:02 +03:00
|
|
|
// NotifyScriptContainer sends runtime notification with script container hash
|
|
|
|
func NotifyScriptContainer() {
|
2020-06-16 11:54:48 +03:00
|
|
|
tx := runtime.GetScriptContainer()
|
2020-06-29 11:25:32 +03:00
|
|
|
runtime.Notify("Tx", tx.Hash)
|
2020-08-10 13:42:02 +03:00
|
|
|
}
|
2018-08-22 09:51:35 +02:00
|
|
|
|
2020-08-10 13:42:02 +03:00
|
|
|
// NotifyCallingScriptHash sends runtime notification with calling script hash
|
|
|
|
func NotifyCallingScriptHash() {
|
2020-06-16 11:54:48 +03:00
|
|
|
callingScriptHash := runtime.GetCallingScriptHash()
|
2020-06-29 11:25:32 +03:00
|
|
|
runtime.Notify("Calling", callingScriptHash)
|
2020-08-10 13:42:02 +03:00
|
|
|
}
|
2018-08-22 09:51:35 +02:00
|
|
|
|
2020-08-10 13:42:02 +03:00
|
|
|
// NotifyExecutingScriptHash sends runtime notification about executing script hash
|
|
|
|
func NotifyExecutingScriptHash() {
|
2020-06-16 11:54:48 +03:00
|
|
|
execScriptHash := runtime.GetExecutingScriptHash()
|
2020-06-29 11:25:32 +03:00
|
|
|
runtime.Notify("Executing", execScriptHash)
|
2020-08-10 13:42:02 +03:00
|
|
|
}
|
2018-08-22 09:51:35 +02:00
|
|
|
|
2020-08-10 13:42:02 +03:00
|
|
|
// NotifyEntryScriptHash sends notification about entry script hash
|
|
|
|
func NotifyEntryScriptHash() {
|
2020-06-16 11:54:48 +03:00
|
|
|
entryScriptHash := runtime.GetEntryScriptHash()
|
2020-06-29 11:25:32 +03:00
|
|
|
runtime.Notify("Entry", entryScriptHash)
|
2018-08-22 09:51:35 +02:00
|
|
|
}
|