Expand description
Utility functions related to the current execution context or program execution flow.
Functions§
- block_
height - Get the current block height.
- block_
timestamp - Get the current block timestamp.
- env_
vars - Get current version of environment variables.
- exit
- Terminate the execution of a program.
- gas_
available - Get the current amount of gas available for execution.
- leave
- Break the current execution.
- program_
id - Return the identifier of the current program.
- random
- Get the random seed, along with the block number from which it is determinable by chain observers.
- reply_
deposit - Provide gas deposit from current message to handle reply message on given message id.
- reserve_
gas - Reserve the
amount
of gas for further usage. - sleep_
for - Delays message execution in asynchronous way for the specified number of
blocks. It works pretty much like the
exec::wait_for
function, but allows to continue execution after the delay in the same handler. It is worth mentioning that the program state gets persisted inside the call, and the execution resumes with potentially different state. - system_
reserve_ gas - Reserve the
amount
of gas for system usage. - unreserve_
gas - Unreserve gas identified by
ReservationId
. - value_
available - Get the total available value amount.
- wait
- Pause the current message handling.
- wait_
for - Same as
wait
, but delays handling for a specific number of blocks. - wait_
up_ to - Same as
wait
, but delays handling for the maximum number of blocks that can be paid for and doesn’t exceed the givenduration
. - wake
- Resume previously paused message handling.
- wake_
delayed - Same as
wake
, but executes after thedelay
expressed in block count.