Practical overview
When it fits
Use Hardhat when developing Ethereum smart contracts and you need compilation, deployment, testing or debugging in the development workflow.
Who it is for
- Ethereum developers working on smart contracts.
- Teams that need contract testing and debugging alongside compilation and deployment.
Documented uses
- Compile Solidity smart contracts.
- Deploy contracts in an Ethereum development workflow.
- Run Solidity and TypeScript tests, including fuzz testing for Solidity.
- Investigate contract execution failures using revert explanations and stack traces.
Requirements & limits
- The documented tool scope spans compilation, deployment, testing and debugging rather than focusing on only one stage.
- Testing support includes Solidity and TypeScript suites, with a described fuzz-testing workflow for Solidity.
- Debugging information includes actionable errors, revert explanations and Solidity stack traces.
- Hardhat is identified by the Nomic Foundation as open-source software.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Create and verify a Hardhat 3 project
Initialize a new Hardhat 3 project and check its setup with the help command or a test run.
Before you start
- Node.js v22.13.0 or later
- A package manager such as npm, pnpm, or Yarn
- A text editor
Steps
Create a project directory and change into it.
Initialize the project with the command below,
pnpm dlx hardhat --init, oryarn dlx hardhat --init; accept the defaults to create the recommended setup.npx hardhat --initVerify setup with the package-manager equivalent of
hardhat --help. Optionally, runhardhat testto try a complete test run.
Expected outcome
A new Hardhat 3 project is initialized with dependencies and a sample structure; the help command checks the setup, and the optional test command tries the project test run.
Guide limitations
- The default initialization creates the documented recommended setup; Hardhat can also be customized through plugins.
- The guide does not describe deploying the generated project.
Set up slang-solx for building and testing
Configure the hardhat-slang-solx plugin as a dedicated Build Profile, then use that profile to build and test contracts.
Before you start
- An existing Hardhat project with a
hardhat.config.tsfile - A package manager such as npm, pnpm, or Yarn
- Contracts with pragmas compatible with the profile’s supported Solidity version; the documented example uses
0.8.34
Steps
Install
@nomicfoundation/hardhat-slang-solxas a development dependency using npm, pnpm, or Yarn.Import the plugin in
hardhat.config.tsand add it to thepluginslist.Add a
slang-solxSolidity Build Profile withtype: "slang-solx"and a supported version such as0.8.34.Build with
hardhat build --build-profile slang-solx, then optionally run tests withhardhat test --build-profile slang-solx, using the equivalent command for your package manager.
Expected outcome
Hardhat uses slang-solx for compatible contracts and tests when the `slang-solx` Build Profile is selected; its build output identifies the compiler used.
Guide limitations
- slang-solx is under heavy development and is not recommended for production-network deployments.
- The documented version mapping lists slang-solx
0.1.8for Solidity0.8.34; unsupported compiler versions or incompatible pragmas can cause builds to fail. - By default, the
slang-solxtype is only allowed in theslang-solxprofile; using it in other profiles causes a validation error.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 7 October 2026

