PatrickAlphaC / hardhat-fund-me-fcc

82 stars 183 forks source link

No Contract deployed with name FundMe , Keep getting the same error from prev issue #67

Closed technqvi closed 2 years ago

technqvi commented 2 years ago

I refer to https://github.com/PatrickAlphaC/hardhat-fund-me-fcc/issues/63 I keep getting the same error this is what I've done as your recommendation.

my2-fund_me-hh\deployments\localhost , this folder contain deployed files completely as figure below.

image

The problem is about node_modules\@nomiclabs\hardhat-ethers\src\internal\helpers.ts:447:11)

But if I deploy to Ganache or TestNet, It works well.

this is my enviroment on window laptop node=v16.15.0 npx=1.22.19 yarn=8.5.5 hardhat =2.9.7

This is error on VS Code

Once I start the hardhat node , it deployed all of the files in the deploy folder

  1. run yarn hardhat node ` D:\BC-World\BC-Dev\WEB3_JS\Patrick-JSLab\my2-fund_me-hh>yarn hardhat node yarn run v1.22.19 $ D:\BC-World\BC-Dev\WEB3_JS\Patrick-JSLab\my2-fund_me-hh\node_modules.bin\hardhat node Nothing to compile Local network detected! Deploying mocks... deploying "MockV3Aggregator" (tx: 0x2f60bd4cba5dffe33cd22380f4891cfadb7f13aad763bb084e8a1c3336b892f9)...: deployed at 0x5FbDB2315678afecb367f032d93F642f64180aa3 with 569635 gas Mocks Deployed!

    You are deploying to a local network, you'll need a local network running to interact Run (npx hardhat console) to interact with the deployed smart contracts!

    31337 Get MockV3Aggregator for fake price feed. deploying "FundMe" (tx: 0x24bdce76b4c5093ca6c0383261efdb88f061990bc2fb1bb40a37287d724abfcf)...: deployed at 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512 with 1058239 gas FundMe deployed at 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512 Started HTTP and WebSocket JSON-RPC server at http://127.0.0.1:8545/

Accounts

WARNING: These accounts, and their private keys, are publicly known. Any funds sent to them on Mainnet or any other live network WILL BE LOST.

Account #0: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 (10000 ETH) Private Key: 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80

`

  1. yarn hardhat run scripts/myfund.js

` yarn run v1.22.19 $ D:\BC-World\BC-Dev\WEB3_JS\Patrick-JSLab\my2-fund_me-hh\node_modules.bin\hardhat run scripts/myfund.js ### Error: No Contract deployed with name FundMe at Object.getContract (D:\BC-World\BC-Dev\WEB3_JS\Patrick-JSLab\my2-fund_me-hh\node_modules\@nomiclabs\hardhat-ethers\src\internal\helpers.ts:447:11) at main (D:\BC-World\BC-Dev\WEB3_JS\Patrick-JSLab\my2-fund_me-hh\scripts\myfund.js:10:18) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

`

PatrickAlphaC commented 2 years ago

Can you:

  1. Make this a discusson on the full repo? https://github.com/smartcontractkit/full-blockchain-solidity-course-js/
  2. Follow this section for formatting questions? https://www.youtube.com/watch?t=19846&v=gyMwXuJrbJQ&feature=youtu.be