# op_context · Rell standard library · Chromia Docs (concept)

> Functions and properties that are only accessible withing the scope of an operation. Example Rell Copy operation my_operation () { print ( op_context . exi

Source: https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/op_context/

PACKAGE

# op\_context

On this page

* [Example](#example)
* [Functions](#functions)
* [Properties](#properties)

Functions and properties that are only accessible withing the scope of an operation.

### Example

Rell

```
operation my_operation() {
    print(op_context.exists()); // Prints true
}
query my_query() {
    return op_context.exists(); // Returns false
}
```

## Functions

[emit\_event](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/op_context/emit_event/)
:   Register an event for handling by the blockchain at the end of the current transaction.

[get\_all\_operations](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/op_context/get_all_operations/)
:   Gets all operations in the current transaction.

[get\_current\_operation](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/op_context/get_current_operation/)
:   Get a struct representing the current operation.

[get\_signers](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/op_context/get_signers/)
:   Get the signers of the current transaction.

[is\_signer](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/op_context/is_signer/)
:   Check if a given public key is a signer of the current transaction; i.e. if it's in the list of

## Properties

[exists](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/op_context/exists/)
:   Indicates whether there is currently an operation context, i.e. if the currently executing code has

[last\_block\_time](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/op_context/last_block_time/)
:   The timestamp of the most recent completed block in the blockchain, in milliseconds.

[block\_height](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/op_context/block_height/)
:   The height of the block being built, i.e. the number of completed blocks in the blockchain.

[op\_index](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/op_context/op_index/)
:   The index of the current operation within the transaction.

[View this page on docs.chromia.com](https://docs.chromia.com/pages/rell-stdlib/-rell%20-system%20-library/op_context/index.html)Generated API reference, mirrored from the live docs
