Solidity 8 – Data Location
Last Updated on 25. November 2025 by Mario Oettler
The Ethereum Virtual Machine (EVM) knows six places where to store data:
- storage,
- transient storage
- memory,
- stack,
- calldata
- (logs)
Knowing the storage place can be relevant for gas optimization, initialization, and value assignment to variables. It can also be important to understand how contracts work and explain some behavior of contracts.
The logs are reserved for events and are not important for us in this context.
Register
Sign in