In this track: Execution traces and low-level calls
advanced · 4 MIN READ

Precompiles in the EVM

Special addresses can expose protocol-defined computation.

LET’S PICTURE IT

A service counter can be built into the building rather than installed as an ordinary shop.

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.

Recognize native execution support

Precompiles implement specified operations through client logic at designated addresses. Their behavior is not necessarily represented by ordinary deployed contract runtime code.

Use exact input formats

Each precompile defines its own byte input and output rules. A generic Solidity function ABI is not automatically the correct input encoding.

Check the chain and fork

Available precompiles, addresses and gas schedules depend on the network rules. A result assumed from another chain or older fork may not apply.

Handle failures and validation

A precompile is not a blanket guarantee that arbitrary cryptographic input is valid. Follow its documented success behavior and validate the result expected by the calling protocol.

Follow the execution

Special address → client-defined operation
Exact input bytes → specified computation
Output interpretation requires the precompile’s own format.

A local conceptual trace with explicit assumptions; this is not a trace of a live transaction.

QUICK CHECK · NO PRESSURE

Must a precompile have ordinary deployed runtime bytecode?

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.