You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: basic/01-web3js-deploy/README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,13 +3,13 @@
3
3
Through this basic task, you can learn the processes of compiling and deploying a smart contract, as well as learn how to use the basic APIs of `web3js`.
4
4
5
5
# Preparation
6
-
- You need to create a project on [Infura](https://infura.io), and get the `PROJECT ID`, change your `ENDPOINTS` to `KOVAN`;
6
+
- You need to create a project on [Infura](https://infura.io), and get the `PROJECT ID`, change your `ENDPOINTS` to `Goerli`;
7
7
8
8
- Create an account on `MetaMask`, which is a browser extension;
9
9
1. Get a wallet `address`, and the private key;
10
10
2. Go `Settings` - `advanced` and open `Show test networks`;
11
-
- Select `Kovan`, and record this address
12
-
3. Top up your account through [faucets](https://faucets.chain.link/kovan) or others web services;
11
+
- Select `Goerli`, and record this address
12
+
3. Top up your account through [faucets](https://faucets.chain.link) or others web services;
13
13
4. Wait for minutes, and see the balance on `MetaMask`
14
14
15
15
- Create a `.env` file, and add the following lines:
@@ -92,9 +92,9 @@ const abi = contractFile.abi;
92
92
## 4. Create the `web3` instance
93
93
`web3` is the main API of the `web3js` library. It is used to interact with the blockchain.
94
94
```js
95
-
// Create web3 with kovan provider,you can change kovan to other testnet
95
+
// Create web3 with goerli provider,you can change goerli to other testnet
| kovan don't support http protocol to event listen, need to use websocket. More details , please refer to this [blog](https://medium.com/blockcentric/listening-for-smart-contract-events-on-public-blockchains-fdb5a8ac8b9a)
203
+
| goerli don't support http protocol to event listen, need to use websocket. More details , please refer to this [blog](https://medium.com/blockcentric/listening-for-smart-contract-events-on-public-blockchains-fdb5a8ac8b9a)
0 commit comments