Trace a smart contract call from signed transaction to deterministic execution, receipt, and finality.
animation
blockchain
smart-contract
architecture
iot-security
Interactive smart contract execution lab for IoT scenarios with staged animation, gas/resource estimates, transaction failure modes, oracle boundaries, state deltas, receipts, and mobile-ready learning support.
Smart ContractsIoT OraclesGas and StateReceipts
Smart contract execution is deterministic state transition, not hidden automation.
Follow one IoT-triggered transaction as it is signed, checked, executed by the contract runtime, committed to state, and made final by the ledger. Switch scenarios to see rejection, reverted writes, gas exhaustion, stale oracle data, and unsafe callback risk.
Executedtransaction result
0 gasgas or resource used
0 ETHfee estimate
0 sconfirmation wait
Smart contract execution controls, stages, and learning support
What moves
The transaction token crosses the boundary from off-chain IoT evidence into the ledger runtime, then becomes a receipt.
What changes
Only committed state slots and receipt logs survive. Reverted execution consumes resources but does not keep storage writes.
What to compare
Watch gas limit, storage writes, oracle freshness, and confirmation rounds. They decide whether the design is affordable and timely.
Common trap
A contract cannot directly poll a sensor or web API. An oracle or gateway must submit signed data as transaction input.
1. Observe
Device or gateway measures an event and prepares call data.
2. Sign
A wallet signs the transaction so nodes can verify the sender.
3. Precheck
Nodes reject invalid signatures or senders that cannot pay fees.
4. Execute
Every validator runs the same contract code with the same inputs.
5. Commit
Successful execution writes state and emits logs in the receipt.
6. Finalize
Consensus or ordering makes the included transaction hard to reverse.
Execution Trace
Sensor escrow payment
A signed gateway reading releases escrow when an IoT condition is satisfied.
Transaction envelope
call submitReading(batchId, temp, signature)
State transition
Storage writes2 slots
Events kept2 logs
State deltacommitted
Receipt snapshot
Statussuccess
Gas used0
Block/orderpending
Executed
The transaction passes precheck, contract requirements pass, state writes commit, and a receipt records gas and logs.
Gas/resource budget0%
Gas modelEVM-style
Finality modelL2 rollup
Scenario
Network profile
Execution budget
Ledger timing
Execution conditions
Formula and units
This lab uses an approximate EVM-style gas model for teaching. Exact costs vary by chain, fork, opcode path, storage warm/cold access, and L2 pricing rules.