-
Hey guys, I am having an issue with the getContact() function:
(btw. I am running a local node before executing the code I found a workaround where I would use the getContractAt() function instead, but for that I need the deployments.fixture() function, which is only meant for test scripts...
Do you know why the getContract() function doesn't work for me? And what can I do to get it to work? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hello @WolfgangNI If you want to test this on local network you should do below:
The point is you are using |
Beta Was this translation helpful? Give feedback.
-
@WolfgangNI I need to see the complete code, please leave your repository link. |
Beta Was this translation helpful? Give feedback.
Hello @WolfgangNI
If you want to test this on local network you should do below:
yarn hardhat node
to run your local network.yarn hardhat run scripts/mint.js --network localhost
for example.The point is you are using
--network hardhat
, which is not using your node and that is why you are getting error, if you change your command to--network localhost
it will work properly.