Thursday, July 6, 2023

150: Debugging Ethers.js

 Our app is reaching the point where it utilized the Ethers.js library to interact with the blockchain via the Web3 Provider and signer. However, there was a consistent error about how Web3Provider cannot be read and is undefined. This confused me for a while, and I wondered if there was an issue with the import statements or the way I destructured the ethereum object from the window. However, it turns out other people have had this issue and it possibly has something to do with the newest version of Ethers interacting with the newest version of React. By reinstalling the ethers package in the 5.x version, our code works again. 

No comments:

Post a Comment

190: Sablier

 The CodeHawks platform has an upcoming audit on the Sablier protocol, so I decided to read through the docs and familiarize myself with the...