What this book covers
Chapter 1, Introduction to Blockchain Programming, provides an overview of the fundamental concepts and principles underlying blockchain technology. It starts by exploring the traditional centralized system’s limitations and how blockchain offers a decentralized, transparent, and immutable solution.
Chapter 2, Smart Contract Fundamentals, provides an overview of core concepts and mechanics behind smart contracts. It begins by defining what smart contracts are and their key characteristics, such as deterministic execution, immutability, and trustless interactions.
Chapter 3, Using Vyper to Implement a Smart Contract, provides an overview of the Vyper language so readers will be able to write and deploy smart contracts on the Ethereum blockchain. Readers will learn the syntax, data types, and control structures of Vyper.
Chapter 4, Using Web3.py to Interact with Smart Contracts, explores how to interact with deployed smart contracts using the Web3.py
library. Readers will learn how to connect to Ethereum nodes, load contract ABIs, and invoke contract functions, enabling them to build decentralized applications that seamlessly interact with smart contracts.
Chapter 5, Ape Framework, introduces readers to the Ape development framework, a tool that streamlines the process of building, testing, and deploying smart contracts and decentralized applications. Readers will learn how to leverage Ape’s features, such as contract compilation, unit testing, and deployment scripts to efficiently manage the development lifecycle of their blockchain projects.
Chapter 6, Building a Practical Decentralized Application, puts the knowledge gained so far into practice by guiding readers through the development of a decentralized voting application. Leveraging the skills acquired in previous chapters, readers will implement smart contracts for secure and transparent voting.
Chapter 7, Front-End Decentralized Application, focuses on developing a user-friendly graphical interface for the decentralized voting application built in the previous chapter, utilizing the PySide
library. Readers will learn how to integrate their smart contracts with a modern GUI, enabling seamless interaction with the blockchain-based voting system and providing an intuitive experience for end-users.
Chapter 8, Cryptocurrency Wallet, guides readers through the process of building a user-friendly cryptocurrency wallet application using the PySide
library. The wallet will be able to transfer ETH to a user and save the user’s address into an address book.
Chapter 9, InterPlanetary: A Brave New File System, introduces readers to the InterPlanetary File System (IPFS), a revolutionary decentralized storage system that enables secure and resilient file sharing across a peer-to-peer network. Readers will learn how IPFS addresses the limitations of traditional centralized storage solutions.
Chapter 10, Implementing a Decentralized Application Using IPFS, dives into the practical implementation of a decentralized video-sharing application that leverages the power of IPFS. Readers will learn how to install and interact with the IPFS
library, write a smart contract for managing video paths, and develop a user-friendly web application that enables decentralized video sharing across the IPFS network.
Chapter 11, Exploring Layer 2, introduces readers to the concept of Layer 2 (L2) solutions. It aims to address the scalability and throughput challenges of the Ethereum mainnet. In this chapter, readers will learn about various L2 technologies and gain hands-on experience deploying a smart contract onto one of these L2 platforms, enabling them to build high-performance and cost-effective decentralized applications.
Chapter 12, Creating Tokens on Ethereum, delves into the process of creating custom tokens on the Ethereum blockchain. Readers will learn how to develop a simple token smart contract, understand the widely adopted ERC-20 token standard, and explore mechanisms for selling and distributing tokens, enabling them to participate in the world of tokenized assets and decentralized finance.
Chapter 13, How to Create an NFT, introduces readers to the concept of non-fungible tokens (NFTs) and their unique properties. Readers will explore the ERC-721 standard, which governs the creation and management of NFTs on the Ethereum blockchain, and gain hands-on experience in developing a smart contract that mints and transfers ownership of these unique digital assets.
Chapter 14, Writing NFT Marketplace Smart Contracts, dives deep into the world of NFT marketplaces, enabling readers to create platforms for buying, selling, and trading non-fungible tokens. Readers will learn how to design and implement an NFT marketplace smart contract, write comprehensive tests to ensure its correctness, and explore advanced features to enhance the user experience of the marketplace.
Chapter 15, Writing a Lending Vault Smart Contract, explores the concept of lending vaults in the decentralized finance (DeFi) space. Readers will gain insights into the ERC-4626 standard, which governs the implementation of these vaults, and learn how to develop a smart contract that facilitates secure and transparent lending operations on the Ethereum blockchain.
Chapter 16, Decentralized Exchange, takes readers on a journey through the world of decentralized finance (DeFi) by exploring decentralized exchanges (DEXs) that use the automated market makers (AMM) algorithm. Readers will gain insights into the inner workings of these innovative trading platforms and develop a DEX smart contract that leverages AMM principles, enabling trustless and permissionless trading of digital assets.
Chapter 17, Token-Gated Applications, explores the concept of token-gated applications, which restrict access based on ownership of specific tokens. Readers will learn how to create a signature using an Ethereum wallet, deploy an NFT smart contract, develop a token-gated back-end application, and build a front-end application that enables users to log in securely using their Ethereum accounts and token holdings.