Solidity REPL
Contracts & calls

Low-level static call

Encode calldata, use staticcall, and decode the returned bytes.

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 low-level static call so its input, result, and state changes stay easy to compare.

Solidity to run

contract Doubler {
  function double(uint256 value) external pure returns (uint256) { return value * 2; }
}

Doubler doubler = new Doubler()
bytes memory input = abi.encodeCall(Doubler.double, (21))
(bool ok, bytes memory output) = address(doubler).staticcall(input)
ok
abi.decode(output, (uint256))

Official Solidity reference

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

Members of addresses

What to expect

The static call succeeds and its returned bytes decode to uint256 value 42.

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