wighawag / hardhat-deploy

hardhat deployment plugin
MIT License
1.19k stars 292 forks source link

Error: No Deployment found for: #362

Closed 0xTimepunk closed 2 years ago

0xTimepunk commented 2 years ago

Describe the bug If I run await deployments.all() in one of my tests it doesn't return some of the contract deployments, even though I call the correct fixtures before and all the files are properly tagged in the deploy folder.

The error reads as Error: No deployment found for: Contract_Name

I also know the fixtures are being ran, because If I console.log in any of them I see the log in the console.

I also got the deploy folder properly marked within the hardhatnetwork

Note: Running npx hardhat deploy or npx hardhat node runs all the deployment scripts correctly, so I know all are being ran. So why does await deployments.get('Contract_Name') throw an error when I run hardhat test on my test file??

To Reproduce Hard to reproduce, no ideas here. It seems random

Expected behavior All the files inside my given deploy folder to be obtained in the tests versions