Deploying to a cleared local hardhat node should ignore previous deployment #650
Labels
status:needs-decision
We need to make a decision about this
type:improvement
An enhancement to an existing feature
Ignition treats deploying to a local Hardhat network node (chainId: 31337) like other networks. It creates deployment files under the
./ignition/deployments
folder.However, if the Hardhat node is stopped and restarted, then the deployment state will need to be wiped to allow for a redeployment of the module.
It would be better if, when deploying against a network with chainId 31337, Ignition automatically detects that the network node has restarted since the previous run. If the network node has restarted, the deployment should be reset with a complete wipe of the previous deployment state.
A potential approach
Pull the Hardhat node instance id if the network has chainId 31337:
Then to record that instance id against the deployment initialize message to the journal
On a rerun of the deployment, Ignition should compare the instance ids, if they differ, the deployment state should be cleared.
The text was updated successfully, but these errors were encountered: