hardhat – How to Deploy Specific Scripts Using Hardhat-Deploy

hardhathardhat-deploy

I have hardhat setup for a project, whose inital setup is to deploy the whole project e.g

01-deploy-timelock
02-deplot-governance-token
03-deploy-governance.

I would like to create a new script for upgrading the governance token e.g

04 upgrade-governance, however I don't want to run the other deploy scripts, How can I run a specific deploy script in react?

Best Answer

I'm using https://github.com/wighawag/hardhat-deploy as superior way to manage deployments

I've created tool to bootstrap my hardhat projects, inside there is a basic example of deployment, you can find it here: https://www.npmjs.com/package/hardhat-create-app

Its worth nothing that you can specify dependencies of deployments, as well as tags for each deployment (both are very handy): https://github.com/wighawag/hardhat-deploy#deploy-scripts-tags-and-dependencies

Tag usage:

npx hardhat deploy --tags YOUR_TAG

You can also use multiple tags separated by a comma

Related Topic