Provider: missing new #3178
-
While deploying my contract, following error occurs. async function main() { main() |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Well check the beginning: const provider = ethers.providers.JsonRpcProvider("http://127.0.0.1:7545/"); You need to create a new instance, as the error code tells you, at So you can change it to: const provider = new ethers.providers.JsonRpcProvider("http://127.0.0.1:7545/"); |
Beta Was this translation helpful? Give feedback.
Well check the beginning:
You need to create a new instance, as the error code tells you, at
main
, indeploy.js
:line 6
.So you can change it to: