Lesson 1Common contract ways: Ownable, Pausable, ReentrancyGuard, Pull over Push payments, Checks-Effects-Interactions wayLook into basic smart contract ways that make things safer and easier to keep. You will make Ownable, Pausable, and ReentrancyGuard, and use Pull over Push and Checks-Effects-Interactions in real money moving steps.
Making and using Ownable access controlPausable contracts and emergency stopsReentrancyGuard and reentrancy attack defensePull over Push payment flow designChecks-Effects-Interactions best practicesLesson 2Safe math and overflow protections in Solidity 0.8+: built-in checks vs. clear libraries (OpenZeppelin SafeMath history)Study how Solidity 0.8+ built-in overflow checks changed number safety. Compare old SafeMath-style libraries with new ways, and learn when unchecked blocks are safe for gas-saving number work.
Integer overflow and underflow basicsBuilt-in arithmetic checks in Solidity 0.8+Legacy SafeMath libraries and migrationUsing unchecked blocks safely for gasTesting arithmetic edge cases and limitsLesson 3State variables, storage vs memory, events, modifiers, and error handling (require, revert, assert, custom errors)Master how Solidity keeps and gets data using state variables, storage, memory, and calldata. Learn to send events, write reusable modifiers, and use require, revert, assert, and custom errors for clear error handling.
State variables and storage slotsStorage vs memory vs calldata usageDesigning and emitting useful eventsWriting reusable and safe modifiersRequire, revert, assert, and custom errorsLesson 4Function visibility and mutability: public, external, internal, private; view, pure, payableMake clear how function visibility and mutability affect safety, gas, and ease of use. Learn when to use public, external, internal, and private, and how view, pure, and payable change state and value moves.
Public vs external function trade-offsInternal and private for encapsulationView and pure for read-only logicPayable functions and ETH transfersDesigning clear and safe APIsLesson 5Designing deposit/withdraw accounting: mapping(address => uint256) balances, events for deposits/withdrawals, handling multiple tokens vs single-token vaultsLearn how to design safe deposit and withdrawal flows using mappings, events, and token interfaces. Compare single-token and multi-token vaults, and handle edge cases like failed transfers and unexpected token behavior.
Mapping balances and accounting invariantsEmitting events for deposits and withdrawalsSingle-token vault design and interfacesMulti-token vaults and token identifiersHandling failed transfers and token quirksLesson 6Testing smart contracts: unit testing concepts, fixtures, mocks for ERC-20 tokens, and test structure (arrange-act-assert)Learn how to test smart contracts with a planned way. You will write unit tests, use fixtures and mocks for ERC-20 tokens, follow arrange-act-assert, and cover edge cases, reverts, and event expectations.
Testing frameworks and project setupArrange-Act-Assert test structureUsing fixtures for repeatable stateMocking ERC-20 tokens and behaviorsTesting reverts, events, and edge casesLesson 7Solidity language basics: syntax, types, visibility, inheritance, and compiler pragmas (0.8.x specifics)Build a strong hold on Solidity syntax, types, and visibility rules. Explore inheritance, interfaces, compiler pragmas, and 0.8.x specifics such as custom errors and better type safety for modern smart contract work.
Source files, contracts, and basic syntaxValue types, reference types, and arraysFunction and state variable visibilityInheritance, interfaces, and abstract contractsCompiler pragmas and 0.8.x language changesLesson 8Contract upgradeability basics and trade-offs: proxy patterns (transparent, UUPS) and when to avoid upgrades for simple vaultsUnderstand when and how to upgrade contracts using proxy patterns. Compare transparent and UUPS proxies, storage layout constraints, and governance risks, and see why simple vaults may be safer without upgradeability.
Why upgrade contracts and when to avoid itTransparent proxy architecture and rolesUUPS proxy pattern and upgrade functionsStorage layout compatibility and pitfallsSecurity and governance risks of upgradesLesson 9Gas optimization basics: storage layout, packing, minimizing external calls, and using calldataLearn practical gas saving techniques for Solidity contracts. You will look at storage layout and packing, reduce costly external calls, use calldata, and measure gas use to guide safe small optimizations.
Understanding gas costs and refundsStorage layout and variable packingMinimizing external and cross-contract callsUsing calldata for cheap read-only inputsMeasuring and benchmarking gas usageLesson 10ERC-20 token standard deep dive: interfaces (IERC20), allowances, approve/transferFrom semantics, return value handling and non-standard tokensGo deep into the ERC-20 standard, focusing on the IERC20 interface, balances, allowances, and approve/transferFrom flows. Learn to handle return values, non-standard tokens, and safe interaction ways in production contracts.
IERC20 interface and required functionsBalances, totalSupply, and decimals handlingApprove and transferFrom allowance workflowDealing with non-standard ERC-20 tokensSafe ERC-20 interactions with helper libraries