BSC Node Connection problem

Hi, I am trying to follow this video
I copied and pasted the code exactly the same, I think. I’m trying to run the page in a browser (netbox and brave) and it doesn’t show me anything. Only a white background… I don’t know what I am doing wrong…
Also I was trying with tx and I had the same result…

 <script src="[email protected]/lib/index.min.js"></script>
<p id="blockNumber"></p> 

     const NODE_URL = "";
     let web3 = new Web3(new Web3.providers.HttpProvider(NODE_URL));

     .then(funtion(blockNumber) {
         document.getElementById("blockNumber").innerHTML = "Block number: " + block Number;

1 Like

Hey @adikapusta8

You had a syntax mistake in code:

getBlockNumber = async () => {
        web3.eth.getBlockNumber().then((blockNumber) => {
          document.getElementById("blockNumber").innerHTML =
            "Block number: " + blockNumber;

And then you can getBlockNumber ()

Hope this will help :wink:

1 Like