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

> function emit_ event(type: text , data: gtv ): unit Register an event for handling by the blockchain at the end of the current transaction. Postchain allow

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

FUNCTION

# emit\_event

```signature
function emit_event(type: text, data: gtv): unit
```

Register an event for handling by the blockchain at the end of the current transaction.

Postchain allows a set of events to be triggered at the end of every transaction, after all
operations have been executed. This function is used to trigger such an event.
Handlers for these events, sometimes called *event sinks*, are registered with the *block builder*
in Postchain extensions.

`emit_event` is used internally in several Chromia platform extensions such as
[ICMF](https://docs.chromia.com/intro/cross-chain/icmf) and
[EIF](https://blog.chromia.com/chromia-explained-eif/).

**Parameters**

* **type** — the event processor to trigger
* **data** — arguments to the event processor

**Throws**

* `exception` — if there is no operation context

**See Also**

1. [Usage of `op_context.emit_event()` in EIF](https://gitlab.com/chromaway/core/postchain-eif/blob/c5eea67d38d1bba29f49ffa4430b9e40a60bc622/postchain-eif-rell/rell/src/hbridge/eif_events.rell#L25)
2. [Usage of `op_context.emit_event()` in ICMF](https://gitlab.com/chromaway/core/directory-chain/blob/abd4f0d73092020f5160d27057e4dedd8721bad5/src/lib/icmf/module.rell#L10)

Since 0.10.4

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