Solidity REPL
Contracts & calls

Emit and decode an event

See indexed and normal event arguments beside their raw topics.

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

Solidity to run

event PriceChecked(uint256 indexed amount, string note)
uint256 amount = uint256(2 ether) / 3
emit PriceChecked(amount, "rounded down")
amount

What to expect

The run returns the rounded-down amount and records PriceChecked with its indexed amount, text argument, and raw topics.

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