⟠ Blockchain · Hands-on

Solidity & Web3 — Hands-on Labs

Ship real smart contracts in a weekend. A bookmarkable Solidity reference plus two end-to-end labs that take you from MetaMask install to a verified Sepolia contract with a working DApp frontend. No prior Solidity required.

⏱ ~12 hours total 🎓 Beginner-friendly 🛠 Solidity 0.8 · ethers.js v6 · Sepolia 🆓 Free, no signup

What you'll learn

Four concrete skills, every one of them transferable to any production-grade Ethereum app you'll ever build.

📜

Write Solidity contracts

From pragma to immutable, custom errors, events, mappings, and the CEI pattern. Modern 0.8.x idioms only.

🦊

Deploy & verify on Sepolia

MetaMask, faucets, Remix IDE, then publish your verified source on Etherscan so anyone can audit it.

⚙️

Build DApp frontends

Vanilla HTML + ethers.js v6 — connect a wallet, read state, send transactions, subscribe to live events. No build tools, no React.

🔐

Trustless design

Use immutable and the absence of admin functions to make on-chain promises users don't need to take your word on.

The three pillars

Reference first if you want the vocabulary; jump straight to a lab if you'd rather learn by shipping. They're designed to flow either way.

📖
Learn

Solidity Quick Reference

A cheatsheet, not a tutorial. Pragma, types, visibility, state mutability, mappings, events, errors, modifiers, and the three ways to send ETH — with comparison tables you'll come back to every time you forget which one to use.

  • 14 sections, ~15 min scan
  • Bookmarkable per-section anchors
  • Copy-pasteable code blocks
Open the reference →
⚗️
Lab 1 · 2 × 4 h

Donation Pool DApp

A trustless fundraiser. The deployer locks in a beneficiary and a target at deploy time; anyone can donate; only the beneficiary can withdraw once the target is met. The deployer can never change their mind — enforced by immutable, not trust.

  • MetaMask · Sepolia · Etherscan · Remix tour
  • Solidity from scratch · payable functions · CEI
  • ethers.js v6 frontend with live event subscriptions
Open Lab 1 →
🎟️
Lab 2 · ~4 h

Event Ticketing Marketplace

A two-phase economy: primary sale (deployer receives ticket revenue) plus a peer-to-peer resale market where any owner can list their ticket at a custom price. Two ETH flows, structs, ownership transfers, and a richer DApp frontend with live marketplace updates.

  • Structs · ownership mappings · listing pattern
  • Two distinct ETH flows in one contract
  • Multi-action DApp UI (buy, list, cancel, resale)
Open Lab 2 →

Suggested path

There's no required order, but here's what tends to work best.

1

If you've never touched Solidity

Skim the Solidity Reference top-to-bottom (~15 min) just to see what's in there. You don't need to memorise anything — Lab 1 will reintroduce every keyword as it appears.

2

Do Lab 1 over two sessions

Two four-hour blocks, one for foundations + first contract, one for the Donation Pool DApp. After this you'll have a verified contract on Sepolia and a working frontend you can share with anyone.

3

Then Lab 2, in a single session

Lab 2 assumes Lab 1's setup is done — so it's shorter (~4 h). It introduces structs, the marketplace listing pattern, and a richer multi-action frontend.

4

Or skip around

The reference is keyed to each lab's sections — when a lab uses immutable or .call, click through to the reference's deeper treatment. Read sideways, build forward.

Prerequisites

🧠

Basic JavaScript & HTML

If you can read an async function and a <button> tag, you're set. No frameworks needed.

🌐

A modern browser

Chrome, Firefox, Brave, or Edge. Safari works but MetaMask support is less convenient.

📧

A throwaway email or GitHub

For one of the Sepolia faucets. We use only the public testnet, nothing costs real money.

🚫

No Solidity required

Every keyword is introduced as it appears. The reference is there for fast lookup whenever you need it.

Want the longer story?

These labs are condensed for hands-on builders. If you want the full pedagogical journey — Bitcoin foundations, decentralisation, proof of stake, enterprise blockchains, ERC-20 tokens, Layer 2 — the complete Blockchain course has 20 modules going from "why does Bitcoin exist?" to "deploying to Arbitrum". The labs here are Part 2 in concentrated form.

📚 Browse the full blockchain course →