get_events

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
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
// 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();

Since

0.13.0

See also