Skip to Content
Ethereum Smart Contract Development
book

Ethereum Smart Contract Development

by Mayukh Mukhopadhyay
February 2018
Intermediate to advanced
288 pages
6h 58m
English
Packt Publishing
Content preview from Ethereum Smart Contract Development

Running a smart contract using Web3.js

In this section, we will do a hands-on tutorial. So put on your lab coats! We will do the following right now:

  1. Install Web3.js from GitHub.
  2. Install an HTTP server and get it up and running.
  3. Write a quick-and-dirty JavaScript smart contract using Web3.js.
  4. Open geth and attach our private blockchain with Web3.js.
  5. Open a web browser to launch our smart contract using Web3.js.
  6. Open Mist to validate the outcome of our smart contract.

To install Web3.js from GitHub on Windows, we require the git bash kernel. Once we have installed the git bash kernel, we can clone the Web3.js GitHub path and download the HTTP server using the following command:

> git clone https://github.com/ethereum/web3.js.git
> install ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Building Games with Ethereum Smart Contracts: Intermediate Projects for Solidity Developers

Building Games with Ethereum Smart Contracts: Intermediate Projects for Solidity Developers

Kedar Iyer, Chris Dannen

Publisher Resources

ISBN: 9781788473040Supplemental Content