@@ -179,7 +179,7 @@ Note that we are installing the latest version of 4.x, at the time of this tutor
179179Next, create a new file called ` index.js ` in your project directory and add the following code to it:
180180
181181``` javascript
182- const { Web3 } = require (' web3' ); // web3.js has native ESM builds and (`import { Web3 } from 'web3'`)
182+ const { Web3 } = require (' web3' ); // web3.js has native ESM builds and (`import Web3 from 'web3'`)
183183
184184// Set up a connection to the Ganache network
185185const web3 = new Web3 (new Web3.providers.HttpProvider (' http://localhost:7545' ));
@@ -214,7 +214,7 @@ Create a file named `deploy.js` and fill it with the following code:
214214``` javascript
215215// For simplicity we use `web3` package here. However, if you are concerned with the size,
216216// you may import individual packages like 'web3-eth', 'web3-eth-contract' and 'web3-providers-http'.
217- const { Web3 } = require (' web3' ); // web3.js has native ESM builds and (`import { Web3 } from 'web3'`)
217+ const { Web3 } = require (' web3' ); // web3.js has native ESM builds and (`import Web3 from 'web3'`)
218218const fs = require (' fs' );
219219const path = require (' path' );
220220
@@ -289,7 +289,7 @@ In this step, we will use web3.js to interact with the smart contract on the Gan
289289Create a file named ` interact.js ` and fill it with the following code:
290290
291291``` javascript
292- const { Web3 } = require (' web3' ); // web3.js has native ESM builds and (`import { Web3 } from 'web3'`)
292+ const { Web3 } = require (' web3' ); // web3.js has native ESM builds and (`import Web3 from 'web3'`)
293293const fs = require (' fs' );
294294const path = require (' path' );
295295
0 commit comments