Events are declared with the `event` keyword and emitted with `log`. Indexed fields let off-chain listeners filter efficiently by topic, exactly as in Solidity.
event Deposited:
sender: indexed(address)
amount: uint256
@external
@payable
def deposit():
self.balances[msg.sender] += msg.value
log Deposited(sender=msg.sender, amount=msg.value)Events cost far less gas than storage and are the standard way for a front-end or indexer to reconstruct contract history without re-reading the whole state.