Skip to content

hardhat-deploy-ethers not working within tasks (ethers.getContract) #1377

Answered by alymurtazamemon
0xCardiE asked this question in Q&A
Discussion options

You must be logged in to vote

@adriadrop In the deploy scripts and tests we get the deployed contracts with the help of fixtures that is the reason when you run deploy scripts or tests you do not face this. But tasks are separate things and when we run those we do not deploy contracts with them like deploy scripts and tests.

So for running tasks you need to run the hardhat node in another terminal, it will run the deploy scripts and all of the contracts will be available in tasks.

Replies: 1 comment 2 replies

Comment options

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

@0xCardiE
Comment options

Answer selected by alymurtazamemon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants