Docs
chromia.com

FUNCTION

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

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

Since 0.13.0