-1
PS E:\Block Chain Projects\SET OOD> npx hardhat run --network Goerli deploy.js
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
HardhatError: HH700: Artifact for contract "mood" not found.
    at Artifacts._handleWrongArtifactForContractName (E:\Block Chain Projects\SET OOD\node_modules\hardhat\src\internal\artifacts.ts:478:11)
    at Artifacts._getArtifactPathFromFiles (E:\Block Chain Projects\SET OOD\node_modules\hardhat\src\internal\artifacts.ts:593:19)
    at Artifacts._getArtifactPath (E:\Block Chain Projects\SET OOD\node_modules\hardhat\src\internal\artifacts.ts:275:17)
    at Artifacts.readArtifact (E:\Block Chain Projects\SET OOD\node_modules\hardhat\src\internal\artifacts.ts:58:26)
    at getContractFactory (E:\Block Chain Projects\SET OOD\node_modules\@nomiclabs\hardhat-ethers\src\internal\helpers.ts:99:22)
    at main (E:\Block Chain Projects\SET OOD\deploy.js:4:18)

THIS IS THE ERROR WHY A I GETTING I AM UNABLE TO CREATE THE ARTIFACTS OR SAY THE HARDHAT IS UNABLE TO CREATE IT,AS FAR AS I KNOW npx hardhat compile gives the artifact files but it was not in this case

my mood.sol

my deploy.js

1 Answers1

2

Bruh Your Contract name is Mooddcontract and in the deploy.js you are writing mood.

Change const MOOD = await ethers.getContractFactory('mood') into const MOOD = await ethers.getContractFactory('Mooddcontract')

I hope that will solve that problem IA.

enter image description here

enter image description here

DevABDee
  • 180
  • 9