Solidity course

Solidity Level 2: State & Data Locations

State & Data Locations is level 2 of 17 of the LoWisa Solidity course. It has 3 lessons and 9 ideas. Below is every lesson and what it teaches, in one line each.

Updated 2026-11-30

Contract Storage

  • Storage. Storage is the contract’s permanent state: slot-addressed, replicated on every node, expensive by design.
  • Slots. State variables pack into 32-byte slots: layout order deciding real gas costs.
  • Cold and warm access. First touch of a slot is cold and costlier: access patterns are money.

Memory and Calldata

  • Memory. memory is transient scratch space per call: cheap, wiped when the call ends.
  • calldata. calldata is the read-only input bytes: the cheapest place for external function arguments.
  • Location keywords. Reference parameters declare a location: storage, memory or calldata: semantics, not style.

State Mutation

  • Transactions mutate. State changes only inside transactions: atomic: all effects land or all revert.
  • Revert semantics. A revert undoes every state change of the call: failure leaves no half-writes.
  • Checks-effects-interactions. The safe order: checks, then effects, then interactions: state settled before any external call.

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 Solidity Level 2: State & Data Locations cover?

Contract Storage, Memory and Calldata, State Mutation: 3 lessons and 9 ideas.

What should I know before this level?

The level before it, Level 1: Solidity Foundations, which covers Types and Variables, Functions, Contract Structure.

Learn Solidity on your phone

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