lesson 6 : failed to run deploy.js using ( yarn hardhat run scripts/deploy.js ) #4920
Answered
by
paulcoffee85
tiwariji99
asked this question in
Q&A
-
I have wriiten code given below in vscode : //imports
const {ethers}=require("hardhat");
//async main
async function main(){
const SimpleStorageFactory= await ethers.getContractFactory(
"SimpleStorage");
console.log("deploying contract ...");
const Simplestorage= await SimpleStorageFactory.deploy();
await Simplestorage.deployed();
}
main()
.then(()=> process.exit(0))
.catch((error)=>{
console.error(error)
process.exit(1)
}); and getting the error : HardhatError: HH700: Artifact for contract "SimpleStorage" not found. Did you mean "Simplestorage"?
at Artifacts._handleWrongArtifactForContractName (C:\Users\HP\hardhat-simple-storage-fcc\node_modules\hardhat\src\internal\artifacts.ts:702:11)
at Artifacts._getArtifactPathFromFiles (C:\Users\HP\hardhat-simple-storage-fcc\node_modules\hardhat\src\internal\artifacts.ts:827:19)
at Artifacts._getArtifactPath (C:\Users\HP\hardhat-simple-storage-fcc\node_modules\hardhat\src\internal\artifacts.ts:507:21)
at Artifacts.readArtifact (C:\Users\HP\hardhat-simple-storage-fcc\node_modules\hardhat\src_modules\@nomiclabs\hardhat-ethers\src\internal\helpers.ts:99:22)
at main (C:\Users\HP\hardhat-simple-storage-fcc\scripts\deploy.js:10:30)error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. I have already tried to run : |
Beta Was this translation helpful? Give feedback.
Answered by
paulcoffee85
Feb 24, 2023
Replies: 1 comment 2 replies
-
Which folder is your SimpleStorage.sol in ?? Also looks like you mispelled |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
tiwariji99
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Which folder is your SimpleStorage.sol in ?? Also looks like you mispelled
simpleStorage
with small 's'SimpleStorage
.