𝔖 Scriptorium
✦   LIBER   ✦

📁

Blockchain and Ethereum Smart Contract Solution Development: Dapp Programming with Solidity

✍ Scribed by Weijia Zhang, Tej Anand


Publisher
Apress
Year
2022
Tongue
English
Leaves
464
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Build decentralized applications with smart contract programming. Following the curriculum from an active blockchain course taught by the author at the McCombs School of Business at the University of Texas, this book fills the gaps for you from learning about basic cryptocurrency uses of blockchain to understanding smart contracts and dapps.

You’ll first start by understanding the basics of blockchain technology. Take a business point of view to discover general concepts about blockchains and dapps or “decentralized apps” built off of smart contracts. Next, learn about the token economy, how to design tokens, and relevant client technologies, such as web3, metamask, and UI/UX design. Then, install a blockchain node yourself.

With a basic understanding of blockchain applications and business uses, you’ll move further into hands-on development. There are ten modules for hands-on smart contract programming covered to build your own decentralized applications. Several team projects built end-to-end from concept to deployment to operation are also provided. Using these models and your own original work, you’ll build a smart contract development environment, practice Solidity programming, compile source code, perform security reviews, and deploy bytecode to blockchains.

The breakthrough in blockchain technology has empowered novel ecosystems and applications in the areas of Decentralized Finance (DeFi), Central Bank Digital Currency (CBDC), Non-Fungible Tokens (NFT), Decentralized Autonomous Organization (DAO), and more. Blockchain and Ethereum Smart Contract Solution Development will prepare you to create fantastic applications using Ethereum’s smart contracts and solid concepts of decentralized programming!

What You'll Learn

  • Become familiar with Blockchain technology, both in theory and in practice
  • Understand architectural components of blockchain and the underlying computer science
  • Implement blockchain smart contract solutions using both public and enterprise Ethereum blockchains

Who This Book Is For

IT professionals and mid-level managers interested in smart contract development. Blockchain Consultants who want to have a handbook of smart contract development methodologies. And enterprise technologiests helping companies through the transformation to blockchain technologies.

✦ Table of Contents


Table of Contents
About the Authors
About the Technical Reviewer
Acknowledgments
Part 1: The Context for Blockchain
Chapter 1: Business and Economic Motivation for Blockchain
Introduction
A Brief History of Money
Economy As Value Exchange
Current Economic Inefficiencies
Blockchain’s Potential to Address Current Economic Inefficiencies
Chapter Summary/Key Takeaways
Sidebars
Quiz Questions
References
Chapter 2: Overview of Core Technologies Supporting Blockchain
Introduction
Cryptology and Digital Signatures
Distributed Systems
Peer-to-Peer Networking
Blockchain Technology Integration
Chapter Summary/Key Takeaways
Quiz Questions
Sidebar – Key Distributed Systems Terms and Definitions
References
Chapter 3: Blockchain Components and Architecture
Introduction
Conceptual Overview of Blockchain Components
Distributed Ledgers and Technical Overview of Blockchains
Blockchain Implementation Categorization
Smart Contracts and Blockchain Components Summary
Blockchain Limitations
Chapter Summary/Key Takeaways
Sidebar – Blockchain Terminology
Quiz Questions
References
Chapter 4: Blockchain Business Applications
Introduction
Is a Blockchain Necessary?
Blockchain Application Design Decisions
Blockchain Applications
Blockchain Finance Applications
Blockchain Healthcare Applications
Blockchain Supply Chain Applications
Blockchain Entertainment Applications
Chapter Summary/Key Takeaways
Quiz Questions
References
Chapter 5: Blockchain Implementations Overview: Bitcoin, Ethereum, and Hyperledger
Introduction
Bitcoin Transactions, Blocks, and Mining
Bitcoin Economics
Consensus Protocols
Ethereum
Hyperledger
Bitcoin, Ethereum, and Hyperledger Comparison
Emerging Blockchain Implementations
Chapter Summary/Key Takeaways
Sidebar – Stack-Based Programming Language
Quiz Questions
References
Untitled
Part 2: Ethereum Smart Contract Development
Chapter 6: Ethereum Architecture and Overview
Introduction
Ethereum Architecture
Network Layer
Core Blockchain Layer
Enterprise Components Layer
Tooling Layer
Application Layer
Ethereum Blockchain Ecosystem and DeFi Projects
Wallet to Manage Assets
Hosted Service
MetaMask
MyEtherWallet
Fortmatic
Smart Contract–Enabled Banking dApp
Decentralized Exchange in Ethereum
NFT Applications
Oracle Service
DAO Platforms
Decentralized Insurance Platform
Decentralized KYC and Identity
Stablecoin
Tools to Set Up a Smart Contract Development Environment
MetaMask: The Simplest Way to Interact with the Ethereum Blockchain
Etherscan: The Most Comprehensive Blockchain Browser
Geth: The Swiss Army Knife for the Ethereum Blockchain
Truffle: The Most Comprehensive Smart Contract Development Tool
Remix: The Most Convenient Web-Based Smart Contract Development Tool
Summary
Chapter 7: Programming Smart Contract with Solidity
Introduction: What We Learned in the Last Chapter
What Is Smart Contract
What Is Solidity Programming Language
Module 1: Hello World Solidity Example
Solidity Comments
Solidity Program and Version Declaration
Import a Solidity File
Constructor Function
Function Modifier
Blockchain Access Scope: Pure/View/Payable Functions
Function Access Scope: Public, External, Internal, and Private
Module 2: Solidity Data Types
Boolean
Integer Type
Address Type
Byte Array
Fixed Size Array
Dynamically Sized Array
Mapping Data Type
Enum Data Type
Struct Data Type
Blockchain Specific Variables
Module 3: Events
What Is Ethereum Event
Where Are Events Stored
How to Define an Event
How to Emit an Event
Event Examples
Module 4: Security
Function Vulnerabilities
Function Visibility Error
Vulnerability: Function Call Return Value Not Checked
Vulnerability: Ether Withdraw Operation Not Protected
Vulnerability: Self-Destruction Functions
Vulnerability: Use of Solidity Deprecated Functions
Vulnerability: Delegatecall to Untrusted Callee
Vulnerability: DOS with Failed Function Calls
Vulnerability: Race Conditions and Transaction Order Dependence
Vulnerability: Assert Violation
Vulnerability: Cross Contract Call Enters into a Loop
Data Type and Data Vulnerabilities
Vulnerability: Variable Value Overflow or Underflow
Vulnerability: Shadowing State Variables
Vulnerability: Authorization Through tx.origin
Vulnerability: Using Block Values to Represent Time
Vulnerability: Writing to Arbitrary Storage Locations
Vulnerability: Unused Variables
Compiler Vulnerabilities
Outdated Compilers
Randomness Vulnerability
Vulnerability: Weak Randomness from Blockchain Attributes
Signature Vulnerability
Vulnerability: Signature Manipulation
Module Summary
Module 5: Tools, Test, and Debug
Tools
MythX: A Security Scanning Tool
Solidity Static Analysis: A Security Plug-in for Remix
Solidity to UML: Smart Contract Visualization Tool
Solidity to UML for Remix
Solidity to UML Stand-Alone Tools
Solidity Test
Solidity Unit Testing: A Remix Plug-in for Testing
Solidity Debug
Enable the Debugger
Launch the Debugger
Debug the Smart Contract
Module 6: Client Considerations
Types of dApp clients
Browser Client
Mobile Clients
Desktop Client
CLI Client
Web Client Example for Interacting with Smart Contract
Step 1: Create an Ethereum development blockchain
Step 2: Compile and deploy the smart contract to the development blockchain
Step 3: Deploy the smart contract
Step 4: Write web client to interact with the smart contract
Summary
Chapter 8: Security Considerations
Introduction
Functional Security Holes in Smart Contracts
Fund Deadlock
Fund Leakage
Disabled Smart Contract
Orphan Smart Contract
Attackable Security Holes in Smart Contracts
Best Security Practices for Smart Contracts
Have a Security Risk Mitigation Plan
Checking Both Main Source Code and Libraries
Put a Cap to the Max Funds
Make Your Smart Contract Open Source and Leverage the Community Effort to Harden the Security
Yes, There Are Blockchain Security Whitehats
Have Smart Contract Audited
Readable Smart Contract Logic
Modularize the Smart Contract
Using Well-Tested Libraries
Use a Good Random Number Generator
Review Gas Consumption in Security Context
Wisely Use Blockchain
Stay on Top of Security Breaches and Patches
Blockchain Specific Security Tips
Security Impact of Quantum Computing
Summary
Chapter 9: Layer 2 and Ethereum 2
Problem with Ethereum Mainnet
Layer 2 Technology
Ethereum State Channel
Plasma As a Layer 2 Technology
Plasma Smart Contract on Ethereum Mainnet
Operators
Transactions or Smart Contracts on Layer 2
Plasma Chain
Transaction Merkle Tree Example
Transaction Merkle Tree for Plasma MVP
Transaction Merkle Tree for Plasma Cash
Layer 2 Rollup
Optimistic Layer 2
zk-SNARK Layer 2
Ethereum 2
Major Changes in Ethereum 2
Transferring from POW to POS
Beacon Chain
Sharding
Ethereum 2 Architectural Overview
Migrating from Ethereum 1 to Ethereum 2: POS Deposit, Staking, and Slashing
Run an Ethereum 2 Validator Node with POS Staking
Uncertainties with Ethereum 2
Summary
Chapter 10: Fund a Project: Tokens and Gas Fees
Introduction
Tokens for Funding Ecosystem Projects
Tokens in ICO and DeFi
Token in NFT
Tokens in DeFi (Compound, Uniswap, and Stablecoins)
Tokens for Enterprises/Standardized (Pervasive) Tokens
Supply chain tokens
Industry-Specific Tokens
Token Taxonomy Initiative
Token Economy Consideration
Token Allocation
Token Distribution
Gas Fee Consideration
What Is Ethereum Gas?
Understand Ethereum Gas with Gas Station Analogy
Quantize Gas Expenses in a Smart Contract Program
Summary
Chapter 11: Building Team Projects
Problem Statement and Brainstorming
Specifications and Solutions
EIP-3220: Crosschain Identifier Specification
Simple Summary
Abstract
Motivation
Specification
Rationale
Backward Compatibility
Security Considerations
Architecture
Design the Smart Contract
Roles
Events
Data Structures
Functions
UML of Smart Contract
Smart Contract Code
Client Considerations
HTML Page Example
JavaScript Example
Security Review
Deploy to Testnet
Deploy to Mainnet
Operation and Upgrade Consideration
Index


📜 SIMILAR VOLUMES


Blockchain and Ethereum Smart Contract S
✍ Weijia Zhang, Tej Anand 📂 Library 📅 2022 🏛 Apress 🌐 English

<p><span>Build decentralized applications with smart contract programming. Following the curriculum from an active blockchain course taught by the author at the McCombs School of Business at the University of Texas, this book fills the gaps for you from learning about basic cryptocurrency uses of bl

Solidity Smart Contracts: Build DApps In
✍ Rangel Stoilov 📂 Library 📅 2019 🏛 Independently published 🌐 English

<font> <font><h1> Learn Solidity And How To Create Smart Contracts With This Book!</h1></font>For the past couple of years, there hasn't been a bigger breakthrough in the IT world than the one that Blockchain technology has made. The extremely fast growth of the industry, market and the technology i

Mastering Blockchain Programming with So
✍ Jitendra Chittoda 📂 Library 📅 2019 🏛 Packt Publishing 🌐 English

<p><b>Discover the advanced features of Solidity that will help you write high-quality code and develop secure smart contracts with the latest ERC standards</b></p> Key Features <li>Delve into Solidity and understand control structures, function calls, and variable scopes </li> <li>Explore tools for

Ethereum smart contract development: bui
✍ Mayukh Mukhopadhyay 📂 Library 📅 2018 🏛 Packt Publishing 🌐 English

Ethereum is a public, blockchain-based distributed computing platform featuring smart contract functionality. This book is your one-stop guide to blockchain and Ethereum smart contract development. We start by introducing you to the basics of blockchain. You'll learn about hash functions, Merkle tr

Ethereum Smart Contract Development in S
✍ Gavin Zheng, Longxiang Gao, Liqun Huang, Jian Guan 📂 Library 📅 2021 🏛 Springer Singapore;Springer 🌐 English

<p><p>The general consensus is that BlockChain is the next disruptive technology, and Ethereum is the flagship product of BlockChain 2.0. However, coding and implementing business logic in a decentralized and transparent environment is fundamentally different from traditional programming and is emer