runtime

package
v0.105.1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 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 CurrentSigners added in v0.104.0

func CurrentSigners(ic *interop.Context) error

CurrentSigners returns signers of the currently loaded transaction or stackitem.Null if script container is not a transaction.

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 LoadScript added in v0.100.0

func LoadScript(ic *interop.Context) error

LoadScript takes a script and arguments from the stack and loads it into the VM.

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