Build Your First Ethereum DApp

Book description

In this book we'll walk through the creation of a complete distributed application (DApp) based on the Ethereum platform. We'll be building The Neverending Story, a crowdsourced choose-your-own-adventure story with crowd curation and community censorship.

This book is for anyone interested in using the Ethereum platform for development. It's advised that you read The Developer's Guide to Ethereum before reading this book if you are not familiar with blockchain technology.

Publisher resources

View/Submit Errata

Table of contents

  1. Build Your First Ethereum DApp
  2. Notice of Rights
  3. Notice of Liability
  4. Trademark Notice
  5. About SitePoint
  6. Preface
    1. Who Should Read This Book?
    2. Conventions Used
      1. Code Samples
      2. Tips, Notes, and Warnings
  7. Chapter 1: App Rules and Blockchain Setup
    1. What We’ll Be Building
      1. Chapters
      2. Fees
    2. Bootstrapping: PoA Private Blockchain
    3. Bootstrapping: Ganache CLI
    4. Conclusion
  8. Chapter 2: Creating, Deploying TNS Tokens
    1. Prerequisites
    2. The Basic Dependencies
    3. Starting the Token
    4. SafeMath
    5. ERC20 from Scratch
      1. Basic balances
      2. Total supply
      3. Sending tokens
      4. Allowance
    6. Constructor
    7. Alternative Development Flow
    8. Initial Balance
    9. Token Locking
    10. Full Code
    11. Conclusion
  9. Chapter 3: Ethereum DApps: Compiling, Deploying, Testing TNS tokens
    1. Compiling
    2. Deploying to Ganache
    3. Testing the Token
    4. Deploying to a Live Network
    5. Bonus: Verification and ENS
      1. Verification
      2. ENS
    6. Conclusion
  10. Chapter 4: Whitelisting & Testing a Story DAO
    1. Contract Outline
      1. Testing
    2. Whitelist
    3. Conclusion
  11. Chapter 5: Cross-contract Communication & Token Selling
    1. Adding Tokens
      1. Buying Tokens
    2. Structs and Submissions
      1. Deleting
    3. Deployments Get More Complicated
    4. Conclusion
  12. Chapter 6: Voting with Custom Tokens
    1. Votes and Proposals
    2. Voting to Delete and Blacklist
    3. Other Types of Votes
    4. Chapter End
    5. Dividend Distribution and Withdrawals
    6. Deployment Issues
    7. Conclusion
  13. Chapter 7: Building a Web3 UI for a DAO Contract
    1. Automating Transfers
    2. The Front End
      1. About the syntax
    3. Account Information
      1. Session
      2. Account avatar
      3. Account balances
      4. Listening to events
      5. Account whitelisting
      6. Submitting an entry
    4. Conclusion
  14. Chapter 8: Launching the StoryDao
    1. Suicide
      1. What about selfdestruct?
    2. Deploying the Contract
      1. Mainnet Deployment
      2. Send tokens to StoryDao address
      3. Transfer ownership of token to StoryDao
    3. Verification
    4. Deploying to the Web
    5. Conclusion

Product information

  • Title: Build Your First Ethereum DApp
  • Author(s): Bruno Skvorc
  • Release date: August 2018
  • Publisher(s): SitePoint
  • ISBN: 9781925836073