Solidity REPL
Types & storage

Struct values

Create a struct and inspect each field immediately.

Solidity 0.8.36REPL mode

Why use this example

Use this pattern to explore how Solidity represents typed values and how state-changing expressions affect storage. The entry isolates struct values so its input, result, and state changes stay easy to compare.

Solidity to run

struct Quote { uint256 amount; address token; }
Quote memory quote = Quote({ amount: 2 ether, token: address(0xBEEF) })
quote.amount
quote.token

What to expect

The struct fields evaluate to 2 ether and the address ending in BEEF, preserving their Solidity types.

Continue the investigation

Change a value, add another expression, or open Inspect after the run. Accepted entries remain available to the next entry, and the clean replay keeps the complete result reproducible.

Read about state and storage Reproducible investigation