Skip to content

getContract() => No contract deployed with name ... #5408

Answered by Nlferu
wolf3i asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @WolfgangNI

If you want to test this on local network you should do below:

  1. Type yarn hardhat node to run your local network.
  2. To run any script using that local network type 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.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@wolf3i
Comment options

@Nlferu
Comment options

Answer selected by wolf3i
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants