How to create scalable dApps and smart contracts in Ethereum with State Channels step-by-step. Part 2

Merunas Grincalaitis
Ethereum Developers
13 min readOct 17, 2018

--

This is the second part of creating scalable decentralised applications in Ethereum with State Channels. If you haven’t read the first part, you can check it here: https://medium.com/@merunasgrincalaitis/how-to-create-scalable-dapps-and-smart-contracts-in-ethereum-with-state-channels-step-by-step-48e12481fb

What we’ll be doing in this second part

In this second part we are going to set up a websockets server for real time communication, to exchange signed messages from one user to another. You can exchange them however you want, for instance you could send those messages via email since they are plain text. But the best option is to use a real-time server because of the better user experience.

Here’s an overview of the tools that we are going to use:

  1. Node.js as the server.
  2. Socket.io as the websockets tool to exchange data in real-time.
  3. Solidity as the smart contract language for creating the decentralised part.
  4. Web3.js for communicating with the blockchain in the client web application.

If you read the Part 1 of the series, you’ll have the first javascript and html…

--

--