Introduction to window.ethereum

A foundational explanation of How Websites Interact with MetaMask - Explore the crucial `window.ethereum` object enabling secure dApp communication. Learn how websites detect wallets, request connections, and initiate transactions without compromising private keys.


2024 Update, we migrated the codebase on the Repo from ethers Version 5 to version 6.

Last updated on July 10, 2024

Solidity Developer

Foundry Fundamentals

1. Introduction
A practical look at Understanding dApp Interactions with HTML Fund Me - Examine the behind-the-scenes flow when dApps connect to your wallet and interact with smart contracts. Understand this crucial interaction layer and learn why verifying transactions is vital for web3 security. Duration: 2min
2. How Metamask interacts with dapps
A practical guide to HTML Fund Me: Frontend Project Setup - Learn how to clone the project repository from GitHub and run the basic HTML/JS application locally using VS Code. Set up your development environment with the Live Server extension to view the initial user interface. Duration: 1min
3. Introduction to window.ethereum
A foundational explanation of How Websites Interact with MetaMask - Explore the crucial `window.ethereum` object enabling secure dApp communication. Learn how websites detect wallets, request connections, and initiate transactions without compromising private keys. Duration: 12min
4. Decoding Ethereum transactions
An essential guide to Understanding Function Selectors in Ethereum Transactions - Learn how the first 4 bytes of transaction hex data identify smart contract functions and why verifying this selector is crucial for security. Discover how selectors are generated and how to check them using `cast sig`. Duration: 7min
5. Section recap
A security-focused breakdown to Understanding Frontend and Wallet Interactions - Delve into the communication flow between websites, wallets (MetaMask), and smart contracts for executing transactions. Emphasizes the user's role in approving transactions via wallet prompts, ensuring private keys remain secure. Duration: 4min

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

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