In this track: Inside the EVM
advanced · 4 MIN READ

CALL opcode basics

An external call creates a nested execution frame.

LET’S PICTURE IT

One worker asks another worker to perform a task and waits for its result.

SEE IT FOR YOURSELF
A valid counter call, step by stepStep 1 / 4
A valid counter call, step by stepFunction requestincrement()No argumentsBefore executionstored count0A local teaching example with a defined starting stateIncoming callCheck function dispatchCheck coded conditionsRules passConditions passContinue executionA failed check can revert insteadCalculation0 + 1Result: 1Storage writecount = 1Persists if call succeedsCalculating a local value and storing it are separate stepsPersistent statecount1Later readGetter reports 1No new incrementState, logs and browser display have different roles

This example begins with count zero and a request to call increment(). No real contract is deployed.

Animated local teaching model. No wallet, RPC or live blockchain data. Some labels and hashes are abbreviated for readability.

Supply a complete call context

CALL specifies a target, value, input and output memory ranges, and gas. The actual result also depends on the target and current execution conditions.

Separate transaction and message call

A nested CALL does not create a new signed transaction or a separate transaction receipt. It is part of the surrounding execution.

Check the returned success flag

Low-level CALL does not automatically make every child failure a top-level revert. The caller decides how to handle a false result under its own code.

Treat handoff as an interaction boundary

The target can execute code and call other contracts. State assumptions made before the call may need protection against reentry and changed observations.

Trace the idea

A → CALL B
B executes in a child frame
B returns or fails
A receives an outcome and decides what follows

Stack examples list the bottom first and the top last. These small traces omit gas and surrounding dispatch unless stated.

QUICK CHECK · NO PRESSURE

Does a nested CALL create a separately signed transaction?

Your progress stays in this browser.
Keep exploring the original referenceethereum.org ↗

Original explanations by EtherTools. Examples are educational and source-linked; this site is independent of the Ethereum Foundation. Our approach.