Solidity REPL
Contracts & calls

Anonymous event

Emit an anonymous event and inspect its indexed and data fields.

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 anonymous event so its input, result, and state changes stay easy to compare.

Solidity to run

event Observation(address indexed observer, uint256 value) anonymous
emit Observation(msg.sender, 42)
uint256(42)

Official Solidity reference

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

Events

What to expect

The run returns 42 and records an anonymous log whose first topic is the indexed observer address rather than an event signature.

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