hardhat3-dev

Configure Hardhat 3 projects with ESM, Viem, and Ignition deployments.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/mashharuki/flare-sample --skill hardhat3-dev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: hardhat3-dev
Source: https://github.com/mashharuki/flare-sample/tree/main/.claude/skills/hardhat3-dev
Command: npx skills add https://github.com/mashharuki/flare-sample --skill hardhat3-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Provides clear, up-to-date guidance and patterns to eliminate confusion and errors when initializing, testing, configuring, and deploying smart contract projects on Hardhat 3, especially for teams migrating from Hardhat 2 or adopting Viem and Ignition workflows.

Core Features & Use Cases

  • Project Initialization & ESM Setup: Correctly create ESM-first hardhat.config.ts, set package.json type, and adjust tsconfig for node16 compatibility.
  • Testing Workflows: Author and run Foundry-compatible Solidity (.t.sol) tests and Viem + node:test TypeScript tests, including fixtures, event assertions, fuzzing, and invariant tests.
  • Ignition Deployments & Multi-Chain Simulation: Build declarative Ignition modules, manage deployments, proxies, and run edr-simulated multi-chain local networks for deterministic testing.
  • Migration & Best Practices: Step-by-step migration from Hardhat 2 to 3, plugin registration via plugins array, network.connect usage, and secure configVariable handling for secrets.
  • Cheatcodes & Deterministic Testing: Use vm.* cheatcodes, snapshots, forks, and networkHelpers reliably in both Solidity and TypeScript tests for robust test suites.

Quick Start

Create a new Hardhat 3 project configured for ESM with Viem + node:test, add an Ignition deploy module, and run a Solidity and TypeScript test suite on a local edr-simulated network.

Frequently Asked Questions about hardhat3-dev

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate from Hardhat 2 to Hardhat 3?▼

Setting up an ESM hardhat.config.ts in Hardhat 3 involves configuring package.json with type module and adjusting tsconfig for node16 compatibility. You must use ESM declarative configuration to correctly initialize your smart contract project.

How do I run Solidity tests in Hardhat 3?▼

You run Foundry-compatible Solidity .t.sol tests directly in Hardhat 3 for robust test suites. This workflow supports fuzzing, invariant tests, and event assertions alongside standard TypeScript testing using Viem and node:test.

Does Hardhat 3 support multi-chain local network simulation?▼

Hardhat 3 supports running edr-simulated multi-chain local networks for deterministic testing. You can use network.connect usage and extensive vm.* cheatcodes to reliably manage snapshots and forks across these simulated networks.

What is the best way to deploy contracts using Hardhat Ignition?▼

The best way to deploy with Hardhat Ignition is building declarative Ignition modules to manage deployments and proxies. This approach integrates directly with Hardhat 3 to safely ship contracts and handle secure configVariable management for secrets.

Why does my Hardhat 3 TypeScript test fail to recognize Viem fixtures?▼

TypeScript test failures with Viem fixtures often stem from incorrect ESM setup or missing node:test integration. Ensure your hardhat.config.ts is properly configured for ESM and that you are using networkHelpers reliably for deterministic simulation.