Skip to content

PacktPublishing/Hands-On-Blockchain-Development-in-7-Days

Repository files navigation

Hands-On Blockchain Development in 7 Days

Hands-On Blockchain Development in 7 Days

This is the code repository for Hands-On Blockchain Development in 7 Days, published by Packt.

Create a decentralized gaming application using Ethereum

What is this book about?

Blockchain is a revolutionary technology that is currently been used in a variety of industrial applications, such as finance, healthcare, data analytics, and much more. This book will teach you the key blockchain principles and methodologies that are required to build decentralized applications in just 7 days.

This book covers the following exciting features:

  • Work with blockchain networks to create interactive applications
  • Learn how to create and use variables in smart contracts
  • Use automated tests to eliminate mistakes and errors in the code
  • Interact with the Ethereum network from a user interface
  • Build a user interface for smart contracts using React
  • Send and receive funds in smart contracts using wallets
  • Deploy blockchain applications on AWS

If you feel this book is for you, get your copy today!

https://www.packtpub.com/

Instructions and Navigations

All of the code is present in the master branch and code for the assignments of each day have been added as branches.

The code will look like the following:

function foo() public returns
(string) {
    return "Hello";
}

function bar() external {
    foo_ = foo(); //Not valid
    foo_ = this.foo(); //Valid
}

Following is what you need for this book: This book is for software engineers and IT professionals, who are eager to learn blockchain application development skills and want to master how blockchain applications are developed. This book is perfect for those with limited programming experience.

With the following software and hardware list you can run all code files present in the book (Chapter 1-7).

Software and Hardware List

Chapter Software required OS required
All Ganache Windows, Mac OS X, and Linux (Any)
All Truffle framework Windows, Mac OS X, and Linux (Any)
All Python version 2.7 and above Windows, Mac OS X, and Linux (Any)
All Geth Windows, Mac OS X, and Linux (Any)
All MetaMask Windows, Mac OS X, and Linux (Any)

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. Click here to download it.

Installation

  1. Install node.js (version 10.15.0)

  2. Install webpack globally

    npm install -g webpack
    npm install -g webpack-cli
    
  3. Install npm dependencies

    npm install
    
  4. Install truffle and Ganache, both available from Truffle.

  5. Compile and migrate the contracts.

    truffle compile
    truffle migrate
  6. Run the webpack server for front-end hot reloading. For now, smart contract changes must be manually recompiled and migrated.

    npm start

Docker

  1. Build the docker container.

    docker build -t etherslist .
    
  2. Launch the docker container.

    docker run -p 3000:3000 etherslist:latest
    
  3. Browse to http://localhost:3000

FAQ

  • Why is there both a truffle.js file and a truffle-config.js file?

    Truffle requires the truffle.js file be named truffle-config on Windows machines. Feel free to delete the file that doesn't correspond to your platform.

Related products

Get to Know the Author

Will Button works with web, mobile, and blockchain start-ups in advisory and technical roles. As an advisor, he helps organizations scale securely and sustainably. As a technical expert, he helps organizations build the processes, systems, and teams necessary to deliver world-class services and applications to their customers. Since 1995, Will has used his experience with multiple successful start-ups to create over 150 videos on DevOps, software engineering, and blockchain application development. He is a certified Ethereum developer, and holds the Linux Foundation Blockchain for Business certificate. He is the lead of the Application Architecture Working Group for the Government Blockchain Alliance. For more information, visit his blog.

Suggestions and Feedback

Click here if you have any feedback or suggestions.