Cairo course

Cairo Level 8: Components

Components is level 8 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

Reusable Contract Components

  • Components. A component packages storage, events and logic for embedding: ownable and upgradeable as building blocks.
  • component! macro. The component! macro mounts a component into a contract: its storage and events merged in.
  • Ecosystem components. Audited component libraries supply the classics: ownership, access control, upgrades: reviewed by many eyes.

Composition

  • Embedding impls. Components expose embeddable impls: their external functions surfacing on your contract deliberately.
  • Internal impls. Internal component functions serve the host: composition without exposing every gear.
  • No inheritance maze. Components compose flat: the auditor reads a mount list, not a parent chain.

Contract Architecture

  • Small trusted core. Architecture keeps the money logic small: components for the commodity parts.
  • Interfaces at seams. Multi-contract systems talk through declared interfaces: the trust graph explicit.
  • Upgradability by class. Starknet upgrades swap the class hash: a power gated, timelocked and documented.

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 8: Components cover?

Reusable Contract Components, Composition, Contract Architecture: 3 lessons and 9 ideas.

What should I know before this level?

The level before it, Level 7: Events & Contract Interaction, which covers Events, Dispatchers and Interfaces, Contract-to-Contract Communication.

Learn Cairo on your phone

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