Show / Hide Table of Contents

Runtime Class

Provides a set of methods during smart contract execution.

Namespace: Neo.SmartContract.Framework.Services



public static class Runtime


Trigger Gets the trigger type for the smart contract (verification contract or application contract).
PlatformGets information of the platform on which the smart contract is currently executed
ScriptContainerGets the current script container
ExecutingScriptHashGets the script hash of the current context
CallingScriptHashGets the script hash of the calling contract
EntryScriptHashGets the script hash of the entry context
TimeGets the timestamp of the current block
InvocationCounterGets the call number of the current contract
GasLeftGets the left GAS of the fee of current transaction


GetNotifications(UInt160 hash = null) Gets all notifications of the execution of a contract
Log(string) Sends a log message to the client executing the smart contract.
CheckWitness() Determines whether the specified account has witnessed the current transaction
BurnGasBurning GAS to benefit the Neo ecosystem


The Runtime class is a static class and does not require a constructor.