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