Merkle Proofs

What are Merkle trees, proofs and roots?

Solidity Developer

Advanced Foundry

1. Introduction
An introduction to the Merkle Airdrop and Signatures project including a code walkthrough. What is an airdrop? Duration: 4min
2. Project Setup
Setting up the Foundry project and creating an ERC20 token to airdrop. Duration: 8min
3. Merkle Proofs
What are Merkle trees, proofs and roots? Duration: 6min
4. Base Airdrop Contract
Writing the base MerkleAirdrop.sol smart contract implementing merkle trees to determine if an address is able to claim. Duration: 10min
5. Already Claimed Check
Add a check to see if an address has already claimed. Duration: 3min
6. Merkle Tree Script
Write scripts to create the Merkle tree, proofs and root Duration: 17min
7. Writing The Tests
Writing the test for the claim() function! Duration: 10min
8. Deployment Script
Creating a deployment script to deploy both the token contract and the airdrop contract. Duration: 7min
9. Adding Signature Verification
Add signature verification to the airdrop contract to stop addresses receiving airdrops they do not wish when someone else is paying the gas. Duration: 3min
10. Signature Standards
Introducing and explaining the signature standards EIP-191 and EIP-712. How to add signature verification to your project. Duration: 12min
11. ECDSA Signatures
Everything you need to know to understand ECDSA signature creation, verification and how private and public keys are created. Duration: 11min
12. Transaction Types Introduction
Recap the "type 113" transactions from Remix on zkSync - what does it mean? Duration: 3min
13. Transaction Types
The different types of transactions on Ethereum and zkSync. Duration: 6min
14. Blob Transactions
What are type 3 blob transactions? What is proto-danksharding and EIP-4844? Everything you need to know! Duration: 11min
15. Understanding Type 113 Transactions
Finally, we will go through type 113 transactions on zkSync Duration: 2min
16. Implementing Signatures
Implementing signatures verification into MerkleAirdrop.sol Duration: 9min
17. Modifying The Tests
Modifying the tests to accommodate signatures. How to use Forge cheats to create signatures! Duration: 4min
18. Test On zkSync (Optional)
Running the tests on zkSync. Duration: 2min
19. Create Claiming Script
Creating Interact.s.sol to claim the airdrop on Ethereum (or Anvil). Duration: 7min
20. Creating A Signature
How to create a signature from the command line using Cast! Duration: 5min
21. Splitting A Signature
How to split a signature using a script in Foundry. Duration: 5min
22. Executing The Anvil Script
Claiming an airdrop on Anvil local node! Duration: 3min
23. Deploy And Claim On zkSync Local Node (Optional)
Deploy and claim an airdrop on a zkSync Docker local node! Duration: 6min
24. Deploy And Claim On zkSync Sepolia (Optional)
Deploy and claim an airdrop on a zkSync Sepolia! Duration: 11min
25. Summary
A summary of everything you have learned in this section! Duration: 2min

Course Overview

About the course

What you'll learn

Advanced smart contract development

How to develop a stablecoin

How to develop a DeFi protocol

How to develop a DAO

Advanced smart contracts testing

Fuzz testing

Manual verification

Course Description

Who is this course for?

  • Engineers
  • Smart Contract Security researchers

Potential Careers

Web3 Developer Relations

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

Web3 developer

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

Smart Contract Engineer

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

Smart Contract Auditor

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

Security researcher

$49,999 - $120,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:

Juliette Chevalier

Juliette Chevalier

Lead Developer relations at Aragon

Ciara Nightingale

Ciara Nightingale

Developer relations at Thirdweb

Vasiliy Gualoto

Vasiliy Gualoto

Developer relations at Cyfrin

Nader Dabit

Nader Dabit

Director of developer relations at Avara

Ally Haire

Ally Haire

Developer relations at Protocol Labs

Harrison

Harrison

Founder at GasliteGG

Vitto Rivabella

Vitto Rivabella

Lead Developer relations at Cyfrin

Last updated on September 2, 2024

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