Blob Transactions

An insightful overview to EIP-4844: Slashing L2 Fees with Blob Transactions - Discover how EIP-4844 (Proto-Danksharding) introduces blob transactions, a new mechanism to dramatically lower data costs for Layer 2 rollups on Ethereum. You'll learn about the temporary nature of blobs, KZG commitments for verification, and the dedicated blob fee market.

Solidity Developer

Advanced Foundry

1. Introduction
A comprehensive deep-dive to Building an Advanced Merkle Airdrop with Foundry and Digital Signatures - Construct an advanced token airdrop system using Foundry, leveraging Merkle proofs for efficient eligibility verification. Master digital signature implementation for authorized, potentially gasless, token claims by recipients. Duration: 4min
2. Project Setup
A foundational setup guide to Your First Merkle Airdrop Project in Foundry - Initialize your Foundry project, create `MerkleAirdrop.sol` and an ERC20 `BagelToken.sol` using OpenZeppelin, and configure remappings. You'll also grasp the inefficiencies of naive airdrop approaches and why Merkle trees offer a scalable, gas-friendly alternative. Duration: 8min
3. Merkle Proofs
An illuminating guide to Understanding Merkle Trees and Proofs in Web3 - Delve into Merkle tree structures, from leaf to root, and how Merkle proofs provide efficient, secure data verification. Explore key Web3 use cases like gas-friendly airdrops, state validation, and the utility of OpenZeppelin's `MerkleProof.sol`. Duration: 6min
4. Base Airdrop Contract
A practical guide to Building Your Merkle Airdrop: The Smart Contract Foundation - Create a robust Solidity foundation for your Merkle Airdrop by defining its constructor with essential `merkleRoot` and `airdropToken` parameters. Then, implement a secure `claim` function, complete with leaf calculation, `MerkleProof` validation, event emission, and `SafeERC20` token handling. Duration: 10min
5. Already Claimed Check
A focused tutorial to Securing Merkle Airdrops from Multiple Claims - Eliminate the repeat claim vulnerability in Merkle airdrops with a claim tracking mapping. Master the Checks-Effects-Interactions pattern for reentrancy-proof contracts and fair token distribution. Duration: 3min
6. Merkle Tree Script
An essential setup walkthrough to Preparing Your Foundry Environment for Merkle Airdrop Testing - Enhance `MerkleAirdrop.sol` with public getters, configure `MerkleAirdrop.t.sol` and `foundry.toml` for testing. You'll also script the generation of `input.json` (raw data) and `output.json` (Merkle root and proofs) using `murky` for comprehensive test data preparation. Duration: 17min
7. Writing The Tests
A detailed lesson to Writing Foundry Tests for Your Merkle Airdrop Contract - Explore writing effective Foundry tests for Merkle Airdrop contracts, focusing on verifying the token claim process for whitelisted users. You'll learn to set up test users, integrate their Merkle proofs, fund the airdrop, and simulate claims using Foundry cheatcodes. Duration: 10min
8. Quiz 14 Quiz
Questions: 8
9. Deployment Script
An essential tutorial to Crafting a Foundry Deployment Script for Your Merkle Airdrop - Build a robust Foundry deployment script to deploy your ERC20 token and Merkle Airdrop contracts. Then, integrate this script into your Foundry tests, leveraging conditional logic for multi-chain adaptability, including ZKsync. Duration: 7min
10. Adding Signature Verification
An advanced discussion on Optimizing Merkle Airdrop Claims: Authorization and Gas Fee Management - Unpack shortcomings in standard airdrop claims, including consent issues and gas fee responsibilities. Discover how digital signatures offer a superior method for explicit user authorization and enable "gasless" claims paid by a third party. Duration: 3min
11. Signature Standards
A clear explanation to Understanding Ethereum Signatures: EIP-191 & EIP-712 - Delve into how EIP-191 and EIP-712 create secure, human-readable message signing, preventing replay attacks on Ethereum. Discover signature verification methods, domain separation, and the use of OpenZeppelin's utilities. Duration: 12min
12. ECDSA Signatures
An essential guide to Decoding ECDSA: Signatures, Keys, and v, r, s Values - Gain a clear understanding of the Elliptic Curve Digital Signature Algorithm (ECDSA), how it establishes digital identity with key pairs, and ensures message authenticity. You'll learn the meaning of v, r, s signature components, the detailed processes for signing and verification, and vital security measures for `ecrecover` in smart contracts. Duration: 11min
13. Quiz 15 Quiz
Questions: 10
14. Transaction Types Introduction
An enlightening dive into zkSync's TxType 113 Signature - Discover `TxType: 113`, zkSync's unique EIP-712 style signature for transactions like contract deployments, offering enhanced user clarity. This lesson explains its structure, how it appears with tools like Remix, and its significance for zkSync's native account abstraction. Duration: 3min
15. Transaction Types
A clarifying overview to Decoding Ethereum & zkSync Transaction Types - Understand the distinct features and use cases of shared transaction types on Ethereum and zkSync, from Legacy (0x0) to EIP-1559 (0x02) and EIP-4844 (0x03) blobs. Learn how zkSync leverages its own Type 113 (0x71) for Account Abstraction and Paymasters, and Type 255 (0xff) for crucial L1-to-L2 communication. Duration: 6min
16. Blob Transactions
An insightful overview to EIP-4844: Slashing L2 Fees with Blob Transactions - Discover how EIP-4844 (Proto-Danksharding) introduces blob transactions, a new mechanism to dramatically lower data costs for Layer 2 rollups on Ethereum. You'll learn about the temporary nature of blobs, KZG commitments for verification, and the dedicated blob fee market. Duration: 11min
17. Understanding Type 113 Transactions
An insightful breakdown to Unpacking zkSync Type 113 Transactions: The Magic Behind EIP-712 Signatures in Remix - Explore how zkSync's Type 113 transactions enable native Account Abstraction, allowing EIP-712 signatures in Remix to initiate on-chain actions. You'll discover how every account becomes a programmable smart contract, offering enhanced flexibility and custom features. Duration: 2min
18. Implementing Signatures
An essential breakdown to EIP-712 Signatures for Gasless Merkle Airdrops - Discover how to implement EIP-712 signature verification in your `MerkleAirdrop.sol` for gasless user claims via third-party relayers. You'll modify the `claim` function, define typed data for signing, and use OpenZeppelin's cryptographic utilities for secure validation. Duration: 9min
19. Quiz 16 Quiz
Questions: 5
20. Modifying The Tests
A hands-on walkthrough to Testing Gas-Paid Airdrop Claims with EIP-712 Signatures - Master testing gas-paid airdrop claims in Foundry using EIP-712 signatures, enabling users to claim without paying gas. You'll modify tests and contracts, use `vm.sign` for signatures, and `vm.prank` for gas payer transactions. Duration: 4min
21. Test On zkSync (Optional)
A clear-cut guide to Bringing Your Foundry Project to zkSync - Install the zkSync-enabled Foundry (with `foundryup -z zksync`), compile your contracts for the zkSync Era (`forge build --zksync`), and effectively address compiler warnings. Execute your test suite via `forge test --zksync` to confirm seamless operation on zkSync. Duration: 2min
22. Create Claiming Script
A detailed walkthrough to Creating a Merkle Airdrop Claiming Script with Signature Authorization - Construct a Foundry script in Solidity that allows a third party to claim Merkle airdrops on behalf of users via signature authorization, supporting gasless claims. You'll learn to set up the interaction script, retrieve deployment data, and assemble claim parameters like Merkle proofs and signature components. Duration: 7min
23. Creating A Signature
A step-by-step walkthrough to Foundry & EIP-712: Signing for Secure Airdrops - Configure your Foundry and Anvil environment, create EIP-712 message hashes for Merkle Airdrop claims, and correctly sign them using `cast wallet sign --no-hash`. You'll understand signature components (v, r, s) and use them to authorize contract interactions. Duration: 5min
24. Splitting A Signature
A detailed guide to Splitting Concatenated Signatures in Solidity - Master parsing raw 65-byte ECDSA signatures into v, r, s using a Solidity function with inline assembly for low-level control. Explore `splitSignature` mechanics, memory layout, and critical 'v' value adjustments. Duration: 5min
25. Quiz 17 Quiz
Questions: 5
26. Executing The Anvil Script
An end-to-end demonstration to Claiming Tokens from a Merkle Airdrop with Foundry Scripts on Anvil - See how to execute a Foundry script on Anvil to claim Merkle Airdrop tokens, leveraging separate gas payers, cryptographic signatures, and Merkle proofs. This lesson also details debugging common script issues and verifying token transfers with `cast`. Duration: 3min
27. Deploy And Claim On zkSync Local Node (Optional)
A practical demonstration to Deploying and Interacting with a Merkle Airdrop on zkSync Local Node - See how to automate Merkle Airdrop deployment and token claims on a zkSync local node using a bash script. This lesson details using `forge` for deployments, `cast` for interactions and signing, and a `forge script` for signature splitting. Duration: 6min
28. Deploy And Claim On zkSync Sepolia (Optional)
A detailed command-line walkthrough to Manually Deploying Your zkSync Sepolia Merkle Airdrop with Foundry - Learn to manually deploy `BagelToken` and `MerkleAirdrop` contracts to zkSync Sepolia using `forge` and `cast` CLI tools. Master essential steps from message hash generation and signing with `cast wallet sign` to V,R,S signature splitting and executing token claims. Duration: 11min
29. Summary
A comprehensive overview to Mastering Advanced Smart Contract Techniques: Airdrops, Merkle Trees, and Signatures - Consolidate your grasp on building secure airdrop mechanisms, exploring how Merkle trees ensure gas efficiency and EIP-712 signatures boost authorization. Delve into the full development lifecycle, from Solidity with Foundry to multi-environment deployment. 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.

Ciara Nightingale

Ciara Nightingale

Developer relations at Cyfrin

Guest lecturers:

Juliette Chevalier

Juliette Chevalier

Lead Developer relations at Aragon

Vasiliy Gualoto

Vasiliy Gualoto

Developer relations at ThirdWeb

Nader Dabit

Nader Dabit

Director of developer relations at EigenLayer

Ally Haire

Ally Haire

Developer relations at Protocol Labs

Harrison

Harrison

Founder at GasliteGG

Vitto Rivabella

Vitto Rivabella

CPO at Cyfrin

Last updated on May 20, 2025