Module 06 of 10

Smart Contracts with Solidity

Lessons

About This Module

Smart contracts are programs that live on the blockchain and run exactly as written. On Ethereum and other EVM chains, most of them are written in Solidity, a statically typed language that compiles down to the bytecode you met in the previous module. Once a contract is deployed, anyone can call its functions, and the rules in its code decide what happens.

You'll start with the building blocks of a contract: state variables, types, functions and visibility. Then you'll work with mappings, structs, modifiers and events, the tools that most real contracts use to store data, restrict access and tell the outside world what happened. The module finishes with the workflow for compiling, testing and deploying a contract with developer tools such as Foundry.

Once you can write and deploy a contract, you'll be ready for the next module, Wallets & Security, which covers how keys and accounts are protected, and why a small bug in a contract can be very costly.

Lessons

3 videos
01

Solidity Basics: Contract Structure, Types and Functions

A fast tour of the language: how a contract is laid out, how variables and types work, and how functions, visibility and constructors control what a contract can do.

02

Mappings, Structs, Modifiers and Events

How contracts store and organise data with mappings and structs, how modifiers restrict who can call a function, and how events log activity that front ends can listen for.

03

Compiling, Testing and Deploying Contracts

A hands-on workflow for building a project, writing tests, running a local test network, calling a deployed contract, and deploying to a live network.