Cairo course

Cairo Level 7: Events & Contract Interaction

Events & Contract Interaction is level 7 of 14 of the LoWisa Cairo course. It has 3 lessons and 9 ideas. Below is every lesson and what it teaches, in one line each.

Updated 2026-11-30

Events

  • Event enums. Contract events declare as an enum: variants with typed fields, derived for emission.
  • emit. self.emit logs an event: the breadcrumb indexers and UIs live on.
  • Keys and data. Event fields split into keys (searchable) and data: filterable history designed up front.

Dispatchers and Interfaces

  • Interfaces. A #[starknet::interface] trait declares another contract’s surface: the typed handle.
  • Dispatchers. The generated dispatcher calls a contract by address: interface trait plus contract address.
  • Safe dispatchers. Safe dispatchers return Results on failure: the callee’s panic handled as data.

Contract-to-Contract Communication

  • Untrusted callees. Every cross-contract call hands control to untrusted code: state settled before calls out.
  • Reentrancy in Cairo. Reentrancy exists on Starknet too: ordering and guards, the EVM lesson carried over.
  • Library calls. A library call runs another class’s code in your storage context: delegatecall’s cousin, feared accordingly.

Before and after this level

In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See Checkpoints and flashcards.

Frequently asked questions

What does Cairo Level 7: Events & Contract Interaction cover?

Events, Dispatchers and Interfaces, Contract-to-Contract Communication: 3 lessons and 9 ideas.

What should I know before this level?

The level before it, Level 6: Starknet Contracts, which covers Contract Structure, Storage, External Functions.

Learn Cairo on your phone

The first level is free. LoWisa is on Google Play and the App Store.