op_context
You can only use system namespace op_context
in an operation or a function called from an operation, but not in a query.
- Functions
op_context.block_height -> integer
op_context.last_block_time -> integer
op_context.op_index -> integer
op_context.exists -> boolean
op_context.get_signers() -> list<byte_array>
op_context.is_signer(public_key: byte_array) -> boolean
op_context.get_all_operations() -> list<gtx_operation>
op_context.get_current_operation() -> gtx_operation
op_context.emit_event
op_context.transaction -> transaction
Functions
op_context.block_height -> integer
Provides the height of the block currently being built.
Parameters:
- None
Returns:
integer
: The height of the block being built.
op_context.last_block_time -> integer
Returns the timestamp of the last block in milliseconds.
Parameters:
- None
Returns:
integer
: The timestamp of the last block, or -1 if there is no last block.