
Here, I give an overview of the contents of the course.
Here, I briefly explain my background.
Here, I explain how I intend to keep this course up to date.
Here, I give an overview of the other presentations in this chapter.
In this presentation, I explain basic blockchain concepts. I explain:
what a blockchain is
how blocks in a blockchain refer to each other
how a blockchain can be made immutable
the role of validators
In this presentation, I explain consensus mechanisms used by blockchains. I explain:
what a consensus mechanism is
Proof of Work (PoW)
Proof of Stake (PoS)
Proof of Authority (PoA)
I will compare PoW, PoS and PoA with each other
In this presentation, I explain how blockchains are used in practice. I explain:
how public and private blockchains are used
Bitcoin (the biggest public blockchain)
Ethereum (the second biggest public blockchain)
how Ethereum will evolve over time
how costs are calculated when you write to the Ethereum blockchain
In this presentation, I explain how you can invest on the Ethereum blockchain. I explain:
what fungible tokens are
what stablecoins are
how fungible tokens are traded in liquidity pools
what permanent or impermanent loss is in a liquidity pool
what non fungible tokens (NFTs) are
how you can invest in Ether and earn interest through a staking pool
In this presentation, I refer to a demo that illustrates how a blockchain works from a technical point of view.
The demo illustrates how Bitcoin works:
the demo illustrates a proof of work consensus mechanism
the demo illustrates how payment transactions are stored on the blockchain
Ethereum is a little bit different:
it uses a proof of stake consensus mechanism instead of proof of work
it stores programs instead of payment transactions
Here I refer to the Bitcoin White Paper.
Here I refer to the Ethereum White Paper, Yellow Paper and Beige Paper.
Here, I give an overview of the contents of this chapter.
Here I explain how to install npm, which is required for development
Here I show the website of Truffle Suite and Hardhat, 2 popular development environments for Solidity. We will be using Hardhat in this course.
Here I show how to set up Hardhat.
Summary of the Hardhat Setup video
Here I show where you could download the editor I will be using in this course: Visual Studio Code. This is for information only, you can use another editor!
Here we take a look at the sample project generated by Hardhat.
Here I compare the Visual Studio Code extension for Solidity made by Juan Blanco with the one made by the Nomic Foundation.
Here I show some webpages with information about the ERC-20 standard and the GitHub repository of OpenZeppelin, which contains a standard implementation of the ERC-20 standard. We will extend this standard implementation to create our own cryptocurrency in this chapter.
Here I show how we create our own cryptocurrency in Solidity.
Summary of the A First Contract video
Here I show how we can interact with code deployed on the Ethereum blockchain.
Here I show how we can test our first Solidity smart contract.
Summary of Testing Our First Contract video
Here I explain that the maximum size of a compiled smart contract deployed to the Ethereum blockchain is 24 kB and I explain how you can get around this limit.
Here I explain how you can test the size of your compiled smart contracts.
Summary of Test Contract Size Limit video
Here I gave an overview of what can be configured in Hardhat.
Here I show:
how we can enable the optimizer in the Hardhat config and
how we can add blocks to the Hardhat test blockchain in intervals. By default, blocks are written instantly to the Hardhat test blockchain each time you write to the blockchain. This is not how Ethereum works. In Ethereum, blocks are not added instantly, but in intervals.
Here I warn against some sloppy code I wrote in the previous video, which may work fine for tests that use Hardhat, but which is not guaranteed to work fine in production.
Here I show how you can log messages from your Solidity code to a console window.
Here I show how you can configure Hardhat to use web3.js.
Here I show how the ethers.js code of the contract size test is changed to web3.js code.
Here I show how the ethers.js code of the SeedToken unit tests is changed to web3.js code.
Here I give an overview of the main development tools that are available to develop for the Ethereum blockchain: Hardhat Runner, Hardhat Network, Hardhat VSCode, Truffle, Ganache, Truffle for VSCode, ethers.js and web3.js
Here, I give an overview of the contents of this chapter.
Here I show the website of MetaMask. We will be using MetaMask as the wallet in which we store our ethers and cryptocurrencies and from which we make payments if we want to execute a function that writes to the Ethereum blockchain.
Here I show how to install and set up MetaMask.
Here I explain in more detail what a secret recovery phrase is.
Here I show how you can set up a Hardhat test blockchain and how you can connect MetaMask to it.
Here I show how you can initialize a Hardhat test blockchain with JavaScript code.
Here I execute the scripts to initialize a Hardhat test blockchain.
Here we check with MetaMask that the Hardhat test blockchain is initialized with the script shown in the previous 2 videos.
Here I show an issue for sending cryptocurrencies on a Hardhat test blockchain with MetaMask: MetaMask does not have a valid gas estimate and therefore does not allow sending cryptocurrencies. I show how to fix this issue. This issue does not exist on the real Ethereum blockchain.
Here I show how you can send cryptocurrencies from a MetaMask wallet on a Hardhat test blockchain. You can send cryptocurrencies in the same way on the real Ethereum blockchain.
Here I show how you can clear the activity from a MetaMask account. If you reinitialize a test blockchain, you also have to reinitialize the MetaMask accounts used on that blockchain by clearing the activity of the accounts. It is not needed to clear the activity of an account on the real Ethereum blockchain, because the Ethereum blockchain is never reinitialized and keeps all history.
Here, I explain how you get ethers for the Ethereum mainnet and the Sepolia test blockchain. I also explain how to configure Ethereum blockchain networks in Hardhat and when to use them or when to use a local test blockchain.
Here I show how to configure Hardhat to interact with the Sepolia test blockchain. You configure Hardhat the same way to interact with the Ethereum blockchain.
Here I show how the Infura API key and the private keys of the accounts you add to a Hardhat configuration file look like and how you get these values. The private keys of the accounts have to be preceded by '0x' to denote that they are hexadecimal numbers.
Here I show how you can recover your MetaMask wallet.
Here, I give an overview of the contents of this chapter.
Here I give an introduction to the Remix integrated development environment that can be used as an alternative to Visual Studio Code and Hardhat.
Here I show how you can access the file system with the Remix web application.
Here I show how you can run Remix as a desktop application, which solves the issue of accessing the file system, but introduces another issue: the Remix desktop application does not have browser extensions such as MetaMask. I show how you can circumvent the absence of MetaMask with WalletConnect.
Here I explain that Visual Studio Code and Hardhat manage Solidity dependencies better than Remix.
Here I show a factory smart contract that will create instances of our cryptocurrency smart contract and I also show how you can deploy this smart contract to the blockchain through Remix.
Here I show how you can register an Ethereum Name and how you can link it to an Ethereum address, such as the address of a smart contract.
Here, I give an overview of the contents of this chapter.
Here I give an overview of the user interface that I will create in this chapter.
Here I present a history of web frameworks, to explain how later frameworks improve on earlier frameworks and to explain a high level structure of Angular, the framework I will be using to make a user interface. This presentation is purely informational. You will not learn here how to interact with the Ethereum blockchain from a user interface.
Here, I show how to set up Angular.
Here, I show how to set up Material Design for Angular.
Here I show how to create a toolbar that contains a button to connect with a MetaMask wallet and a button to connect to a wallet through WalletConnect. There is no integration with MetaMask or WalletConnect yet. This video only shows how to create UI components and integration with MetaMask or WalletConnect follows in later videos.
Here I show how to integrate ethers.js in Angular.
Here I explain the general approach we will follow to integrate MetaMask and WalletConnect with ethers.js.
Here I show how to connect to MetaMask with the MetaMask connection button in the connection bar.
Here I show how you can let your web application listen to changes in the selected account and the selected network in the wallet.
Here I show how you can propagate changes in the selected account and the selected network in the wallet to the user interface.
Here I show how to connect to WalletConnect with the WalletConnect connection button in the connection bar.
Here I show how to automatically connect/disconnect your application to/from WalletConnect. I also show that you should use the 'optionalChains' property and not the 'chains' property to configure with which blockchains you can connect to WalletConnect.
Here I show how to change the selected network and account of the wallet in the user interface if these are changed in the wallet to which your application is connected with WalletConnect. I also show that WalletConnect has some issues of correctly letting you know which is the selected network or account.
Here I show how you could use the default provider for reading data from the Ethereum blockchain or a test blockchain if no wallet is connected to the application. This provider cannot be used to call functions on smart contracts that write changes to the blockchain.
Here I show how we could interact with a smart contract that has been deployed on the blockchain. We retrieve the address of the smart contract through an Ethereum name.
Here I show how to exclude (RPC node) providers that are used to access the Ethereum blockchain from the default provider of ethers.js. You may not have an API key for some RPC nodes or accessing the blockchain through them may cause errors and therefore you may want to exclude them.
Here I show how to add a button to the web application that will be used to open a dialog window where we can enter information to create a new cryptocurrency. I will only show this button if the smart contract to create new cryptocurrencies can be found on the Ethereum name 'seed-token-factory.eth' and if the user is connected with a wallet to the application, so he can pay for creating a new cryptocurrency.
Here I show how to create a dialog window where you can enter a name and symbol for creating a new cryptocurrency.
Here, I am cleaning up the code we wrote before a little bit.
Here I show how you could show a progress spinner in the UI and prevent the user from starting other interactions with the blockchain for as long as a promise has not been resolved.
Here I show how we can create cryptocurrencies on the blockchain by calling the 'create' function on our deployed 'SeedTokenFactory' smart contract.
Here I show how to fix the spinner in the UI so that the spinner only disappears when we make a function call that writes to the blockchain after changes have been written to the blockchain.
Here I show how to create a table that will show the cryptocurrencies that have been created by our deployed SeedTokenFactory smart contract. In this video I am using mock data to populate the table, I will load the cryptocurrencies that have been created on the blockchain in a later video.
Here I show how to add a paginator for the table that shows the cryptocurrencies, how to allow the content of columns to be sorted and I am also adding an input field that will allow us to apply a filter on the cryptocurrencies.
I cut part of the original recording where I introduced a '.horizontal' CSS class. The style of this CSS class has no effect on the user interface and whenever you see this class appear in the videos, you can ignore it.
This is the first of three videos that show how to fetch the list of the cryptocurrencies created by the SeedTokenFactory smart contract from the blockchain. This video only shows changes to the UI, no code that uses the ethers.js library.
In this video:
- we add a Subject on the SeedTokenFactoryService that is notified whenever we change our selected SeedTokenFactory smart contract
- we subscribe to the Subject on the SeedTokenFactoryService in the TokenListComponent
- we retrieve the sort and paginator of the token list table in the TokenListComponent
- whenever we change our selected SeedTokenFactory smart contract, we reset the data source of the token list table to an empty data source and link the sort and paginator of the table to the data source.
This is the second of three videos that show how to fetch the list of the cryptocurrencies created by the SeedTokenFactory smart contract from the blockchain. This video shows how to retrieve the cryptocurrency smart contracts on the blockchain.
This is the third of three videos that show how to fetch the list of the cryptocurrencies created by the SeedTokenFactory smart contract from the blockchain. This video shows how to retrieve data from the cryptocurrency smart contracts on the blockchain.
Here I show how to add a filter to only show cryptocurrencies that contain a certain text in their data.
Here I show how to add a progress bar to the UI while the list of cryptocurrencies created by the SeedTokenFactory smart contract is loading.
Here I show how to create a dialog window where you can enter the amount of tokens you want to mint for a cryptocurrency of which you are the owner.
Here I show how the owner of a cryptocurrency can mint new tokens of the cryptocurrency by calling the 'mint' function on the cryptocurrency smart contract. I also show that the minted tokens can be sent to other accounts and that the user interface shows the token balance of each account.
Here I show how to update the UI after a user has minted new cryptocurrency tokens on the blockchain.
Here I show how to copy the address of a cryptocurrency to the clipboard when clicking a button.
Here I show how to create a dialog window where you can enter the address of the new owner of a cryptocurrency of which you are the current owner.
Here I show how the owner of a cryptocurrency can change the owner of the cryptocurrency by calling the 'changeOwner' function on the cryptocurrency smart contract.
Here I show how to update the UI after the owner of a cryptocurrency has been changed.
Here I show how to update the UI with the latest block number of the blockchain.
Here we create a card that contains input fields for a filter on SeedTokenCreation events emitted by our SeedTokenFactory smart contract that has been deployed to the blockchain.
Here I show how to filter events of a smart contract so that you only retain these events that have been written between a given 'from' and 'to' block.
Here I show how to filter events of a smart contract on values of the indexed parameters of the events.
Here I show how you could retrieve the value or the hash of the value of each parameter of an event that has been emitted by a smart contract.
You retrieve the value of a parameter if:
the parameter is non 'indexed'
the parameter is 'indexed' and has a value type, so its value is written within 32 bytes
You retrieve the hash of the value of a parameter if:
the parameter is 'indexed' and has a reference type, so its value cannot be written within 32 bytes
Here I show how to show the filtered 'SeedTokenCreation' events in a table.
Here, we clean up some code related to events. We remove the logging of events and we only show the 'Events' card in case we find a 'SeedTokenFactory' smart contract on the blockchain network we're on.
Here, I show how you could fix the issue where token lists may be fetched out of order when switching between blockchain networks.
Here, I show how to refresh the token list in the UI after creating a new token.
Here, I show an error that occurs if the user changes the blockchain network while the token list is still being loaded. I also show how to handle the error.
Here I show how to always update the progress bar when tokens are loaded.
Here I show how to immediately search for events whenever we interact with a new SeedTokenFactory smart contract.
In previous videos, I copy pasted the 'onCreateNewToken' function from the 'NewTokenDialogComponent' to the 'ChangeOwnerDialogComponent' and the 'MintDialogComponent'. Here, I rename this function in the 'ChangeOwnerDialogComponent' to 'onChangeOwner' and in the 'MintDialogComponent' to 'onMint'
Here, I give an overview of this and the following chapters that will explain Solidity in depth.
Here I shortly explain why they designed the new programming language Solidity to program on the Ethereum blockchain.
Here I refer to the main resources I used to learn Solidity myself.
Here I take a quick look at the grammar of the Solidity language and explain what the next chapters will be about.
Here I show a Visual Studio Code Extension with which you can inspect the grammar of Solidity.
Here, I give an overview of the contents of this chapter.
Here, I show the file in which the lexical elements of the Solidity language are defined.
Here, I explain white space in Solidity.
Here, I explain comments in Solidity.
Here, I explain the keywords in Solidity 0.8.26.
Here, I explain separators and operators in Solidity.
Here, I explain string literals in Solidity.
Here, I explain integer literals in Solidity.
Here, I explain identifiers in Solidity.
Here, I explain the lexical elements of Yul.
Here, I explain the grammar of the pragma directive in Solidity.
Here, I explain issues with the delete operator in Solidity.
Here, I explain issues with selfdestruct in Solidity.
Here, I give a summary of all lexical elements in Solidity.
Here, I give an overview of the contents of this chapter.
Here, I create an empty smart contract and show the warnings of a missing SPDX license and unspecified compiler version that will be explained in the following videos.
Here, I explain what an SPDX license is and how you could add one to your source files.
Here, I explain the pragma directive that is used to specify which versions of the Solidity compiler can be used to compile your source files.
Here, I explain the SMTChecker pragma directive, that it is deprecated and how the SMTChecker can be activated by changing a compiler setting instead. I also give an example of formal verification with the SMTChecker.
Here, I explain the ABI Coder pragma directive and that you will rarely use it in practice.
Here, I give an overview of the contents of this chapter.
Here, I explain the grammatical structure of a state variable declaration.
Here, I explain the grammatical structure of a constant variable declaration.
Here, I explain the Ether units and time units of Solidity.
Here, I explain globally available variables in Solidity.
Here, I give an introduction to types in Solidity.
Here, I explain the memory model in Solidity.
Here, I explain the 'int' type.
Here, I give an overview of elementary value types in Solidity.
Here, I explain signed integer types.
Here, I explain the 'uint' type.
Here, I explain unsigned integer types.
Here, I explain fixed bytes types.
Here, I explain the 'bool' type.
Here, I explain the 'address' (and 'address payable') type.
Here, I explain user-defined value types.
Here, I explain enum types.
Here, I explain the conversion between enums and integer types.
Here, I explain an empty smart contract and I show that the address of a smart contract is stored in variables of a contract type or an interface type.
Here, I illustrate how instances of 2 simple smart contracts are stored in state variables.
Here, I explain function types.
Here, I show a smart contract that illustrates internal function types.
Here, I show a smart contract that illustrates external function types.
Here, I quickly go over the official Solidity documentation about types.
Here, I explain the data location for reference types and show an example.
Here, I explain how string values are stored.
Here, I show that not all UTF-8 characters are stored in 1 byte.
Here, I explain how byte sequences are stored.
Here, I show the grammatical rule for structs.
Here, I explain how values are consecutively stored and packed on the blockchain.
Here, I show the official Solidity documentation for structs.
Here, I show a smart contract that illustrates structs.
Here, I go over the official Solidity documentation for arrays.
Here, I show a smart contract that illustrates static arrays.
Here, I show a smart contract that illustrates dynamic arrays.
Here, I show a smart contract that illustrates how arrays of a value type can be assigned directly from memory to storage. This is not possible for arrays of a reference type.
Here, I explain the first example in the official Solidity documentation about dangling references to storage array elements.
Here, I explain the example in the official Solidity documentation about dangling references to bytes in a bytes arrays in storage.
Here, I go over the official Solidity documentation for mapping types.
Here, I illustrate the possible key types for mappings.
Here, I illustrate the public getter function for mappings.
Here, I illustrate a mapping with a key of a value type.
Here, I illustrate a mapping with a key of a reference type.
Here, I illustrate a mapping of a mapping.
Here, I give a summary about types in Solidity.
This course aims to give an overview of what you need to know to program in Solidity.
The course consists of two parts:
In the first part, I explain best practices about developing Solidity code, without explaining the Solidity language much. The idea of the first part is to get you quickly started programming Solidity code.
In the second part, I explain the Solidity language in depth.
The first part of the course is ready and consists of the chapters 2 - 6. I have recorded the videos for the Sepolia testnet. Before the Sepolia testnet is end-of-life in Q4 2026, I will record the videos again for the following Ethereum testnet.
In chapter 2, I explain some basic theory for people who do not know what a blockchain is.
In chapter 3 - 5, I explain tools that are used to develop blockchain applications:
These chapters explain the development tools Hardhat and Remix.
You will see Solidity code for making your own cryptocurrency.
You will see the JavaScript libraries ethers.js and web3.js that are used to interact with the Ethereum blockchain.
You will see how you can connect a wallet with a blockchain application. I will show MetaMask, which is a popular wallet and also WalletConnect, which acts as a bridge to connect multiple kinds of wallets with an application. I will also show how you can transfer cryptocurrencies in MetaMask.
You will see how to set up a local test blockchain on your computer and also how to interact with an Ethereum testnet on the Internet.
You will see how you can register and configure an Ethereum Name.
In chapter 6, I show how you can make a user interface that interacts with the Ethereum blockchain through the ethers.js library, it shows
how to retrieve the address of a smart contract through an Ethereum Name
how to read data from the blockchain through a default provider
how to connect MetaMask or a wallet through WalletConnect with the user interface
how to execute functions that write data to the blockchain through a connected wallet
how to search for events emitted by a smart contract
I am still working on the second part of the course that consists of all the chapters beginning from chapter 7. I will add more chapters over time. At the time of writing I have the following chapters online:
Chapter 7 that explains what the following chapters of this part will be.
Chapter 8 that explains the lexical elements of Solidity.
Chapter 9 that explains an SPDX license and pragma directives
Chapter 10 that explains the types in Solidity and how data is stored on the blockchain
Chapter 11 that explains functions in Solidity (except inheritance)
Chapter 12 that explains inheritance in Solidity