Storage Layout
Map state variables to EVM storage slots and decode their values at a selected block.
Storage Layout shows where state variables are stored in EVM storage and their types. Each row represents a variable; the horizontal range from 0 to 31 represents byte positions within a slot.
Interface
| Area | Description |
|---|---|
| Slot | The storage slot containing the variable. |
| Byte grid | Shows the byte range the variable occupies in that slot. |
| Variable row | Shows the variable name and Solidity type; select the type area to expand details. |
| Details | Inspect the slot, offset, size, and query path for a mapping or array. |
Example
This example uses a local storage layout and return values. It does not send requests.
- Select the
addressarea forowner. It starts at byte 0 of slot0and occupies 20 bytes. - Inspect
paused. It is also in slot0, immediately afterowner, and occupies 1 byte. - Select
balances. This is amapping(address => uint256); enter an address key, then select Query Slot. - After expanding a variable from a real contract, select the latest block or enter a block height, then query its on-chain value.
Use another layout
When the current address has no layout, or when you need an implementation contract or matching deployment to interpret variables, you can temporarily replace the storage layout.
| Method | When to use it |
|---|---|
| Use Info From Other Address | Enter another chain and address to use that contract's layout. Useful for implementation contracts or matching deployments. |
| Use Storage Layout JSON | Paste layout JSON from build artifacts. Useful when you have build files or forge inspect output. |
This example uses a local address and JSON. It does not send requests.
- Select and apply a source.
- The page shows the current layout source; State address remains the address you opened originally.
- Use the replacement layout to inspect variables or query slots. Select Reset when finished to restore the original layout.
Notes
- A slot can contain several smaller variables;
offsetis the variable's starting byte within the slot. - Mappings and dynamic arrays do not have fixed contiguous storage positions: provide a key or index first.
- Layouts come from contract compilation information. Without a layout, you can still inspect raw slot data.
- Replacing a layout changes only how slots are interpreted; it does not change the address used to read state.
