LESSON 7: UPLOAD THE DEPLOY TASK, BUT DONT APPEAR ON TASK LIST #5397
-
Operating System Describe the bug: Hi all, I am running the command to add hardhat-deploy dependency "yarn add --dev hardhat-deploy" it upload it without give me error. However, when I run "yarn hardhat" to check the task. The deploy task is not included: PS C:\Users\K\hh-fcc\hardhat-fund-me3-fcc> yarn hardhat
yarn run v1.22.19
warning package.json: No license field
$ C:\Users\K\hh-fcc\hardhat-fund-me3-fcc\node_modules\.bin\hardhat
Hardhat version 2.14.0
Usage: hardhat [GLOBAL OPTIONS] <TASK> [TASK OPTIONS]
GLOBAL OPTIONS:
--config A Hardhat config file.
--emoji Use emoji in messages.
--flamegraph Generate a flamegraph of your Hardhat tasks
--help Shows this message, or a task's help if its name is provided
--max-memory The maximum amount of memory that Hardhat can use.
--show-stack-traces Show stack traces (always enabled on CI servers).
--tsconfig A TypeScript config file.
--typecheck Enable TypeScript type-checking of your scripts/tests
--verbose Enables Hardhat verbose logging
--version Shows hardhat's version.
AVAILABLE TASKS:
check Check whatever you need
clean Clears the cache and deletes all artifacts
compile Compiles the entire project, building all artifacts
compile:solidity:get-compilation-job-for-file
compile:solidity:get-compiler-input
console Opens a hardhat console
coverage Generates a code coverage report for tests
flatten Flattens and prints contracts and their dependencies. If no file is passed, all the contracts in the project will be flattened.
help Prints this message
node Starts a JSON-RPC server on top of Hardhat Network
run Runs a user-defined script after compiling the project
test Runs mocha tests
typechain Generate Typechain typings for compiled contracts
verify Verifies contract on Etherscan
To get help for a specific task run: npx hardhat help [task]
Done in 2.29s. here below my "hardhat-deploy.js": require("@nomiclabs/hardhat-waffle")
require("hardhat-gas-reporter")
require("@nomiclabs/hardhat-etherscan")
require("dotenv").config()
require("solidity-coverage")
require("hardhat-deploy")
// You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn more
/**
* @type import('hardhat/config').HardhatUserConfig
*/
const COINMARKETCAP_API_KEY = process.env.COINMARKETCAP_API_KEY || ""
const SEPOLIA_RPC_URL =
process.env.SEPOLIA_RPC_URL ||
"https://eth-sepolia.g.alchemy.com/v2/YOUR-API-KEY"
const PRIVATE_KEY =
process.env.PRIVATE_KEY ||
"0x11ee3108a03081fe260ecdc106554d09d9d1209bcafd46942b10e02943effc4a"
const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY || ""
module.exports = {
defaultNetwork: "hardhat",
networks: {
hardhat: {
chainId: 31337,
// gasPrice: 130000000000,
},
sepolia: {
url: SEPOLIA_RPC_URL,
accounts: [PRIVATE_KEY],
chainId: 11155111,
blockConfirmations: 6,
},
},
solidity: {
compilers: [
{
version: "0.8.7",
},
{
version: "0.6.6",
},
],
},
etherscan: {
apiKey: ETHERSCAN_API_KEY,
// customChains: [], // uncomment this line if you are getting a TypeError: customChains is not iterable
},
gasReporter: {
enabled: true,
currency: "USD",
outputFile: "gas-report.txt",
noColors: true,
// coinmarketcap: COINMARKETCAP_API_KEY,
},
namedAccounts: {
deployer: {
default: 0, // here this will by default take the first account as deployer
1: 0, // similarly on mainnet it will take the first account as deployer. Note though that depending on how hardhat network are configured, the account 0 on one network can be different than on another
},
},
mocha: {
timeout: 500000,
},
} Any clue how can I solve this issue? Thank |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
@cryptocambi It seems correct, it should show it. Please leave your repository link so I can test it locally. |
Beta Was this translation helpful? Give feedback.
-
Hi Ali,
Sorry the late reply, here below you can find the link of my repository:
https://github.com/cryptocambi/haedhat-fund-me3-fcc
Thank,
Kiflom
…On Mon, 1 May 2023 at 09:12, Ali Murtaza ***@***.***> wrote:
@cryptocambi <https://github.com/cryptocambi> It seems correct, it should
show it. Please leave your repository link so I can test it locally.
—
Reply to this email directly, view it on GitHub
<#5397 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A4HG4OVX2CQXEE5DJVWL6QTXD5O6JANCNFSM6AAAAAAXQHGYW4>
.
You are receiving this because you were mentioned.Message ID:
<smartcontractkit/full-blockchain-solidity-course-js/repo-discussions/5397/comments/5769711
@github.com>
|
Beta Was this translation helpful? Give feedback.
-
Hi Ali,
I just noticed it, is not this the file. I reckon I deleted it.
Actually I started again with a new file, I am adding all the dependencies
since I did not have the "create advance project" option.
I am following step by step the tutorial and copy and paste from github. I
understand all the concepts, I check if I am able to make it work like
that.
Get back to you in case I have got issue.
Thank you very much for your support. To know that I have support make the
learning curve less frustrating when you run out of solutions.
Thank,
Kiflom
…On Wed, 3 May 2023 at 19:07, Ali Murtaza ***@***.***> wrote:
@cryptocambi <https://github.com/cryptocambi> the hardhat.config.js file
you showed and the one you provide are totally different and there were no
hardhat-deploy added. it is showing now you can see below.
[image: Screenshot 2023-05-03 at 10 05 02 PM]
<https://user-images.githubusercontent.com/56123405/235988992-d1509b68-90e0-4926-83b7-84876e4e210e.png>
—
Reply to this email directly, view it on GitHub
<#5397 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A4HG4OW2ODXOQ3IXXR5FUZDXEKGDRANCNFSM6AAAAAAXQHGYW4>
.
You are receiving this because you were mentioned.Message ID:
<smartcontractkit/full-blockchain-solidity-course-js/repo-discussions/5397/comments/5793688
@github.com>
|
Beta Was this translation helpful? Give feedback.
@cryptocambi the hardhat.config.js file you showed and the one you provide are totally different and there were no hardhat-deploy added. it is showing now you can see below.