The values a contract currently remembers after accepted updates.
LET’S PICTURE IT
A game’s move history and its current board position are related, but they are not the same view.
SEE IT FOR YOURSELF
Pack small values into Solidity storage slotsStep 1 / 4
In this simple default-layout example, two uint128 values come before one uint256. Each slot holds thirty-two bytes.
In this simple default-layout example, two uint128 values come before one uint256. Each slot holds thirty-two bytes.The first sixteen-byte value occupies the low-order half of slot zero. Low-order bytes are shown on the right.The second uint128 fits in the remaining sixteen bytes. Both values now share slot zero.C needs a complete thirty-two-byte slot, so it begins at slot one. Two packed small values plus C use two slots.
Animated local teaching model. No wallet, RPC or live blockchain data. Some labels and hashes are abbreviated for readability.
History leads to a current result
Transactions form a history of requests and outcomes. Applying valid state transitions gives a current state. For a counter, the count is part of state; the transactions that led there explain its history.
State is more than a screen
A website might display cached or interpreted values. The contract’s storage follows protocol execution. Changing browser text does not alter that storage, and hiding a field does not make publicly readable network data secret.
Different locations serve different jobs
Storage persists, memory is working space during execution, and calldata carries call input. Confusing those locations can lead to incorrect reasoning about what survives after a function returns.
Execution can roll changes back
A reverted call discards the state changes within its reverted execution. That does not mean no computation occurred or no gas was consumed. Explore the storage and revert lessons to connect persistence with failure.