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

What contracts cannot do alone

Deterministic execution needs explicit inputs and a trigger.

LET’S PICTURE IT

A vending machine follows its program when someone interacts with it. It does not independently browse the internet to decide what snack you wanted.

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.

Code needs execution to be triggered

A contract does not normally wake up at a time printed in a comment. An incoming transaction, or a call within transaction processing, triggers the relevant execution. Automation services still need a mechanism that causes calls.

Arbitrary websites are not built-in data

Ordinary EVM contract execution does not directly perform a random HTTP request to fetch today’s weather. Independent nodes need reproducible input and rules. External facts require a design for supplying data.

Outside inputs introduce assumptions

An oracle or reporting party can provide information under a particular mechanism. The contract can check signatures or other conditions, but those checks do not magically observe the physical world.

An interface can hide the machinery

A website may combine web APIs, transaction automation and contracts into one screen. To understand the system, ask which work is onchain, which is offchain and which component must be trusted for each answer.

QUICK CHECK · NO PRESSURE

Can ordinary EVM execution directly fetch any website’s weather API on demand?

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.