-
I pressed "Go Live", made anvil and deployed a contract. Connected to website. But when i press getBalance i get this in console: I did not change any code that i git cloned. |
Beta Was this translation helpful? Give feedback.
Answered by
mskhno
Jul 11, 2024
Replies: 1 comment 2 replies
-
Hello @maxsakhno, Did you check if you have installed all the necessary libraries? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @EngrPips, yes i have everything installed. Solved this after tinkering around in chatgpt for some time.
The problem was with index.js. It suggested that the issue is that in ethers v6 they changed some names or something. It said they renamed Web3Provider to BrowserProvider. There was also a problem with ethers.utils, so i changed the code there as well. Now everything works fine.
This is the final code of index.js: