Solidity REPL
VM helpers

Set an address balance

Use vm.deal to fund any address for a local experiment.

Solidity 0.8.36REPL mode

Why use this example

Use this pattern to shape local EVM state directly while keeping the setup and its visible effect in the same investigation. The entry isolates set an address balance so its input, result, and state changes stay easy to compare.

Solidity to run

address alice = address(0xA11CE)
vm.deal(alice, 5 ether)
alice.balance

What to expect

vm.deal assigns Alice a 5 ether balance and the following expression reads that balance back.

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 VM helpers Execution diagnosis