To start, we will create a simple page that displays basic information from our local node.
To get started, we will create a simple web page that displays basic information from our local node.
### Instructions
### Instructions
Create a web page, `localNodeInfo.html` that loads an ethereum library, connects to a local node at `http://localhost:8545` and displays basic information :
Create a web page called `localNodeInfo.html` that does the following:
- In an element with (`id`=`chainId`), the number ID of the current network
1. Loads an Ethereum library, such as `ethers.js` or `web3.js`.
- In an element with `blockNumber` as `id` the number of blocks in the chain
2. Connects to a local Ethereum node at `http://localhost:8545`.
3. Displays the following information on the page:
- The ID of the current network in an element with `chainId` as `id`.
- The number of blocks in the chain in an element with `blockNumber` as `id`.
![image](networkInfo.png)
![image](network-infos.png)
### Hint
### Hint
You can use any library such as `ethers.js` or `web3.js` to connect to your local node.
🚫 Please be aware that the test environment restricts internet access for security reasons. Therefore, you need to download the library and import it locally.
Automated tests check for elements with specific IDs, the design is up to you.
🎨 Automated tests only check for the content of elements with specific IDs; the rest of the design is up to you.
Minimal structure:
🎁 Here is a minimal example structure for the HTML file: