Expand ignition wipe
Describe the feature
-
Wipe module
-
hardhat ignition wipe chain-1 MyModule- it should wipe all the deployments, calls etc in the module. -
hardhat ignition wipe chain-1 MyModule --recursiveshould wipe the dependent modules ofMyModuleas well.
-
-
Wipe contract
- Implement
hardhat wipe chain-1 MyModule#MyContract --recursive. - this should wipe the dependencies of
MyModule#MyContract(if any) andMyModule#MyContractitself.
- Implement
Search terms
No response
Hey @olehmisar, can you help me understand the use case here better?
The way I see it, we have two ways to remove deployments right now:
- Using
ignition wipe, which is meant for removing individual futures as a troubleshooting mechanism. - Just deleting the whole
ignition/deployments/<chain>, which completely removes everything that you did with Ignition in that chain for the current project.
I understand that the first one is too fine-grained and the second one too coarse, and I can imagine us adding something more in-between. But I'm not sure that what you are proposing is the right thing to add. Describing your workflow (what you are doing and why you find yourself wanting to remove some parts of your deployments) would help us a lot to figure it out.
I also wonder if using explicit, different --deployment-ids would help, since that's a way to deploy a module "from scratch", which maybe is closer to what you want?
It is possible to use the --reset option of the ignition deploy task for quick redeploys during development, reset cleans the deployment state before deploying without the need to manually delete files or folders. It is not very granular though.
pnpm hardhat ignition deploy ignition/modules/Counter.ts --reset