Skip to content

feat: make the demo re-runnable (just reset) + document Ignition reconciliation - #5

Open
Equious wants to merge 1 commit into
mainfrom
fix/rerunnable-demo
Open

feat: make the demo re-runnable (just reset) + document Ignition reconciliation#5
Equious wants to merge 1 commit into
mainfrom
fix/rerunnable-demo

Conversation

@Equious

@Equious Equious commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Problem

The flow isn't cleanly re-runnable. On a second just all (or just setupjust attack), hardhat-ignition aborts at the Attacker deploy:

Error HHE10120 in plugin hardhat-ignition: ... reconciliation errors:
  * Attacker#Attacker: Argument at index 0 has been changed

Ignition keys deployments by a fixed ID and refuses to reconcile when a constructor arg changes between runs. VulnerableVault is deployed via BattleChainDeployer (CREATE, nonce-based) so it gets a new address every run, and that address is the Attacker'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

  • Add a just reset recipe that clears local deployment state (ignition/deployments/ + .bc_deployments.json).
  • Document re-running in the README (note added in the "full flow" section).

Both are gitignored already, so reset only removes local artifacts. No change to the happy-path first run.

just reset
NETWORK=battlechain just all   # clean re-run

🤖 Generated with Claude Code

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant