Skip to content

Migrate local forks to Anvil - #2999

Open
clement-ux wants to merge 1 commit into
chore/introduce-standalone-ops-clifrom
chore/migrate-local-node-to-anvil
Open

Migrate local forks to Anvil#2999
clement-ux wants to merge 1 commit into
chore/introduce-standalone-ops-clifrom
chore/migrate-local-node-to-anvil

Conversation

@clement-ux

@clement-ux clement-ux commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Plain-English summary

After #2998, operational commands no longer need Hardhat. One active Hardhat job remains: starting a local blockchain or a fork of a live network for development and simulation.

This PR replaces that node with Anvil. The previous Hardhat node is kept temporarily as a comparison tool so we can generate the same Safe transaction with both implementations and compare the important fields before deleting Hardhat.

Before and after

Before: scripts/tests → Hardhat node → forked network
After:  scripts/tests → Anvil       → forked network

For Safe batches, both paths are run and compared on:

  • chainId
  • to
  • value
  • data

Gas estimates and metadata are intentionally ignored because they are node-specific and do not change the transaction's meaning.

What changes in this PR

  • make Anvil the canonical local/forked node for mainnet, Arbitrum, Base, Sonic, Plume, Hoodi, and HyperEVM;
  • connect Brownie to external Anvil networks;
  • migrate impersonation, balance, and code-mutation calls to anvil_* RPC methods;
  • preserve the previous node wrapper as hardhat-node.sh for temporary A/B comparison;
  • add the Safe batch comparator;
  • add Anvil, Brownie bridge, and Safe payload comparison tests.

What does not change yet

Stack and merge order

Base: #2998 (chore/introduce-standalone-ops-cli)

  1. Remove obsolete historical scripts and artifacts #2997 — remove obsolete historical scripts and artifacts
  2. Introduce standalone ops CLI #2998 — introduce standalone ops CLI
  3. Migrate local forks to Anvil #2999 — migrate local forks to Anvil (this PR)
  4. Remove the Hardhat runtime #3000 — remove the Hardhat runtime

Merge in cascade: #3000#2999#2998#2997master.

What to review

Please focus on node and simulation parity:

  • does each supported network use the correct chain ID and fork configuration?
  • are impersonation, balance changes, and code changes translated to the correct Anvil RPC methods?
  • does Brownie connect to the external node correctly?
  • does the Safe comparator check all fields that determine transaction meaning?

Validation

  • pnpm test:tasks — 38 passing
  • pnpm test:anvil — 3 passing
  • pnpm test:brownie — 4 passing
  • pnpm test:scripts — 66 passing
  • pnpm test:layouts — 11 passing
  • pnpm typecheck
  • pnpm lint:js, pnpm lint:ts, pnpm prettier:check
  • full GitHub CI passes

@clement-ux
clement-ux force-pushed the chore/migrate-local-node-to-anvil branch from 866e970 to 45a4542 Compare September 1, 2026 08:04
@clement-ux
clement-ux force-pushed the chore/migrate-local-node-to-anvil branch from 45a4542 to 1f72c9a Compare September 1, 2026 08:25
@clement-ux clement-ux self-assigned this Sep 1, 2026
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