Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Emit Events

emit Name(args) is a route-body action that writes a declared event to the transaction log.

transfer(dst: address, amount: U256) => [
    emit Transfer(msg::sender, dst, amount)
]

Declare the event first (event Name(...) at program or entity scope), then emit it from any non-pure route. Argument count and types must match the declaration (V35); an undeclared name is V34.

Full declaration rules, indexed parameters, and V36 (max three indexed fields on EVM) are in Events.