Write and read Solidity
Begin with “Read your first Solidity contract” and work toward “Read a complete small contract”. Each available lesson includes a visual explanation and a quick knowledge check.
Read in order or choose a topic below. Completion marks stay in this browser. All 20 lessons in this track are available.
- 01
Read your first Solidity contract
Variables hold values. Functions describe the changes you allow.
7 MIN READ - 02
A Solidity source file explained
Separate metadata, compiler constraints and declarations before reading function logic.
4 MIN READ - 03
Pragma directives and compiler versions
A source constraint and the compiler actually used are different pieces of evidence.
4 MIN READ - 04
Contract declarations and constructors
Creation-time setup differs from later runtime calls.
4 MIN READ - 05
Boolean and integer types
Types define representable values and operations, not economic meaning.
4 MIN READ - 06
Signed versus unsigned integers
Negative values require a representation and range appropriate to the task.
4 MIN READ - 07
Addresses and payable addresses
An address representation and permission to use value-transfer syntax are different concepts.
4 MIN READ - 08
Fixed bytes versus dynamic bytes
A fixed-size byte value differs from a variable-length byte sequence.
4 MIN READ - 09
Strings and UTF-8
Byte length and visible character count can differ.
4 MIN READ - 10
State variables versus local variables
Persistence depends on where a value lives and how it is updated.
4 MIN READ - 11
Functions and visibility
Call reachability and business authorization are separate layers.
4 MIN READ - 12
View and pure functions
State-access restrictions differ from whether execution happens inside a paid transaction.
4 MIN READ - 13
Function parameters and return values
Inputs and outputs have typed ABI shapes with different call-data framing.
4 MIN READ - 14
Require, revert and assert
Failure mechanisms express different conditions and error shapes.
4 MIN READ - 15
Modifiers and access checks
Reusable wrappers can enforce conditions, but the full code path matters.
4 MIN READ - 16
Events in a contract
Logs help applications observe defined execution records.
4 MIN READ - 17
Custom errors in Solidity
Typed failures can encode useful context compactly.
4 MIN READ - 18
Interfaces and inheritance basics
Shared declarations and inherited implementation have different jobs.
4 MIN READ - 19
Receive and fallback functions
Special entry points handle certain calls outside ordinary named-function dispatch.
4 MIN READ - 20
Read a complete small contract
Trace inputs, permission, state and logs in one self-contained example.
4 MIN READ