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

> function get_ events(): list <( text , gtv )> Get all events that were emitted during the construction of the last block. Events are emitted in application

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

FUNCTION

# get\_events

```signature
function get_events(): list<(text, gtv)>
```

Get all events that were emitted during the construction of the last block.

Events are emitted in application code using `op_context.emit_event()`.

#### Example:

##### Application code

Rell

```
op_context.emit_event("my_message_type", "my_gtv_data".to_gtv());
op_context.emit_event("my_other_message_type", "my_gtv_data".to_gtv());
op_context.emit_event("my_another_message_type", "my_gtv_data".to_gtv());
```

##### Test code

Rell

```
// returns: [(my_message_type,"my_gtv_data"), (my_other_message_type,"my_gtv_data"), (my_another_message_type,"my_gtv_data")]
return rell.test.get_events();
```

**See Also**

1. [`op_context.emit_event()` - Rell Standard Library](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/op_context/emit_event/)

Since 0.13.0

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