Learn Ethereum a practical guide to help developers set up and run decentralized applications with Ethereum 2.0

Ethereum is a blockchain-based, decentralized computing platform that allows you to run smart contracts. With this book, you’ll discover the latest Ethereum tools, frameworks, wallets, and layer 2, along with setting up and running decentralized applications for the complete, end-to-end development...

Descripción completa

Detalles Bibliográficos
Otros Autores: Wu, Xun (Brian), author (author), Zou, Zhihong, author, Song, Dongying, author
Formato: Libro electrónico
Idioma:Inglés
Publicado: Birmingham, England : Packt Publishing Ltd [2023]
Edición:Second edition
Materias:
Ver en Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009764837206719
Tabla de Contenidos:
  • Cover
  • Title Page
  • Copyright and Credits
  • Contributors
  • Table of Contents
  • Preface
  • Part 1: Blockchain and Ethereum Basics
  • Chapter 1: Blockchain and Cryptocurrency
  • Technical requirements
  • Introducing blockchain technology
  • Decentralized P2P networks
  • How does blockchain work?
  • Rehashing cryptography
  • Public-key cryptography
  • Cryptographic hash function
  • Digital signatures
  • Anatomizing a blockchain consensus mechanism
  • What is consensus?
  • Proof-of-work
  • Proof-of-stake
  • Forking
  • Understanding Bitcoin and cryptocurrency
  • Bitcoin basics
  • What is a wallet?
  • Transactions, UTXO, and account balances
  • Genesis block and coin supply
  • How does Bitcoin payment work?
  • Limitations in Bitcoin
  • Altcoins
  • Overview of blockchain use cases in the industry and government
  • Financial services
  • Healthcare
  • Blockchain use cases led by government
  • Ushering in the world of Ethereum
  • Smart contract
  • EVM
  • Account
  • Summary
  • Chapter 2: Ethereum Architecture and Ecosystem
  • Technical requirements
  • Introducing the Eth1 Architecture
  • Ethereum - the world computer
  • Web 2.0, Web3, to the Metaverse
  • DApps
  • Diving deep into Eth1
  • Accounts
  • Two types of accounts
  • EOAs
  • CAs
  • Transactions and messages
  • Smart contracts
  • Ether and gas
  • The EVM
  • Addresses and wallets
  • Examining mining in Eth 1.0
  • Mining and the consensus protocol
  • Ethereum transactions and block structure
  • Transaction validation and block verification
  • Understanding scaling challenges in Ethereum
  • The blockchain scalability trilemma
  • Modular blockchain architecture
  • Ethereum scaling solutions
  • Introducing Beacon Chains and Eth2
  • PoS in Eth2
  • How the beacon chain works
  • Benefits from the transition to PoS
  • Merging Eth1 and Eth2
  • Merging Eth1 data into Eth2.
  • Scaling Ethereum with rollups
  • Optimistic rollups
  • ZK rollups
  • Summary
  • Chapter 3: Decentralized Finance
  • Technical requirements
  • Introducing decentralized finance
  • Mastering Ethereum token standards
  • Definition of cryptocurrency
  • Crypto funding mechanism
  • Ethereum token standards
  • Analyzing stablecoins and MakerDAO Dai
  • Understanding DeFi protocols
  • Basic DeFi constructs
  • Lending and borrowing
  • Decentralized exchanges
  • Decentralized derivatives and insurance
  • Yield farming and DeFi continuum
  • Making sense of cryptoeconomics
  • DeFi after the collapse of FTX
  • Summary
  • Chapter 4: EVM-Compatible Blockchain Networks
  • Technical requirements
  • Understanding EVM blockchain ecosystems
  • Introducing BSC
  • Consensus mechanism in BSC
  • Block creation and finality
  • BNB governance
  • BNB ecosystem and roadmap
  • Scaling Ethereum with Polygon chains
  • How Polygon PoS and Plasma work
  • Block production and checkpoints
  • Consensus mechanism in Polygon PoS
  • Multi-chain solutions with Polygon Edge
  • Polygon ecosystem and roadmap
  • Diving deep into high-performance Avalanche chains
  • Avalanche blockchain architecture overview
  • Avalanche consensus mechanism
  • Subnets and enterprise blockchains
  • Governance in Avalanche chains
  • Avalanche ecosystem
  • Bridging interoperability gaps between blockchains
  • Cross-chain integration challenges
  • Common cross-chain bridge designs
  • Trustless bridge solutions using Polkadot
  • Generalized bridge solutions with Cosmos
  • Decentralized oracle as a bridge
  • Glancing over non-EVM blockchain networks
  • TRON blockchain overview
  • Introduction to Solana
  • Summary
  • Chapter 5: Deep Research and the Latest Developments in Ethereum
  • Technical requirements
  • Understanding the challenges in distributed systems
  • The CAP theorem.
  • Horizontal scaling versus vertical scaling
  • Scaling Ethereum
  • Making sense of the Ethereum roadmap
  • Pivotal to rollup-centric
  • Overview of the post-merge Ethereum roadmap
  • Sharding and data availability sampling
  • Data availability sampling
  • Discovering MEV and PBS
  • Overview of MEV
  • MEV implementation in Ethereum
  • Proposer builder separation
  • zkEVM and EVM improvements
  • Overview of zk-SNARK
  • Types of zkEVM implementations
  • Workings of zkEVM
  • Smart contract wallets and account abstraction
  • Account abstraction and EIP 4337
  • How a smart contract wallet works
  • DAOs
  • Introduction to DAOs
  • DAO governance case study using Uniswap
  • NFTs, Web3, and Metaverse
  • Introduction to a world of NFTs, Web3, and Metaverse
  • The current state of NFTs
  • Web3 and the future of the internet
  • The Metaverse, virtual reality, and future interactions
  • Summary
  • Part 2: Ethereum Development Fundamentals
  • Chapter 6: Fundamentals of Solidity
  • Technical requirements
  • Introducing Solidity
  • Tools for the Solidity development environment
  • Learning about the fundamental programming structure in Solidity
  • The layout of a Solidity source file
  • State variables
  • Built-in data types
  • User-defined data types
  • Functions
  • The pure, view, and payable functions
  • Constructor and destructor functions
  • Fallback function
  • Function overloading
  • Function modifiers
  • Events
  • Global variables, contextual variables, and functions
  • Enabling the contracts library
  • Understanding inheritance, abstract contracts, and interfaces
  • Interface
  • Abstract contract
  • Inheritance
  • Multiple inheritance and the diamond problem
  • Function overriding
  • Examining smart contract execution under the hood
  • Mastering advanced programming concepts in Solidity
  • Smart contract security
  • Keeping contracts simple and modular.
  • Use the checks-effects-interactions pattern
  • DoS with block gas limit
  • Handling errors in external calls
  • Best practices in smart contracts
  • Writing upgradable smart contracts
  • Economic consideration of smart contract execution
  • Types of smart contract
  • Putting it all together - rental property leasing
  • Summary
  • Chapter 7: Web3 API Fundamentals
  • Technical requirements
  • Introducing Web 3.0
  • Setting up an Ethereum environment
  • Installing Geth
  • Setting up a private Ethereum network
  • Generating and configuring the genesis file
  • Initializing the chain instance
  • Starting a Geth node
  • Connecting to Ethereum networks
  • Learning the fundamentals of web3.js - the Ethereum JavaScript API
  • web3.js project setup
  • web3.js Account
  • web3.js ABI
  • Web3 providers
  • Setting up the Ethereum testnet environment
  • The web3.js Transaction API
  • Getting started with web3.py
  • Prerequisites
  • Introducing Web3j - Web3 Java Ethereum DApp API
  • Setting up a simple Spring Boot application
  • Checking the balances of Ethereum accounts
  • solc and the Web3j CLI
  • Deploying smart contracts using Web3j
  • Transacting with a smart contract
  • Querying the state of a smart contract
  • Summary
  • Chapter 8: Developing Your Own Cryptocurrency
  • Technical requirements
  • Understanding token standards
  • ERC-1155
  • Batch transfers
  • Batch balance
  • Batch approval
  • ERC-1155's TokenReceiver
  • Setting up an Ethereum development environment
  • Working with Truffle
  • Creating an ERC-20 token - MyERC20Token
  • Creating basic token information
  • Defining and implementing the ERC-20 interface
  • Assigning an admin role
  • Working with the whitelist function
  • Locking and unlocking an account
  • The mint and burn tokens
  • Creating an ERC-721 token - DigitalArtERC721Token
  • Designing the decentralized digital art marketplace.
  • Setting up the DigitalArtERC721Token project
  • Creating the basic token information
  • Defining and implementing the ERC-721 standard
  • Defining the art and art transaction struct
  • Creating a non-fungible digital art token
  • Implementing the buyArt() function
  • Implementing the resellArt() function
  • Implementing the findArt() function
  • Implementing the findMyArts() function
  • Implementing the findAllPendingArt() function
  • Getting all art transactions through getArtAllTxn()
  • Creating an ERC-1155 token - ERC1155NFTToken
  • Uploading NFT images
  • Writing the ERC-1155 NFT token contract
  • ERC-1155
  • Summary
  • Part 3: Ethereum Development Fundamentals
  • Chapter 9: Smart Contract Development and Test Fundamentals
  • Technical requirements
  • Understanding Remix development fundamentals
  • Working with the Solidity Compiler
  • Testing
  • Deploying and running transactions
  • Debugging
  • Understanding development using Truffle and unit testing
  • The Truffle console and development features
  • Running a Truffle migration
  • Truffle unit testing
  • Truffle Box
  • Understanding Hardhat development and unit testing
  • Hardhat Runner
  • Hardhat Network
  • Project structure
  • Installation and environment setup​
  • Hardhat project setup
  • Creating and compiling the ERC1155 contract
  • Testing the contract
  • Deploying the contract
  • Security testing
  • Static and dynamic analysis
  • Working with a linter
  • Summary
  • Chapter 10: Writing a Frontend to Build the NFT Marketplace DApp
  • Technical requirements
  • Understanding DApps
  • Creating your first NFT
  • Set up a wallet
  • Obtain Ether (ETH)
  • Visit OpenSea
  • Create NFT item
  • Working with the Web3 JavaScript API
  • Setting up a DApp development environment
  • Installing Ganache desktop
  • Creating a development workspace
  • Setting up the project for our DApp.
  • Deploying a smart contract.