Smart contract deployment #784
-
Hello community, I got this problem when I run this in my console antoniopucciarelli@DELL:~/Desktop/myContract$ yarn hardhat run scripts/printoutData.js
yarn run v1.22.19
warning package.json: No license field
$ /home/antoniopucciarelli/Desktop/myContract/node_modules/.bin/hardhat run scripts/printoutData.js
💻 Deployer address: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
Error: No Contract deployed with name printout
at Object.getContract (/home/antoniopucciarelli/Desktop/myContract/node_modules/@nomiclabs/hardhat-ethers/src/internal/helpers.ts:447:11)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at main (/home/antoniopucciarelli/Desktop/myContract/scripts/printoutData.js:14:28)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. The contract is related to the YouTube lectures. You can find all the contract/files here: https://github.com/antoniopucciarelli/smartContract-test Cheers |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 11 replies
-
Okay, so: To deploy contracts on a local network, we SHOULD be using Mocks as Patrick explains in the video. I have given my version of the code for your interpretation of how it works to get a rough idea as to what to establish in your project. Hope this helps! My code:
|
Beta Was this translation helpful? Give feedback.
-
Try this in
|
Beta Was this translation helpful? Give feedback.
-
@antoniopucciarelli You are not deploying the contract in the script. Check out the hardhat-simple-storage-fcc repo or that part from the video. |
Beta Was this translation helpful? Give feedback.
@antoniopucciarelli You are not deploying the contract in the script.
Check out the hardhat-simple-storage-fcc repo or that part from the video.