Leitura rápida
Comece pela explicação mais curta e útil antes de aprofundar.
Anchor's event system using the `emit!()` macro. Events are defined with `#[event]` on structs and emitted as base64-encoded data in program logs (prefixed with a discriminator). Clients subscribe via `program.addEventListener('EventName', callback)`. Events cost compute units for logging and are limited by the 10KB log size.