In this track: Meet smart contracts
beginner · 3 MIN READ

Walk through a pretend contract call

Follow one input from the interface to its checked state update.

LET’S PICTURE IT

Imagine handing a numbered instruction to the shared counter desk: “increment once.”

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.

Describe the request

A user chooses increment() on a fictional counter. There are no arguments in this example. The ABI still defines a function signature, from which software can calculate a selector to identify the requested entry point.

Authorize the transaction context

A real wallet would prepare network, destination, nonce and fees and obtain authorization. Our example skips real signing and keeps everything local. Preparing calldata alone is not the same as authorizing or submitting a transaction.

Execute the rule

The fictional contract reads its count, adds one and stores the result if execution succeeds. Any applicable permission check must pass. A revert would roll back the call’s changes rather than secretly count as success.

Read the result appropriately

A later read can show the new count from the chosen state. A receipt reports the transaction’s outcome, while finality concerns its place in accepted history. The local counter button teaches the rule without pretending to provide these network guarantees.

TURN UNDERSTANDING INTO PRACTICEOpen the ABI encoder →
QUICK CHECK · NO PRESSURE

Does calculating calldata automatically submit an authorized 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.