This video is available to students only

How to Connect to Ethereum with Web3.js From JavaScript

In this video, we'll write our first Solidity smart contract

In the last video, we built a simple counter contract in Solidity, we deployed it to the blockchain, and called methods on it to update the state.

There's a lot more we have to learn about Solidity and smart contract programming, but I want to show how to make a connection all the way to our web browser. That is, I want to make a user interface for this contract.

I think it's helpful to see how an ethereum-based app is done end-to-end and then we'll go back and learn how to make more sophisticated apps.

To build a UI for our Ethereum app, the key idea is this: our Ethereum node has a JSON API and we will connect our browser to that API.

So the core architecture is that we have an HTML file, which loads JavaScript. And this JavaScript, instead of calling out to a say, "normal", "centralized" server, we'll call to our personally controlled Ethereum node instead.


This page is a preview of Intro to Programming Ethereum ĐApps

Start a new discussion. All notification go to the author.