Skip to content

The difference between "yarn hardhat deploy" and "yarn hardhat run scripts/deploy.js" #2657

Answered by alymurtazamemon
wxy-sudo asked this question in Q&A
Discussion options

You must be logged in to vote

@wxy-sudo

The yarn hardhat deploy command is coming from basically the hardhat-deploy dependency, which runs all of the deploy scripts that are placed inside the deploy folder of the project. It also ensures that those scripts deploy when we run tests through fixtures.

yarn hardhat run scripts/deploy.js is basically a hardhat dependency command that runs only the scripts that we give it through a path like scripts/deploy.js

Hardhat Deploy
It is a copy/paste from docs for quick reading.

Before going into the details, here is a very simple summary of the basic feature of hardhat-deploy.

hardhat-deploy allows you to write deploy scripts in the deploy folder. Each of these files that look as …

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
2 replies
@alymurtazamemon
Comment options

@wxy-sudo
Comment options

Answer selected by wxy-sudo
Comment options

You must be logged in to vote
1 reply
@wxy-sudo
Comment options

Comment options

You must be logged in to vote
3 replies
@wxy-sudo
Comment options

@wxy-sudo
Comment options

@krakxn
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants