runtime

package
v0.99.4 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2022 License: MIT Imports: 19 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
	// SystemRuntimeLogMessage represents log entry message used for output
	// of the System.Runtime.Log syscall.
	SystemRuntimeLogMessage = "runtime log"
)

Variables

This section is empty.

Functions

func BurnGas added in v0.95.0

func BurnGas(ic *interop.Context) error

BurnGas burns GAS to benefit NEO ecosystem.

func CheckHashedWitness

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

CheckHashedWitness checks the given hash against the 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 the hash of the signature check contract with the given public key against the 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 the remaining amount of GAS.

func GetAddressVersion added in v0.99.0

func GetAddressVersion(ic *interop.Context) error

GetAddressVersion returns the address version of the current protocol.

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 the current contract has been invoked during the current tx execution.

func GetNetwork added in v0.96.0

func GetNetwork(ic *interop.Context) error

GetNetwork returns chain network number.

func GetNotifications

func GetNotifications(ic *interop.Context) error

GetNotifications returns notifications emitted in the current execution context.

func GetRandom added in v0.96.0

func GetRandom(ic *interop.Context) error

GetRandom returns pseudo-random number which depends on block nonce and transaction hash.

func GetScriptContainer added in v0.99.1

func GetScriptContainer(ic *interop.Context) error

GetScriptContainer returns transaction or block that contains the script being run.

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