Skip to content
This repository was archived by the owner on Oct 3, 2024. It is now read-only.

Commit a3323f2

Browse files
authored
updated content (#164)
1 parent d070dd0 commit a3323f2

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

docs/dev/developer-guides/hello-world.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ yarn hardhat deploy-zksync
159159

160160
In the output, you should see the address the contract was deployed to.
161161

162-
Congratulations! You have deployed a smart contract to zkSync! Now you can visit the [zkSync block explorer](https://explorer.zksync.io/) and search you contract address to confirm it was successfully deployed.
162+
Congratulations! You have deployed a smart contract to zkSync! Now you can visit the [zkSync block explorer](https://explorer.zksync.io/) and search your contract address to confirm it was successfully deployed.
163163

164164
[This guide](../../api/tools/block-explorer/contract-verification.md) explains how to verify your smart contract using the zkSync block explorer.
165165

@@ -208,7 +208,7 @@ async getGreeting() {
208208
},
209209

210210
async getFee() {
211-
// TOOD: return formatted fee
211+
// TODO: return formatted fee
212212
return "";
213213
},
214214

@@ -263,7 +263,7 @@ Run the following command on the greeter-tutorial-starter root folder to install
263263
yarn add ethers zksync-web3
264264
```
265265

266-
After that, import both libraries in the `script` part of the `App.vue` file (right before the contract constant). It should look like this:
266+
After that, import both libraries within the `script` tag of the `App.vue` file (right before the contract constants). It should look like this:
267267

268268
```javascript
269269
import {} from "zksync-web3";
@@ -279,7 +279,8 @@ const GREETER_CONTRACT_ABI = []; // TODO: insert the path to the Greeter contrac
279279

280280
Open `./src/App.vue` and set the `GREETER_CONTRACT_ADDRESS` constant equal to the address where the greeter contract was deployed.
281281

282-
To interact with the smart contract we just deployed to zkSync, we also need its ABI. ABI stands for Application Binary Interface and, in short, it's a file that describes all available names and types of the smart contract methods to interact with it.
282+
To interact with the smart contract we just deployed to zkSync, we also need its ABI.
283+
*ABI* stands for Application Binary Interface and, in short, it's a file that describes all available names and types of the smart contract methods to interact with it.
283284

284285
- Create the `./src/abi.json` file.
285286
- You can get the contract's ABI in the hardhat project folder from the previous section in the `./artifacts-zk/contracts/Greeter.sol/Greeter.json` file. You should copy the `abi` array and paste it into the `abi.json` file created in the previous step. The file should look roughly the following way:
@@ -337,19 +338,21 @@ const GREETER_CONTRACT_ABI = require("./abi.json");
337338

338339
### Working with provider
339340

340-
1. Go to the `initializeProviderAndSigner` method in `./src/App.vue`. This method is called after the connection to Metamask is successful.
341-
342-
In this method we should:
343-
344-
- Initialize a `Web3Provider` and a `Signer` to interact with zkSync.
345-
- Initialize the `Contract` object to interact with the `Greeter` contract we just deployed.
346-
347-
2. Import the necessary dependencies:
341+
1. Import the necessary dependencies:
348342

349343
```javascript
350344
import { Contract, Web3Provider, Provider } from "zksync-web3";
351345
```
352346

347+
2. Locate the `initializeProviderAndSigner` method in `./src/App.vue`.
348+
349+
*Note:* This method is called only after the connection to Metamask is successful.
350+
351+
In this method we would do the following:
352+
353+
- Initialize a `Web3Provider` and a `Signer` to interact with zkSync.
354+
- Initialize the `Contract` object to interact with the `Greeter` contract we just deployed.
355+
353356
3. Initialise the provider, signer, and contract instances like this:
354357

355358
```javascript
@@ -404,7 +407,7 @@ The chosen token to pay the fee can now be selected. However, no balances are up
404407

405408
The easiest way to retrieve the user's balance is to use the `Signer.getBalance` method.
406409

407-
1. Add the necessary dependencies:
410+
1. Add the necessary dependencies at the top of the script file:
408411

409412
```javascript
410413
// `ethers` is only used in this tutorial for its utility functions

0 commit comments

Comments
 (0)