Closed dasdeepanjan closed 1 year ago
I had this issue a minute ago and I just wrote: const provider = new ethers.JsonRpcProvider("your url");
If your version of ethers is 6.0.2 and above then try this
const provider = new ethers.JsonRpcProvider("http://127.0.0.1:8545");
ethers V5.0.4 uses the ethers.providers.JsonRpcProvider()
but I don't think it's supported in the newer version.
Verson 6 Documentation Here
Also, version 6 of ethers is having a bit of an issue, so it's better to install a lower version. you can use
yarn add ethers@5.0.11
to install version 5 of ethers. if you revert to version 5, remember to change your provider back to ethers.providers.JsonRpcProvider()
.
I guess you have this problem in test file, where you didnt even use JsonRpcProvider, so yes, just downgrade ethers, remove node_modules and install again. It helped me
Error generated:
deploy.js
Originally posted by @dasdeepanjan in https://github.com/smartcontractkit/full-blockchain-solidity-course-js/discussions/4735