feat: make the demo re-runnable (just reset) + document Ignition reconciliation - #5
Open
Equious wants to merge 1 commit into
Open
feat: make the demo re-runnable (just reset) + document Ignition reconciliation#5Equious wants to merge 1 commit into
Equious wants to merge 1 commit into
Conversation
hardhat-ignition keys deployments by a fixed ID and refuses to reconcile when a
constructor argument changes between runs. Because `VulnerableVault` redeploys to
a fresh address each run and that address is the `Attacker`'s constructor arg, a
second `just all` (or `just setup` + `just attack`) fails with:
Attacker#Attacker: Argument at index 0 has been changed
Add a `reset` recipe that clears the local deployment state
(`ignition/deployments/` + `.bc_deployments.json`) and a README note so the flow
is cleanly re-runnable.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The flow isn't cleanly re-runnable. On a second
just all(orjust setup→just attack), hardhat-ignition aborts at the Attacker deploy:Ignition keys deployments by a fixed ID and refuses to reconcile when a constructor arg changes between runs.
VulnerableVaultis deployed viaBattleChainDeployer(CREATE, nonce-based) so it gets a new address every run, and that address is theAttacker's constructor arg — so the second run always trips the reconciliation guard. First run is fine; re-runs break.Hit live while re-running the flow against testnet.
Fix
just resetrecipe that clears local deployment state (ignition/deployments/+.bc_deployments.json).Both are gitignored already, so
resetonly removes local artifacts. No change to the happy-path first run.just reset NETWORK=battlechain just all # clean re-run🤖 Generated with Claude Code