hardhat-deploy-ethers not working within tasks (ethers.getContract) #1377
-
Wondering if it is possible to get hardhat-deploy-ethers working with hh tasks. I can get it working with getContractAt and passing in hex of contract but then this is not so practical and seems that then already deployed contracts are not auto fetchable or I miss some config? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
@adriadrop In the deploy scripts and tests we get the deployed contracts with the help of 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. |
Beta Was this translation helpful? Give feedback.
@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.