Next.js Setup

A step-by-step walkthrough to setting up your Next.js/React development environment. Bootstrap your Next.js application with React, TypeScript, and Tailwind using pnpm. Covers project creation, configuration choices, and simplifying the starter files.

1. Introduction
A detailed project overview to Building the TSender UI: A gas-optimized ERC20 airdrop frontend. Understand the functionality, tech stack (React, Next.js, Wagmi), and core web3 concepts involved in creating a UI for efficient ERC20 airdrops. Explore the setup for interacting with the gas-optimized TSender smart contract. Duration: 5min
2. Setup
An initial setup to project setup: Building the TSender airdrop UI. Begin building the TSender airdrop dApp by creating the project structure using Next.js and TypeScript. Understand the core `airdropERC20` function and outline the steps for UI development and deployment. Duration: 6min
3. Next.js Setup
A step-by-step walkthrough to setting up your Next.js/React development environment. Bootstrap your Next.js application with React, TypeScript, and Tailwind using pnpm. Covers project creation, configuration choices, and simplifying the starter files. Duration: 9min
4. Connecting A Wallet With Rainbowkit
A step-by-step walkthrough to upgrading your dApp's wallet connection. Integrate `wagmi` and `RainbowKit` into your Next.js dApp for a professional, persistent wallet connection experience. Learn installation, configuration using environment variables, provider setup, and `ConnectButton` implementation. Duration: 19min
5. Providers
An essential walkthrough to implementing global providers in your Next.js web3 app. Discover the provider pattern using Next.js App Router's `layout.tsx` and a dedicated `providers.tsx` file. Centralize Wagmi, React Query, and RainbowKit setup for maintainable web3 applications. Duration: 2min
6. Input Fields AI
An accelerated introduction to building reusable UI components with AI assistance in Next.js. Speed up UI creation by building modular Header and InputField components in Next.js, leveraging AI for code generation. Learn effective prompting and how to integrate components within the App Router. Duration: 17min
7. Usestate And Hooks
An essential walkthrough to managing component state with the `useState` hook in React. Master the `useState` hook, the core mechanism for adding dynamic data to React functional components. Explore its syntax, the importance of the setter function for reactivity, and how to manage multiple state variables. Duration: 7min
8. Read Contract Wagmi
A practical guide to reading smart contract data with Wagmi. Learn how to read ERC20 token allowance data from the blockchain using the `wagmi` library in a React application. Focus on using `readContract` from `@wagmi/core` to check permissions before initiating token transfers like an airdrop. Duration: 19min
9. React Utils AI
A practical guide to calculating total airdrop amount needed. Learn how to parse user input containing multiple token amounts (separated by commas or newlines) and sum them efficiently. Optimize this calculation within a React component using the `useMemo` hook and a reusable utility function. Duration: 8min
10. React Unit Tests
A practical guide to introduction to unit testing with Vitest. Learn the essentials of unit testing using Vitest for a TypeScript utility function. Covers setup, writing tests, configuration, and integration into a React component. Duration: 13min
11. Wagmi Send A Tx
An essential lesson to sending ERC20 Tokens with Wagmi: The approve and transfer flow. Explore how to manage the ERC20 approve/transfer flow within a React dApp using the Wagmi library. Learn to use `readContract`, `useWriteContract`, and `waitForTransactionReceipt` for reliable token transfers. Duration: 15min
12. Challenge
A hands-on guide to enhancing Your TSender App: Implementation Challenges - Tackle challenges to add loading indicators, persist form data using local storage, and display dynamic token information. Elevate your TSender app's usability by fetching token name/decimals and calculating totals on the fly. Duration: 5min
13. E2E Playwright
An essential primer to Introduction to end-to-end testing for web3 dApps with Playwright and Synpress. Discover the crucial role of E2E testing in web3 development due to the irreversible nature of blockchain transactions. Set up Playwright and Synpress to automate testing workflows and ensure your dApp functions correctly before deployment. Duration: 17min
14. E2E Synpress
An essential guide to end-to-end testing for web3 dApps with Playwright and Synpress. Discover how to use Playwright extended with Synpress to tackle the challenges of web3 E2E testing. Automate MetaMask interactions to reliably test your Dapp's user interface across different wallet connection states. Duration: 19min
15. Fleek UI
A step-by-step tutorial to deploying your Next.js app to Fleek via the UI. Configure your Next.js app for static site generation and deploy it effortlessly via the Fleek UI. Prepare your code on GitHub and navigate the Fleek deployment settings for a successful launch. Duration: 11min
16. Fleek CLI
A practical guide to deploy your static web app using the Fleek CLI. Learn to install and utilize the Fleek Command Line Interface for deploying static web apps, like Next.js sites, directly to IPFS. This tutorial covers project preparation, CLI commands for initialization and deployment, and verification steps. Duration: 7min
17. Challenges
A practical challenge to deploy your first site with Fleek. Take on the task of deploying your first website using the Fleek platform via CLI or web interface. Solidify your learning by getting a site live on IPFS and sharing your accomplishment. Duration: 1min
18. Review
An essential summary to review: Building the TSender frontend with Next.js and web3 tools. Recap the core technologies (Next.js, Wagmi) and processes used to build the TSender frontend. Reinforces key concepts like the ERC20 approve pattern, robust testing, and decentralized deployment. Duration: 6min
19. Review Pt.2
A detailed Review to TSender frontend development. Recap the creation of the TSender dApp's frontend using Next.js, React, Wagmi, and TypeScript. Solidify understanding of the ERC20 approve pattern, testing with Vitest/Playwright, deployment, and the critical need for AI code review. Duration: 2min

Course Overview

About the course

What you'll learn

How to build full-stack web3 applications on ZKsync

JavaScript/TypeScript: viem, wagmi, synpress

Nodejs and pnpm

rindexer

Circle Compliance Engine and USDC

Fleek site hosting and CLI

How to build a static and dynamic React/Next.js site

How to leverage AI to code faster and more securely

Course Description

Who is this course for?

  • Software engineers
  • Frontend developers
  • Backend developers
  • web3 developers
  • Smart contract security researchers

Potential Careers

Smart Contract Auditor

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

DeFi Developer

$75,000 - $200,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)

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.

Last updated on May 15, 2025