
This course provides a solid foundation for aspiring Ethereum developers, teaching you how to write Solidity smart contracts and understand blockchain fundamentals. By the end, you'll build a complete decentralized application, mastering essential concepts like cryptography, digital signatures, and consensus, while gaining practical experience with Ethereum and Solidity.
This course assumes a basic understanding of programming concepts, such as loops, conditionals, and functions. While no prior knowledge of blockchains, Ethereum, or Solidity is required, familiarity with general coding principles is essential to get the most out of the material.
Meet your instructor, Petar Popović, a blockchain developer since 2017 with hands-on experience in NFT and DeFi projects, as well as founding startups. As a co-organizer of ETH Belgrade, Petar is deeply connected to the Ethereum and Web3 builder community. You can connect with him on Twitter at @0xdevelopera.
This self-paced course emphasizes learning by doing. You'll reinforce your skills by coding along, experimenting with additional features, and revisiting lessons as needed. Completing exercises and homework is key to solidifying your knowledge. Take time to explore external resources for a well-rounded understanding, and progress at your own pace, ensuring steady, stress-free learning.
By the end of this course, you’ll have a solid understanding of Ethereum's technology and the skills to write Solidity smart contracts. While it won’t make you an expert, it will provide the foundation needed to start your journey as a smart contract developer.
This module explores the foundational technologies that make blockchain possible, including cryptography, distributed systems, decentralization, and consensus mechanisms. You'll gain a clear understanding of what blockchain is, its components like blocks, and the various types of blockchains.
We will delve into cryptography, a fundamental pillar of blockchain technology. You'll explore its essential role in securing data and learn three key concepts—public key cryptography, hash functions, and digital signatures—crucial for understanding the inner workings of blockchains.
This lesson introduces symmetric and asymmetric cryptography, highlighting their differences and use cases. You'll learn how symmetric cryptography uses a single shared key for encryption and decryption, and how asymmetric cryptography solves its security challenges with public and private key pairs. By the end, you'll understand how these methods securely encrypt and share information.
This hands-on lesson demonstrates asymmetric cryptography in action. You'll generate SSH key pairs, encrypt and decrypt a message, and practice using public and private keys with OpenSSL. Through this practical exercise, you'll deepen your understanding of how asymmetric cryptography secures communication, preparing you to explore the next concept: digital signatures.
This section introduces digital signatures, a critical feature of blockchain security. You'll learn how signing with a private key ensures authenticity, allowing only the corresponding public key to decrypt the data. This concept forms the foundation for verifying transactions and data integrity in blockchain systems.
In this exercise, you'll practice creating and verifying digital signatures to understand how they ensure authenticity and integrity. By generating a new key pair, signing a file with a private key, and verifying it with the corresponding public key, you'll see how digital signatures confirm that data originates from the rightful sender. This foundational skill is critical for blockchain systems, where signatures authenticate transactions and data.
This lesson introduces cryptographic hash functions, a fundamental component of blockchain technology. You'll learn about their key properties: fixed-length output, determinism, one-way computation, and the avalanche effect. These features ensure security, consistency, and efficiency, making hash functions indispensable for data integrity in blockchain systems.
This practical exercise demonstrates the key properties of cryptographic hash functions using the KECCAK256 algorithm. You'll observe how these functions produce a fixed-length output regardless of input size, consistently generate the same output for identical inputs, and exhibit the avalanche effect, where minor changes in input lead to drastically different outputs. These principles are vital for ensuring security and integrity in blockchain development.
This section introduces decentralization, the second pillar of blockchain technology, and explains why blockchains like Ethereum and Bitcoin rely on decentralized distributed systems. You'll explore the drawbacks of centralized systems, such as single points of control and authority, highlighting why decentralization is essential for the transparency and resilience of blockchains.
Decentralized systems eliminate a central authority, giving all participants equal decision-making power. These systems are resilient to failures, censorship, and attacks, with no single point of failure. Decisions are made through consensus, where the majority agreement determines the outcome, ensuring fairness and reliability, much like a democratic process.
This lesson clarifies the distinction between distributed and decentralized systems. Distributed systems focus on sharing workload, while decentralization emphasizes shared authority and control. Blockchains combine both, with numerous nodes collaboratively maintaining the network, achieving consensus, and verifying transactions, ensuring both efficiency and fairness.
Consensus in blockchain refers to the process of reaching a general agreement among participants in a decentralized system. This requires a clearly defined set of rules, protocols, and incentives—collectively known as a consensus mechanism. Key components like Proof of Work (PoW) and Proof of Stake (PoS) play vital roles in these mechanisms, ensuring network agreement and security.
This lesson explains Proof of Work (PoW), the first consensus mechanism used in blockchain systems, introduced by Bitcoin to solve the Byzantine Generals Problem. You'll learn how nodes compete to find a correct nonce that meets specific hash requirements, a process called mining. While PoW ensures security and decentralization, it consumes significant computing power and electricity, leading to the development of alternative methods like Proof of Stake (PoS).
This lesson explains Proof of Stake (PoS), a consensus mechanism that significantly reduces energy consumption and enhances scalability. PoS eliminates the competitive mining process, relying on randomly selected validators who stake funds as collateral. Validators proposing malicious blocks risk losing their stake, while the network ensures security through validation and accountability.
This lesson explains what blockchains are and how they function as linked chains of data blocks. You’ll gain insights into their foundational features and mechanisms that ensure security, trust, and decentralization, setting the stage for a deeper understanding of blockchain technology.
This lesson focuses on Ethereum, exploring its key components and how they work. You'll learn about account types, crypto wallets, and address generation, along with an introduction to nodes, transactions, and gas fees. The lesson also covers Ethereum Improvement Proposals (EIPs) and ERC standards, starting with a brief history of Ethereum's creation.
This lesson provides a brief history of Bitcoin and its role in inspiring Ethereum. While Bitcoin pioneered decentralized, permissionless digital currency, Ethereum expanded on blockchain's potential by introducing a platform for decentralized applications (dApps). You'll learn how Vitalik Buterin's vision led to Ethereum's creation in 2015, making it the first decentralized "supercomputer" capable of executing code and powering dApps.
Ethereum accounts are divided into two types: externally owned accounts (EOAs) and smart contract accounts. EOAs are controlled by users through private keys and can initiate transactions, while smart contract accounts, controlled by code logic, respond to transactions but cannot initiate them. EOAs are free to create, whereas deploying a smart contract account incurs costs for computation and storage. Both account types can hold, send, and receive ETH and tokens and interact with other smart contracts.
This lesson explains how Ethereum accounts are created, highlighting the process of generating private keys, deriving public keys, and creating public addresses using cryptographic methods like the Elliptic Curve Digital Signature Algorithm and KECCAK256 hashing. You'll learn how these components work together to secure transactions and enable seamless interaction with the Ethereum blockchain.
This lesson introduces crypto wallets, focusing on MetaMask as a practical example. You'll learn how wallets manage Ethereum accounts, generate seed phrases, and derive private and public keys. Key concepts like seed phrase security and the distinction between wallets as management tools and Ethereum accounts as blockchain entities are clarified. By the end, you'll understand how wallets interact with Ethereum's ledger without storing funds themselves.
This lesson explains the difference between transactions and calls on the Ethereum network. Transactions are signed requests that modify the blockchain’s state and incur a fee, called gas, paid in ETH. Calls, on the other hand, are free requests used to read data without changing the network’s state, requiring minimal computational resources from a single node.
This lesson introduces block explorers, tools that track blockchain activity and provide detailed insights into transactions and accounts. Using Etherscan, you'll explore transaction components such as hashes, statuses, block confirmations, and timestamps.
This lesson explains nodes, the backbone of the Ethereum network, and their role in maintaining the blockchain. Nodes store blockchain data, validate transactions and blocks, and keep the network decentralized and secure. Running a node provides hands-on insight into Ethereum's core workings and enhances the network's resilience.
This lesson introduces the evolving nature of Ethereum as both a blockchain and a community-driven project. You'll explore how Ethereum Improvement Proposals (EIPs) and standards like ERCs enable upgrades, ensure interoperability, and maintain compatibility within the ecosystem. These elements are key to Ethereum’s growth, paving the way for its current functionality and future potential.
This lesson introduces smart contracts as the backbone of Ethereum, functioning as programs executed by the Ethereum Virtual Machine (EVM). You’ll learn that while Solidity is used to write smart contracts, they are deployed as bytecode for the EVM to interpret. Tools like Remix, an online IDE, simplify writing, testing, and deploying contracts. By exploring a basic contract, you’ll see how state variables and functions interact within the blockchain environment, setting the stage for hands-on Solidity development.
This lesson introduces the basics of writing Solidity smart contracts, starting with creating a minimal contract and progressing to a more functional example, the SimpleStorage contract. You’ll learn about essential components such as license identifiers, specifying Solidity versions, and defining contracts, which function similarly to classes in object-oriented programming. The lesson sets up the foundation for building your first functional contract, focusing on storing, retrieving, and updating a number as a practical exercise.
This lesson dives into Solidity's data types, focusing on primitive and reference types, and explores key concepts like visibility levels for state variables. You'll learn to declare and use data types such as booleans, integers, strings, addresses, arrays, enums, structs, and mappings. Additionally, the lesson covers state variable visibility—internal, public, and private—emphasizing their scope and implications for contracts. With this knowledge, you're prepared to tackle functions, loops, and conditionals in Solidity.
This lesson covers functions in Solidity, the building blocks for executing logic within smart contracts. You'll learn about visibility levels (internal, public, private, and external) and how functions can accept arguments, return values, and be classified based on state mutability.
This lesson introduces loops and conditionals in Solidity, showcasing their syntax and behavior within smart contracts.
This lesson introduces smart contract unit testing using Hardhat, Ethers.js, and the Chai assertion library. You’ll learn:
Why Testing Matters
Setting Up Tests
Writing Tests
Running Tests
Unit testing is a foundational practice for secure and reliable smart contract development.
This lesson focuses on how to prevent specific operations in a smart contract by handling errors effectively. You'll learn to check inputs and conditions before execution and stop unwanted actions when necessary.
In this lesson, you'll learn how to enforce specific rules for function access in a smart contract, ensuring only the owner can perform certain actions. We'll demonstrate how to use the msg.sender variable to identify who is interacting with the contract and validate their authority.
In this segment, we ensure that only the contract owner can perform specific privileged actions, like setting a special number. To achieve this, we introduced the constructor function, a unique feature in Solidity for initializing contracts.
In this lesson, we’ll explore how to make certain variables unchangeable after a contract is deployed. You’ll learn about the immutable keyword, which allows values to be assigned only during the contract's construction, ensuring they cannot be modified later. We’ll use it to secure our owner variable and make sure it stays permanent. Let’s dive in!
In this lesson, we’ll focus on optimizing and improving the functionality of our contract by introducing function modifiers. These handy tools allow us to reduce repetitive code and create reusable logic, like ensuring only the contract owner can call specific functions. You’ll see how to elevate hardcoded values into state variables, how to create and apply a modifier, and how modifiers streamline checks for ownership or other conditions. Let’s refine our contract together!
In this lesson, we’ll dive into one of Solidity's most powerful features: inheritance. By allowing contracts to share functionality, inheritance promotes code reuse, modularity, and maintainability. By the end, you’ll have a clear understanding of how to structure contracts efficiently and prepare for more advanced concepts like interfaces and abstract contracts.
In this lesson, we’ll explore important features that enhance the design and structure of smart contracts. These tools allow for more flexible and reusable code, making your projects easier to manage and expand.
Understanding how abstract contracts differ from interfaces is a key step in mastering Solidity. In this lecture, we’ll delve into the nuances of abstract contracts, their role in designing flexible base contracts, and how they enhance reusability in smart contract development.
Let’s dive into one of the most robust and widely adopted tools in smart contract development: OpenZeppelin. In this lesson, we’ll explore why their battle-tested libraries have become industry standards and how to seamlessly integrate them into your projects
Events are the bridge between smart contracts and the outside world. In this lesson, we’ll explore how to effectively use events in Solidity to log important changes and enable efficient communication with front-end applications. From declaring and indexing events to emitting them during state changes, you’ll learn the best practices to make your smart contracts transparent, traceable, and ready for integration.
In this lesson, we're diving into Foundry and setting up our very first project with it. From installation and project creation to using tools like Anvil and Cast, you'll experience the powerful workflow that Foundry offers. Together, we’ll explore how to deploy a contract, interact with it locally, and understand why robust testing is crucial for smart contract development.
In this lesson, you’ll learn to write structured, efficient tests directly in Solidity, ensuring your contracts are secure and reliable. Dive into core testing concepts, explore event validation, and discover how to handle Ether transactions seamlessly. Perfect for developers looking to build robust blockchain applications, this lesson provides practical, hands-on experience to elevate your smart contract skills.
Step into the world of smart contract development with this comprehensive course that takes you from foundational concepts to advanced techniques using Foundry, one of the most popular Ethereum development toolchains. Designed for both beginners and intermediate blockchain developers, this course focuses on creating secure and functional Solidity smart contracts while incorporating best practices for real-world deployment.
You'll start by mastering the basics of Solidity programming, exploring key features such as state variables, modifiers, events, and contract inheritance. Leveraging OpenZeppelin's industry-standard libraries, you'll implement secure and reusable design patterns to enhance your contracts. As the course progresses, you'll dive deep into Foundry's powerful tools, including Forge for compilation and testing, Cast for blockchain interaction, and Anvil for local Ethereum simulation. Learn to write robust test cases in Solidity, covering initialization, functionality, error handling, and transaction simulations.
With a hands-on approach, you'll build and thoroughly test a practical project that includes features such as ownership control, dynamic state management, and ETH transfer capabilities. By the end of this course, you'll have gained not only technical proficiency but also the confidence to develop, test, and deploy decentralized applications. Whether you're an aspiring blockchain developer or a seasoned programmer exploring Ethereum, this course equips you with essential skills for the rapidly evolving Web3 space.