The Essential Guide to Web3

Book description

Get up and running with blockchain, smart contracts, NFTs, DAOs, and decentralization in no time with the help of this comprehensive guide

Key Features

  • Get to grips with Web3, NFTs, DeFi, and smart contract development
  • Create fungible and non-fungible tokens, explore DAOs, and more
  • Build powerful apps using Ethereum to secure transactions and create smart contracts
  • Purchase of the print or Kindle book includes a free PDF eBook

Book Description

Web3, the new blockchain-based web, is often hailed as the future of the internet. Driven by technologies such as cryptocurrencies, NFTs, DAOs, decentralized finance, and more, Web3’s aim is to give individuals more control over the web communities they belong to. Whether you’re a beginner or an experienced developer, this book will help you master the intricacies of Web3 and its revolutionary technologies.

Beginning with a concise introduction to blockchain and the Ethereum ecosystem, this book quickly immerses you in real-world blockchain applications. You’ll work on carefully crafted hands-on exercises that are designed for beginners as well as users with prior exposure. The chapters show you how to build and deploy smart contracts, while mastering security controls and discovering best practices for writing secure code. As you progress, you’ll explore tokenization and gain proficiency in minting both fungible and non-fungible tokens (NFTs) with the help of step-by-step instructions. The concluding chapters cover advanced topics, including oracles, Layer 2 (L2) networks, rollups, zero knowledge proofs, and decentralized autonomous organizations (DAOs).

By the end of this Web3 book, you’ll be well-versed in the Web3 ecosystem and have the skills to build powerful and secure decentralized applications.

What you will learn

  • Get an in-depth understanding of Ethereum's ecosystem, its status, and key EIPs and ERCs
  • Gain practical skills using non-custodial wallets such as MetaMask for blockchain transactions
  • Write, debug, and deploy smart contracts on test networks
  • Discover Web3 dev tools and set up a local environment
  • Get to grips with tokenomics and create ERC20, ERC721, and ERC1155 tokens
  • Explore decentralized storage with IPFS and integrate it into your Web3 projects
  • Expand your NFT strategy with APIs and SDKs to lead in the NFT space

Who this book is for

This book is for blockchain developers and blockchain enthusiasts who want to build powerful and secure decentralized applications. Familiarity with the basics of blockchain, along with knowledge of how they function, is necessary to grasp the topics discussed in this book.

Table of contents

  1. The Essential Guide to Web3
  2. Contributors
  3. About the author
  4. Acknowledgments
  5. About the reviewers
  6. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
    4. Download the example code files
    5. Conventions used
    6. Get in touch
    7. Share Your Thoughts
    8. Download a free PDF copy of this book
  7. Part 1 – Introduction to Web3
  8. Chapter 1: Fundamentals of Blockchain and Web3
    1. Getting started with blockchain
    2. Understanding the role of cryptography in blockchain
    3. The basic components in a blockchain
    4. Types of blockchain
      1. Public blockchains
      2. Private blockchains
      3. Consortium blockchains
      4. Hybrid blockchains
    5. The anatomy of a blockchain transaction
    6. Getting started with Web3
    7. The fundamentals of Web3
    8. Summary
  9. Chapter 2: Getting Started With Ethereum
    1. Getting started with Ethereum
    2. Ethereum ecosystems and essentials
      1. The Ethereum virtual machine
      2. ETH
      3. Ethereum accounts
      4. Gas and fee structure
      5. Smart contracts
      6. Ethereum transactions
      7. Consensus mechanism
      8. Ethereum testnets and mainnet
      9. Ethereum clients
      10. Ethereum Improvement Proposals
      11. Why EIPs are important
      12. EIP workflow
      13. Contents of a successful EIP
      14. Popular EIPs
      15. Ethereum Request for Comments
      16. Popular ERCs
    3. Creating and managing your keys
      1. Creating public keys
    4. MetaMask: a self-custody wallet
    5. The state of Ethereum in 2023
      1. 2013: Milestones, forks, and updates
      2. 2014
      3. 2015
      4. 2016
      5. 2017
      6. 2019
      7. 2020
      8. 2021
      9. 2022: the Paris upgrade (the Merge)
    6. Summary
  10. Chapter 3: Your First Ethereum Transaction
    1. Setting up Hardhat
      1. Installing Hardhat
    2. Preparing your MetaMask wallet
    3. Initiating a transfer transaction
    4. Viewing and verifying results
    5. Summary
  11. Part 2 – All about Smart Contracts
  12. Chapter 4: Introduction to Smart Contracts
    1. Understanding smart contracts
      1. Solidity variables and data types
      2. Solidity functions
      3. Solidity storage and memory
      4. Solidity contract structure
      5. A smart contract ABI
      6. Solidity events
      7. Solidity logs
      8. Factory contracts
    2. Understanding a Hello World smart contract
    3. Getting started with Hardhat and smart contracts
    4. Summary
  13. Chapter 5: Creating and Deploying Your First Smart Contract
    1. Setting things up to write a smart contract
      1. Installing Visual Studio Code
      2. Visual Studio Code extensions
      3. The Visual Studio Code CLI
    2. Writing your first Solidity smart contract
    3. Compiling and creating ABIs from smart contracts
    4. Deploying and verifying smart contracts
    5. Debugging smart contracts
    6. Summary
  14. Chapter 6: Smart Contract Security and Access Controls
    1. Understanding smart contract security
      1. Upgradability
      2. Integer overflow
      3. tx.origin
      4. Gas limits and DoS attacks
    2. Understanding smart contract access controls
    3. Understanding smart contract security tooling and audits
    4. Summary
  15. Part 3 – Writing Your DApps for Web3
  16. Chapter 7: Developer Tools and Libraries for Web3 Development
    1. Understanding the Web3 development stack
      1. Frontend stack
      2. Middle tier stack
      3. Backend stack
      4. Blockchain API stack
      5. Blockchain stack
    2. Understanding Ethereum clients
    3. Introducing Infura, a node-as-a-service
      1. Running an Ethereum node
      2. Upgrading an Ethereum node
      3. Infura 101
    4. Introducing IPFS
      1. Key problems addressed by IPFS
      2. Understanding IPFS use cases
      3. IPFS life cycle
      4. How does IPFS work?
    5. Summary
  17. Chapter 8: Writing and Testing Your First dApp on Web3
    1. Technical requirements
      1. Configuring and setting up an environment
    2. Compiling, deploying, and testing the smart contracts
    3. Running the Web3 dApp
    4. Summary
  18. Part 4 – Fungible Tokens
  19. Chapter 9: Introduction to Tokenization
    1. What is tokenomics?
      1. Token supply
      2. Token distribution
      3. Token utility
      4. Token incentive mechanisms
      5. Token governance
    2. Common token standards in Ethereum
      1. ERC-20
      2. ERC-721
      3. ERC-1155
      4. ERC-777
      5. ERC-223
    3. Tokenization
      1. Tokenizing real-world assets – examples
      2. Creating new business models through tokenization
    4. Summary
  20. Chapter 10: Creating Your First Token
    1. Technical requirements
    2. Writing your first ERC-20 token smart contract
    3. Deploying and testing the ERC-20 token smart contract
      1. Deploying into the Ethereum Sepolia testnet
    4. Summary
  21. Part 5 – Non-Fungible Tokens
  22. Chapter 11: Non-Fungible Token Standards
    1. Technical requirements
    2. Introduction to NFT standards
    3. Understanding NFT standard ERC-721
    4. Understanding NFT standard ERC-1155
    5. Understanding NFT standard ERC-998
      1. A quick comparison of ERC-721, ERC-1155, and ERC-998
      2. Solbound tokens and why they are popular in the NFT industry
      3. Rentable NFTs
      4. The ECR-721X token standard
      5. Gas price and NFTs
    6. Summary
  23. Chapter 12: Creating Your First Non-Fungible Token
    1. Technical requirements
      1. Configuring and setting up the environment
    2. Launching an NFT project
    3. Deploying your ERC-721 smart contract to Ethereum TestNet
    4. Minting your NFTs
    5. Adding your NFTs to your MetaMask wallet
    6. Summary
  24. Part 6 – Web3 Advanced Topics
  25. Chapter 13: Understanding Oracles
    1. Technical requirements
    2. Understanding oracles
      1. Types of oracles
      2. Why do we need Oracles?
    3. Understanding the oracle problem in Web3
      1. Solving the oracle problem with decentralized oracles
    4. Exploring Chainlink as an Oracle
    5. Running a Chainlink node
      1. Running a Chainlink node locally
      2. Comparing oracles with blockchains
    6. Summary
  26. Chapter 14: Zero-Knowledge Proofs and Zero-Knowledge EVMs
    1. Exploring ZKPs and their integration with the Ethereum Virtual Machine
    2. Understanding ZKPs
      1. ZKPs in cryptography
      2. ZKPs in the blockchain ecosystem
      3. Use cases
      4. Introducing ZK-SNARK and ZK-STARK
    3. Understanding the zkEVM
    4. Summary
  27. Chapter 15: L2 Networks and Rollups
    1. Understanding Layer 2 networks
      1. Types of Layer 2 networks
    2. Understanding how Polygon works
      1. Validators
      2. Delegators
    3. Understandings rollups
      1. Types of blockchain rollups
    4. Summary
  28. Chapter 16: Decentralized Autonomous Organizations – Overview
    1. Understanding DAOs
    2. Popular DAOs
    3. The future of DAOs
      1. Will DAOs be successful?
    4. Summary
  29. Index
    1. Why subscribe?
  30. Other Books You May Enjoy
    1. Packt is searching for authors like you
    2. Share Your Thoughts
    3. Download a free PDF copy of this book

Product information

  • Title: The Essential Guide to Web3
  • Author(s): Vijay Krishnan
  • Release date: November 2023
  • Publisher(s): Packt Publishing
  • ISBN: 9781801813471