runtime

package
v0.94.1-pre Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxEventNameLen is the maximum length of a name for event.
	MaxEventNameLen = 32
	// MaxNotificationSize is the maximum length of a runtime log message.
	MaxNotificationSize = 1024
)

Variables

This section is empty.

Functions

func CheckHashedWitness

func CheckHashedWitness(ic *interop.Context, hash util.Uint160) (bool, error)

CheckHashedWitness checks given hash against current list of script hashes for verifying in the interop context.

func CheckKeyedWitness

func CheckKeyedWitness(ic *interop.Context, key *keys.PublicKey) (bool, error)

CheckKeyedWitness checks hash of signature check contract with a given public key against current list of script hashes for verifying in the interop context.

func CheckWitness

func CheckWitness(ic *interop.Context) error

CheckWitness checks witnesses.

func GasLeft

func GasLeft(ic *interop.Context) error

GasLeft returns remaining amount of GAS.

func GetCallingScriptHash added in v0.92.0

func GetCallingScriptHash(ic *interop.Context) error

GetCallingScriptHash returns calling script hash. While Executing and Entry script hashes are always valid for non-native contracts, Calling hash is set explicitly when native contracts are used, because when switching from one native to another, no operations are performed on invocation stack.

func GetEntryScriptHash added in v0.92.0

func GetEntryScriptHash(ic *interop.Context) error

GetEntryScriptHash returns entry script hash.

func GetExecutingScriptHash added in v0.92.0

func GetExecutingScriptHash(ic *interop.Context) error

GetExecutingScriptHash returns executing script hash.

func GetInvocationCounter

func GetInvocationCounter(ic *interop.Context) error

GetInvocationCounter returns how many times current contract was invoked during current tx execution.

func GetNotifications

func GetNotifications(ic *interop.Context) error

GetNotifications returns notifications emitted by current contract execution.

func GetTime added in v0.92.0

func GetTime(ic *interop.Context) error

GetTime returns timestamp of the block being verified, or the latest one in the blockchain if no block is given to Context.

func GetTrigger added in v0.92.0

func GetTrigger(ic *interop.Context) error

GetTrigger returns the script trigger.

func Log added in v0.92.0

func Log(ic *interop.Context) error

Log logs the message passed.

func Notify added in v0.92.0

func Notify(ic *interop.Context) error

Notify should pass stack item to the notify plugin to handle it, but in neo-go the only meaningful thing to do here is to log.

func Platform added in v0.92.0

func Platform(ic *interop.Context) error

Platform returns the name of the platform.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL