2

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?

2 Answers 2

2

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

2

I usually create hardhat task.

https://hardhat.org/hardhat-runner/docs/advanced/create-task

Task can be named and run what ever code you want. You can run a specific task with the command line.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.