Solidity Foundations·Lesson 2 of 23·15 min
Storage vs Memory vs Calldata, Gas Implications
This lesson is for enrolled learners
The concept Every reference-type variable in Solidity (arrays, structs, mappings, and strings/bytes) must declare a data location: storage, memory, or calldata. These aren't style choices — they tell the compiler which part of the EVM's address space holds the data and therefore what it costs to read or write it, and in some cases they change whether you're operating on……
Enroll to continue Already enrolled? Sign in