Solidity REPL
Contracts & calls

Constant and immutable state

Compare a compile-time constant with a constructor-assigned immutable.

Solidity 0.8.36REPL mode

Why use this example

Use this pattern to test contract composition, external calls, events, and return values inside one reproducible run. The entry isolates constant and immutable state so its input, result, and state changes stay easy to compare.

Solidity to run

contract Configuration {
  uint256 public constant SCALE = 1e18;
  address public immutable owner;
  constructor(address initialOwner) { owner = initialOwner; }
}

Configuration config = new Configuration(address(0xBEEF))
config.SCALE()
config.owner()

Official Solidity reference

Compare this focused investigation with the complete language definition in the Solidity documentation.

Constant and immutable variables

What to expect

The generated getters return the compile-time scale of 1 ether and the constructor-assigned owner ending in BEEF.

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 calls and logs Reproducible investigation