Deploying a Smart Contract

Learn how to deploy a smart contract using web3.js

Now, we have everything we need to write an application that will deploy our smart contract to the Goerli network. In this lesson, we'll write a script in JavaScript that'll use the web3.js library to interact with the Goerli network through Infura. While the applications we will build in this chapter will be straightforward, we can use the same principles to create more complex applications that use the Web3 API.

Creating a project

To start working on our application, we first need to create a JavaScript project and add dependencies to it. To create a new project, we'll run the npm init command:

Get hands-on with 1200+ tech skills courses.