Encyclopedia Ethereum · Entry 126
Ethereum state and storage: what contracts remember
In this article
At a glance
Key facts
| Fact | Detail | Source |
|---|---|---|
| Account fields | Account state includes balance, nonce and commitments to code and storage. | [1] |
| Slots | Solidity arranges persistent values into storage slots according to layout rules. | [2] |
| Token balance | ERC-20 exposes balances through its contract interface. | [4] |
One address can participate in many ledgers
An address has a native ETH balance in account state. A token contract can separately record how many of its own units that address holds. Another token maintains its own accounting.
This is why a token balance query needs the token contract and network, not just the holder’s address.
Storage has a layout that code must respect
Small values can share a slot, while mappings and dynamic arrays use derived storage locations. A source-level variable name is not itself an on-chain storage address.
Proxy upgrades must preserve the intended interpretation of existing storage. A new implementation can compile successfully while reading the wrong slot or packed field.
Read state at a stated block
RPC methods can query state at a selected block or tag when the provider has the necessary data. A value at an earlier block need not equal the latest value.
An execution simulation reads one state context and models changes from it. A public citation should identify the relevant chain and block when the value is time-dependent.
Direct answers
Questions people ask
Are event logs the same as contract storage?
No. Logs are emitted execution records, while storage is persistent contract state read and modified by contract code. An indexer may use logs to reconstruct a view, but the two are distinct.
Inspect the evidence
The answer and key facts have stable claim links. These records retain the scope and qualification when reused.
Ethereum state records account information and contract storage at a particular point in the chain. Persistent storage holds a contract’s data between transactions; execution memory and calldata serve different roles during calls. A token balance is usually a value in the token contract’s accounting, not native ETH stored inside the holder’s account.
Scope: Ethereum · data through 2026-10-02. Verification: verified · 2026-10-02T18:12:41.505Z.
Link to this claimAccount fields: Account state includes balance, nonce and commitments to code and storage.
Scope: Ethereum · data through 2026-10-02. Verification: verified · 2026-10-02T18:12:41.505Z.
Link to this claimSlots: Solidity arranges persistent values into storage slots according to layout rules.
Scope: Ethereum · data through 2026-10-02. Verification: verified · 2026-10-02T18:12:41.505Z.
Link to this claimToken balance: ERC-20 exposes balances through its contract interface.
Scope: Ethereum · data through 2026-10-02. Verification: verified · 2026-10-02T18:12:41.505Z.
Link to this claimRevision history
- — First publication after primary-source research and independent automated verification.
Source register
Sources and references
Retrieval dates and locators are recorded individually.- Ethereum accountsethereum.org contributors
Key-controlled and code-controlled accounts, balances, nonces and storage.
Locator: Account types; An account examined; Account creation · Retrieved: 2026-10-02T17:03:41.958ZOpen source - Layout of State Variables in Storage and Transient StorageSolidity contributors
Persistent storage slots, packing and mappings.
Locator: Layout of State Variables; Mappings and Dynamic Arrays · Version / scope: Solidity 0.8.30 documentation · Retrieved: 2026-10-02T17:03:42.820ZOpen source - Solidity: Delegatecall and LibrariesSolidity contributors
Execution uses another contract’s code in the caller’s context and storage.
Locator: Delegatecall and Libraries; Storage, Memory and the Stack; Logs; Message Calls · Version / scope: Solidity 0.8.30 documentation · Retrieved: 2026-10-02T17:03:42.822ZOpen source - ERC-20 Token StandardEthereum Improvement Proposals
Token supply, displayed units and balance accounting.
Locator: totalSupply; balanceOf; transfer; decimals; approve; allowance; transferFrom; Transfer · Version / scope: ERC-20 · Retrieved: 2026-10-02T17:03:45.826ZOpen source - Ethereum JSON-RPCethereum.org contributors
RPC response fields, transaction receipts, call simulation and log filtering.
Locator: eth_getTransactionByHash; eth_getTransactionReceipt; eth_call; eth_getLogs; eth_getCode; eth_estimateGas; eth_getBalance; eth_getStorageAt; eth_getTransactionCount; default block parameter · Retrieved: 2026-10-02T17:03:42.060ZOpen source
Research and drafting use AI assistance. A separate automated review checks claims against primary sources; no external expert or named human review is implied. Publication, substantive editing, source retrieval and verification are recorded separately. This version was independently checked by an automated reviewer on 2 October 2026.
Editorial method and correctionsDegrees of Satoshi editorial project. “Ethereum state and storage: what contracts remember.” Published 2026-10-02; updated 2026-10-02. https://degreesofsatoshi.com/encyclopedia/ethereum-state-and-storage/