Skip to content

chore(deps): migrate contracts toolchain to Hardhat 3 #1048

@alainncls

Description

@alainncls

Summary

Upgrade the contracts development toolchain to the latest eligible major versions older than 3 days as of 2026-04-23:

  • hardhat 2.28.6 -> 3.4.0
  • @nomicfoundation/hardhat-toolbox 6.1.2 -> 7.0.0
  • @nomicfoundation/hardhat-ethers 3.1.3 -> 4.0.8
  • @nomicfoundation/hardhat-foundry 1.2.1 -> 3.0.1

Why this is not in the current dependency bump PR

The current PR only includes safe minor/patch updates and targeted overrides. This Hardhat migration is breaking and touches the contracts build system, plugin compatibility, runtime behavior, and test/deployment flows.

Documentation

Expected codebase changes

  • Review contracts/hardhat.config.ts and any custom tasks/scripts for Hardhat 3 API changes.
  • Re-check plugin compatibility for Toolbox, Ethers, Foundry integration, and verification.
  • Revalidate generated artifacts and any assumptions around build-info output.
  • Revisit dependency overrides related to hardhat, undici, and related transitive packages.
  • Re-assess the remaining uuid audit path coming from contracts>hardhat>uuid after the migration.

Migration plan

  1. Move the Hardhat core package to 3.4.0 and align the official plugin versions listed above.
  2. Update config/task usage to the Hardhat 3 APIs and resolve any compile/runtime breaks.
  3. Remove obsolete overrides and keep only the ones still required after the toolchain upgrade.
  4. Reinstall and verify whether the uuid audit path is reduced or removed.
  5. Update any CI or local workflow assumptions if artifact names or build metadata change.

Validation checklist

  • Run the contracts test suite end-to-end.
  • Re-run any deployment or verification scripts that rely on Hardhat plugins.
  • Run pnpm audit and compare the contracts audit paths before/after the migration.
  • Confirm there is no regression in local developer workflows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ContractsTicket impacting the contractsTech DebtdependenciesPull requests that update a dependency file

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions