You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nprimo 4fa5c876a7 docs: run prettify and move h1 to h2 1 year ago
..
README.md docs: run prettify and move h1 to h2 1 year ago
networkInfo.png docs(blockchain): add blockchain branch subjects to public 2 years ago

README.md

Local Node Info

To start, we will create a simple page that displays basic information from our local node.

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 :

  • In an element with (id=chainId), the number ID of the current network
  • In an element with blockNumber as id the number of blocks in the chain

image

Hint

You can use any library such as ethers.js or web3.js to connect to your local node.

Automated tests check for elements with specific IDs, the design is up to you.

Minimal structure:

<!DOCTYPE html>
<body>
  <span id="chainId"></span>
  <span id="blockNumber"></span>

  <script src="XXX"></script>
  <script type="module">
    // Your code
  </script>
</body>
</html>

Notions