Hands-On Smart Contract Development with Solidity and Ethereum
- Length: 270 pages
- Edition: 1
- Language: English
- Publisher: O'Reilly Media
- Publication Date: 2019-12-10
- ISBN-10: 1492045268
- ISBN-13: 9781492045267
- Sales Rank: #1425441 (See Top 100 Books)
Ready to dive into smart contract development for the blockchain? With this practical guide, experienced engineers and beginners alike will quickly learn the entire process for building smart contracts for Ethereum—the open source blockchain-based distributed computing platform. You’llget up to speed with the fundamentals and quickly move into builder mode.
Kevin Solorio, Randall Kanna, and Dave Hoover show you how to create and test your own smart contract, create a frontend for users to interact with, and more. It’s the perfect resource for people who want to break into the smart contract field but don’t know where to start.
In four parts, this book helps you:
- Explore smart contract fundamentals, including the Ethereum protocol, Solidity programming language, and the Ethereum Virtual Machine
- Dive into smart contract development using Solidity and gain experience with Truffle framework tools for deploying and testing your contracts
- Use Web3 to connect your smart contracts to an applicationso users can easily interact with the blockchain
- Examine smart contract security along with free online resources for smart contract security auditing
Preface Mastering Ethereum ConsenSys Academy B9 Academy Conventions Used in This Book Using Code Examples O’Reilly Online Learning How to Contact Us Acknowledgments I. Intro to the Ethereum Blockchain 1. Blockchain Concepts A Brief History The Character of a Blockchain Decentralized Networks Consensus Protocols Transaction Processing Transaction Finality Hard Forks Ethereum Fundamentals Ether and Gas Accounts Contracts Blocks and Transactions What Time Is It? Signing Transactions Summary 2. Decentralized Applications Tokens ERC-20 Non-Fungible Token (ERC-721) Supply Chain Permanent Records Evaluating Blockchain for Your Application Verifiable Transparent Resilient Summary 3. Before We Get Started Ethereum Clients Installing Parity Installing MetaMask Installing Node.js Ubuntu Installation (Including Windows WSL Ubuntu) Mac Installation Installing the Truffle Suite Truffle Ganache Summary II. Developing Smart Contracts 4. Our First Smart Contract Setup Our First Test Saying Hello Making Our Contract Dynamic Making the Greeter Ownable Summary 5. Deploying and Interacting with Contracts Contract Compilation and Deployment Deployment Process Setting Up the UI Deploying to Ganache Deploying to Goerli with Parity Deploying to Rinkeby with Infura Summary 6. The Fundraiser Application Application Overview Creating the Project Initializing Fundraisers Setting the Beneficiary and Custodian Editing the Beneficiary Making Donations Structs Mappings Donation Tests myDonations Fundraiser Totals Events Withdrawing Funds Fallback Functions Summary 7. FundraiserFactory Migrating Our FundraiserFactory Creating Fundraisers Viewing Available Fundraisers Testing Pagination When Empty Testing the Limit Testing the Offset Setting Up the UI Summary III. Interacting with Our Smart Contracts Through Web3 8. What Is Web3? The Frontend, Web3, and the Blockchain Web3 Methods getAccounts() getBlockNumber() getBalance() sendTransaction() Providers Promises with Web3 MetaMask for Web3 Injection Send (State Updates/Write) Call (Reads) Summary 9. Connecting the UI to Our Contracts Why React? Dev Setup Truffle React Truffle Box Setup Importing our Greeter Contracts Adding Our Greeter Contract Functionality Setting Our Greeting Through React Summary 10. Our Larger DApp Starting with React Truffle Box Fundraiser Setup React Routing React and Material UI Creating Our New Fundraiser Page View Displaying the Current Fundraisers List Summary 11. Finishing Our Fundraiser UI Adding Detailed Information About Each Fundraiser Implementing a Material UI Dialog Accepting a Donation with React Testing a Donation Displaying the Current ETH Exchange Rate Generating a Donation Receipt for Our User Handling a Withdrawal from Our Contract Adding Edit Beneficiary to the Contract Summary IV. Securing Your Smart Contracts 12. Smart Contract Security Why Do We Need to Worry About Security? Types of Smart Contract Vulnerabilities Unprotected Function Transaction Ordering Dependence Integer Overflow and Underflow Reentrancy Block Gas Limit Timestamp Dependence And Many More Preparing Your Contract for an External Audit External Auditing Auditing Companies Solidified Free Auditing Resources Growing Your Auditing Skills Summary Index
Donate to keep this site alive
How to download source code?
1. Go to: https://www.oreilly.com/
2. Search the book title: Hands-On Smart Contract Development with Solidity and Ethereum
, sometime you may not get the results, please search the main title
3. Click the book title in the search results
3. Publisher resources
section, click Download Example Code
.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.