Types and Variables
- Value types. Solidity’s value types are exact: uint256, address, bool, bytes32: sizes in the name.
- address. The address type names an account: payable addresses can receive the native currency.
- Checked arithmetic. Modern Solidity arithmetic reverts on overflow: the silent wrap that drained contracts is gone by default.
Functions
- Function anatomy. A function declares parameters, visibility, mutability and returns: every keyword a security decision.
- view and pure. view reads state, pure touches none: mutability declared and compiler-checked.
- payable. A payable function may receive value: money enters only through doors marked for it.
Contract Structure
- The contract block. A contract bundles state variables, functions, events and modifiers: the deployable unit.
- Constructor. The constructor runs once at deployment: initial owners and parameters set forever.
- SPDX and pragma. Files declare a licence and a compiler pragma: the version pin every audit checks first.
Before and after this level
- Before: Start Here: Code That Controls Assets: Smart Contracts and EVM, Blockchain Execution vs Normal Programs.
- Next: Level 2: State & Data Locations: Contract Storage, Memory and Calldata, State Mutation.
In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See Checkpoints and flashcards.
Frequently asked questions
What does Solidity Level 1: Solidity Foundations cover?
Types and Variables, Functions, Contract Structure: 3 lessons and 9 ideas.
What should I know before this level?
The level before it, Start Here: Code That Controls Assets, which covers Smart Contracts and EVM, Blockchain Execution vs Normal Programs.