Foundry Fundamentals

Intermediate
Foundry Fundamentals

Learn Foundry for Solidity and level up your Solidity developer skills. Discover advanced web3 development concepts and tools in the Foundry Fundamentals course. Learn Foundry Forge and Anvil, Chainlink Blockchain oracles, smart contract testing, and how to spin up local networks.


10hrs
125 lessons
3 projects

Solidity Developer

Foundry Fundamentals

1. Introduction - Foundry simple storage
An essential lesson on Moving from Remix to Foundry: Your First Steps with Professional Tooling - Understand why professional tooling like Foundry is necessary beyond Remix for complex projects. Prepare for the setup process and learn about VS Code and effective help-seeking strategies. Duration: 7min
2. Development environment setup (Mac, Linux)
A practical walkthrough of Initial Setup for macOS and Linux Users - Get your macOS or Linux development environment ready by installing VSCode and Git. Follow clear installation steps and learn to use the integrated terminal. Duration: 3min
3. Development environment setup (Windows)
A step-by-step tutorial for Setting Up Your Windows Development Environment with WSL - Install the Windows Subsystem for Linux (WSL) to create a powerful Unix-like environment on your PC. Follow clear instructions to set up WSL and install VS Code or VSCodium via multiple methods. Duration: 9min
4. Develop in cloud using Gitpod
An informative introduction to Using GitPod: An Optional Cloud Development Environment - Discover GitPod as an optional cloud IDE for this course, ideal if local setup proves difficult. Learn how to launch and use it via browser or VS Code, while understanding the crucial security warning: never use real private keys in this remote environment. Duration: 4min
5. Local Setup
A practical guide to VS Code Terminal Essentials: Clearing, Hiding, and Killing Sessions - Learn how to keep your VS Code terminal clean using `clear` and keyboard shortcuts. Understand the crucial difference between hiding the panel and killing the session to manage your workflow effectively. Duration: 1min
6. Foundry setup
A comprehensive guide to Installing the Foundry Development Toolkit - Learn how to install the essential Foundry suite (Forge, Cast, Anvil, Chisel) using `curl` and `foundryup` on macOS, Linux, or WSL. Verify your setup and troubleshoot common PATH environment variable issues. Duration: 6min
7. Setup your VSCode
A practical introduction to Mastering Your VSCode Environment: Workflows, Extensions, and Setup - Master core VSCode features including the terminal, file management, and key shortcuts. Enhance productivity with extensions like GitHub Copilot and prepare your project environment. Duration: 6min
8. Create a new Foundry project
A foundational guide to Setting Up Your Foundry Project - Initialize your first professional Web3 project using `forge init`, moving beyond Remix IDE. Understand the standard directory structure and add your own smart contract code. Duration: 7min
9. Foundry Setup (Windows/WSL)
An essential walkthrough of Setting Up Your Foundry Development Environment in WSL - Install the powerful Foundry framework on Windows via WSL and configure Git correctly. Set up SSH keys to securely interact with GitHub repositories for efficient smart contract development. Duration: 5min
10. VSCode Solidity setup
An essential guide to Why Formatting Matters in Solidity Development - Learn to install crucial VS Code extensions like the Nomic Foundation's Solidity tool and configure automatic code formatting on save for cleaner, more professional Solidity code. Duration: 4min
11. Compile a smart contract using Foundry
An essential introduction to Compiling Solidity Contracts with Foundry Forge - Master the `forge compile` command to turn human-readable Solidity into EVM bytecode. Explore the generated JSON artifacts, including ABI and bytecode, within your project's `out` directory. Duration: 1min
12. Deploy a smart contract locally using Anvil
A foundational guide to Deploying Smart Contracts to a Local Blockchain with Anvil - Learn to set up and run Anvil, Foundry's local development node, for faster contract iteration. Understand how to connect MetaMask using RPC URLs/Chain IDs and import pre-funded accounts. Duration: 9min
13. How to add a new network to Metamask
A practical guide to Connecting MetaMask to EVM-Compatible Networks - Learn the two methods for adding networks to MetaMask, including popular chains and manual setups. Understand the crucial role of RPC URLs and how they connect your wallet to blockchain nodes. Duration: 2min
14. Deploy a smart contract locally using Forge
A hands-on introduction to Deploying Your Smart Contract with `forge create` - Step through deploying a smart contract locally using Foundry's `forge create` command. Learn to connect to nodes like Anvil, handle private keys securely, and understand critical security practices. Duration: 4min
15. Important: private key safety pt.1
A critical security guide to Securing Your Assets: Never Expose Private Keys in Foundry - Understand the severe risks of exposing private keys directly in Foundry command-line arguments like `forge create`. Learn why shell history persistence is dangerous and why secure key handling habits are non-negotiable from day one. Duration: 3min
16. Deploy a smart contract locally using Anvil
An essential introduction to Deploying Smart Contracts with Foundry Solidity Scripting - Move beyond basic `forge create` and learn Foundry's powerful Solidity scripting for reliable deployments. Understand script setup, `vm` cheatcodes, and executing deployments via simulation or broadcasting. Duration: 10min
17. What is a transaction
A technical breakdown of Understanding Blockchain Transactions: The Data Structure - Examine the precise data packet that forms a blockchain transaction, detailing fields like `type`, `from`, `gas`, `value`, `data`, and `nonce`. Understand how this structure enables contract deployment and interactions, secured by cryptographic signing. Duration: 6min
18. Important: private key safety pt.2
A critical guide to Secure Private Key Management in Foundry: The .env Pitfall and Keystore Solutions - Understand the severe risks of storing private keys in plaintext `.env` files and why this is only acceptable for valueless testnets. Learn the secure standard of using encrypted Keystore files for managing real assets in Foundry development and deployment. Duration: 10min
19. Never Use A Env File
A crucial lesson to Stop Exposing Private Keys in Foundry - Understand the dangers of plaintext private keys in `.env` files and terminal history, and transition to Foundry's secure workflow using `cast wallet import` for encrypted key management. Learn to use the `--account` flag in scripts instead of exposing keys directly. Duration: 10min
20. Interact with a smart contract using the CLI
A hands-on tutorial for Interacting with Smart Contracts using Foundry Cast - Learn to wield Foundry's `cast` tool, using `cast send` to execute state-changing transactions and `cast call` for read-only queries. Practice interacting with a sample contract and decoding the results directly from your terminal. Duration: 4min
21. Deploying a smart contract on testnet (Sepolia)
A practical walkthrough of Deploying Your Smart Contract to a Public Testnet with Foundry - Move your Foundry project from local testing to a live Sepolia testnet environment. Set up Alchemy for RPC access, manage testnet private keys safely, and confirm successful deployment via Etherscan. Duration: 6min
22. Verify a smart contract on Etherscan
A practical walkthrough of Manually Verifying Your Smart Contract on Etherscan - Learn why making your deployed contract transparent via Etherscan verification builds trust. This lesson details the manual steps, crucial settings like compiler version/optimization, and the benefits like readable code and interaction tabs. Duration: 1min
23. Cleaning Up the Project
An essential guide to Enhancing Project Quality with Formatting and Documentation - Learn how `forge fmt` enforces consistent Solidity code style for better readability and collaboration. Master creating informative `README.md` files using Markdown to clearly document your Foundry projects. Duration: 3min
24. Foundry Zksync
An essential introduction to Installing Foundry for zkSync Development - Understand the need for `foundry-zksync`, a dedicated Foundry version for zkSync's distinct execution environment. This guide covers installation, switching between standard and zkSync versions, and preparing for zkSync contract compilation. Duration: 7min
25. Compiling Foundry Zksync
An essential guide to Compiling Smart Contracts for zkSync Era with `foundry-zksync` - Discover how to use the `foundry-zksync` fork and the `--zksync` flag to compile Solidity for zkSync's distinct VM. Understand the difference between the `out` and `zkout` artifact directories for successful deployment. Duration: 2min
26. Anvil ZkSync Updated
An essential update to Using anvil-zkSync for Local zkSync Testing - Discover `anvil-zkSync`, the streamlined tool for running local zkSync nodes directly within the Foundry framework. This lesson replaces older, complex methods, simplifying your setup and ensuring more accurate zkSync contract testing. Duration: 3min
27. Zksync Local Node
A comprehensive walkthrough of Foundry Deployments on zkSync - Discover how to use `forge create` with `--zksync` and `--legacy` flags for live zkSync deployments. Optionally, set up a local zkSync node for testing and understand why `forge script` is currently discouraged. Duration: 10min
28. Zksync Local Deploy
A focused tutorial on Deploying a Smart Contract to a Local zkSync Docker Node using Foundry - Get hands-on experience deploying to a local zkSync Era node via Docker using the `foundry-zksync` fork. Master the `forge create` command nuances for zkSync, including path specification and essential flags. Duration: 3min
29. Tx Types
A foundational primer to Understanding Transaction Types in EVM and zkSync - Learn that EVM chains use multiple transaction formats (Legacy, EIP-1559) and how zkSync leverages EIP-712 for advanced capabilities. Explore how to observe these types using Foundry's broadcast logs and understand their basic purpose. Duration: 9min
30. Why L2
A practical analysis of Why Deploy to Layer 2? A Look at Ethereum Costs - Quantify the real cost of deploying smart contracts to Ethereum L1 versus Layer 2 rollups like zkSync. Learn how to estimate L1 fees and understand the significant cost advantages driving L2 adoption. Duration: 6min
31. Introduction to Alchemy
A practical guide to Monitoring Transactions with Alchemy - Use Alchemy's dashboard to debug failed RPC calls and monitor application health effectively. See how the Mempool Watcher provides crucial visibility into transaction status before on-chain confirmation. Duration: 11min
32. Wrap up, congratulations!
A core concepts review to Foundry Simple Storage Project Recap: Key Concepts and Tools - Revisit the fundamentals of Foundry development covered in the Simple Storage project. Master `forge`, `cast`, `anvil`, deployment scripts, RPC connections, and secure configuration basics. Duration: 3min

Course Overview

About the course

What you'll learn

Foundryup, Foundry Forge, and Anvil

Blockchain Oracles

How to create local Blockchain testnets

How to verify a smart contract

How to write and run smart contract tests

Course Description

Who is this course for?

  • Software engineers
  • Web3 developers
  • Blockchain security researchers

Potential Careers

Security researcher

$49,999 - $120,000 (avg. salary)

Smart Contract Engineer

$100,000 - $150,000 (avg. salary)

Web3 developer

$60,000 - $150,000 (avg. salary)

Web3 Developer Relations

$85,000 - $125,000 (avg. salary)

Smart Contract Auditor

$100,000 - $200,000 (avg. salary)

Meet your instructors

Patrick Collins

Patrick Collins

Founder at Cyfrin

Web3 engineer, educator, and Cyfrin co-founder. Patrick's smart contract development and security courses have helped hundreds of thousands of engineers kickstarting their careers into web3.

Guest lecturers:

Richard Gottleber

Richard Gottleber

Developer relations at Chainlink

Vasiliy Gualoto

Vasiliy Gualoto

Developer relations at ThirdWeb

Last updated on April 5, 2025

Learning path

Solidity Developer

View all courses

Blockchain Basics

Beginner
Blockchain Basics

Introductory blockchain developer course. Learn how blockchains and smart contracts work, and how to sign your first transaction. Whether you’re new or are a seasoned developer, there’s something here for you.

3hrs
26 lessons
1 project

Solidity Smart Contract Development

Beginner
Solidity Smart Contract Development

Start here if you’re new to writing smart contracts! Learn Solidity programming language and smart contract development from industry-leading experts. Kickstart your career as a web3 developer.

5hrs
65 lessons
3 projects

Foundry Fundamentals

Intermediate
Foundry Fundamentals

Learn Foundry for Solidity and level up your Solidity developer skills. Discover advanced web3 development concepts and tools in the Foundry Fundamentals course. Learn Foundry Forge and Anvil, Chainlink Blockchain oracles, smart contract testing, and how to spin up local networks.

10hrs
125 lessons
3 projects

Advanced Foundry

Intermediate
Advanced Foundry

Learn advanced Foundry for Solidity smart contract development. Master web3 development techniques to write, deploy, test, optimize, and interact with your smart contracts using industry-standard tools. Lessons taught by the top smart contracts engineers in web3.

13hrs
186 lessons
4 projects

Smart Contract Security

Advanced
Smart Contract Security

Start your career as a smart contract security researcher! Learn smart contract auditing and the best practices for writing secure and optimized protocols. Explore fuzzing, invariant testing, and formal verification to identify bugs and protect web3 protocols.

24hrs
272 lessons
6 projects

Assembly and Formal Verification

Advanced
Assembly and Formal Verification

Learn exactly how the solidity compiler and opcodes work. Write contracts using Assembly and Yul, then learn how to write formal verification tests to guarantee your invariants hold.

11hrs
152 lessons
3 projects

Smart Contract DevOps

Advanced
Smart Contract DevOps

Following web3 DevOps guidelines and keeping an eye on smart contracts after they're live is key to making protocols and their users, safer. This course teaches you the best practices when dealing with web3 wallets and post-deployment security, teaching you how to keep smart contracts under control, even after they've been launched.

2hrs
25 lessons
1 project

Uniswap V3

Advanced
Uniswap V3

Learn Uniswap V3 smart contract development and level up your expertise as a DeFi developer. Updraft’s Uniswap V3 course will teach you Uniswap V3 math, concentrated liquidity, swapping, contract architecture, fees, flash loans, and more. Grow your web3 career and build with Uniswap V3.

7hrs
96 lessons
0 projects

Curve Stableswap

Advanced
Curve Stableswap

Learn Curve Stableswap and take your smart contract developer and security researcher skills to the next level. Curve Stableswap is an advanced, DeFi developer specialization course taught by top smart contract engineer, ProgrammerSmart. It covers how Curve finance works, AMM and math, curves, liquidity pools, swaps, and more.

2hrs
48 lessons
0 projects

Curve Cryptoswap

Advanced
Curve Cryptoswap

Learn Curve Cryptoswap and take the next step to become an expert smart contract and DeFi developer. Curve Cryptoswap is an advanced DeFi developer course that will teach you Curve Cryptoswap’s math, liquidity pools, swaps, price-repegging, and more.

4hrs
66 lessons
0 projects

Uniswap V2

Advanced
Uniswap V2

Learn Uniswap v2 and level up your skills as a smart contract developer and security researcher with this advanced, deep dive specialization course on the Uniswap v2 contracts, router, Factory, liquidity pools, and much. Lessons taught by top smart contracts engineer, ProgrammerSmart.

6hrs
75 lessons
0 projects

Rocket Pool rETH Integration

Advanced
Rocket Pool rETH Integration

Learn Rocket Pool rETH Integration and how to build decentralized finance (DeFi) protocols that incorporate it. Level up your expertise as a DeFi developer! This course will guide you through essential concepts with hands-on exercises and real-world applications of rETH in the DeFi landscape. It covers: an introduction to rETH, technical insights into how it works, and how it fits into Rocket Pool’s protocol contract.

3hrs
95 lessons
4 projects

Testimonials

Students Reviews

Read what our students have to say about this course.

Chainlink

Chainlink

Chainlink

Gustavo Gonzalez

Gustavo Gonzalez

Solutions Engineer at OpenZeppelin

Francesco Andreoli

Francesco Andreoli

Lead Devrel at Metamask

Albert Hu

Albert Hu

DeForm Founding Engineer

Radek

Radek

Senior Developer Advocate at Ceramic

Boidushya

Boidushya

WalletConnect

Idris

Idris

Developer Relations Engineer at Axelar

Cyfrin
Updraft
CodeHawks
Solodit
Resources