Replies: 2 comments
-
The "Could not find target contract" error usually indicates that the script cannot locate the contract it's supposed to deploy. you should Check Contract Path to Ensure that the path to your contract file is correct. Double-check that DeploySimpleStorage.s.sol is in the Verify Contract Name to Make sure the contract name in your script matches the actual contract name in the Solidity file. Clear Previous Builds because Sometimes, old build artifacts can cause issues. Try clearing your build directory with forge clean and then rebuild with forge build. Check Imports to Ensure that all necessary imports in your contract are correct and that there are no missing files |
Beta Was this translation helpful? Give feedback.
-
Thanks for the heads-up @5hr1ganesh |
Beta Was this translation helpful? Give feedback.
-
I am trying to deploy a contract to anvil on foundry in my vs code terminal after running
forge script script/DeploySimpleStorage.s.sol
command but it shows me this. what could possibly be wrong and how do I come up with a solution? By the way I'm using windows OS.
Beta Was this translation helpful? Give feedback.
All reactions