Reader small image

You're reading from  Solidity Programming Essentials. - Second Edition

Product typeBook
Published inJun 2022
PublisherPackt
ISBN-139781803231181
Edition2nd Edition
Concepts
Right arrow
Author (1)
Ritesh Modi
Ritesh Modi
author image
Ritesh Modi

Ritesh Modi is a technologist with more than 18 years of experience. He holds a master's degree in science in AI/ML from LJMU. He has been recognized as a Microsoft Regional Director for his contributions to building tech communities, products, and services. He has published more than 10 tech books in the past and is a cloud architect, speaker, and leader who is popular for his contributions to data centers, Azure, Kubernetes, blockchain, cognitive services, DevOps, AI, and automation.
Read more about Ritesh Modi

Right arrow

Installing the web3 framework

The web3 library is an open source JavaScript library that can be used to connect to Ethereum nodes from the same or a remote computer. It allows IPC as well as an RPC to connect to Ethereum nodes. web3 is a client-side library and can be used alongside a web page and query, and can submit transactions to Ethereum nodes. It can be installed using npm as a node module like the Solidity compiler. Let's take a look at the following steps to install the web3 JavaScript library:

  1. The command used to install web3 is as follows:
    npm install web3

The preceding command generates the following output:

Figure 2.17 – Installing the web3 JavaScript framework

  1. After web3 is installed, it can be used using the Node.js REPL. From Command Prompt, enter the Node.js workspace by executing the node command, as shown in the following screenshot:

Figure 2.18 – Starting a node session...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Solidity Programming Essentials. - Second Edition
Published in: Jun 2022Publisher: PacktISBN-13: 9781803231181

Author (1)

author image
Ritesh Modi

Ritesh Modi is a technologist with more than 18 years of experience. He holds a master's degree in science in AI/ML from LJMU. He has been recognized as a Microsoft Regional Director for his contributions to building tech communities, products, and services. He has published more than 10 tech books in the past and is a cloud architect, speaker, and leader who is popular for his contributions to data centers, Azure, Kubernetes, blockchain, cognitive services, DevOps, AI, and automation.
Read more about Ritesh Modi