Skip to main content
Hardhat 3 is a development environment for compiling, testing, deploying, and verifying smart contracts. You can start with the Monad template or add Monad to an existing Hardhat 3 project.
Hardhat 3 requires Node.js v22.13.0 or later.
Choose one setup path:
  • New project: Clone the Monad template and work inside the cloned repository.
  • Existing project: Do not clone the template into your project. Merge only the configuration shown below into your existing hardhat.config.ts.

Start with the Monad template

The Monad Hardhat 3 template includes:
  • Monad Testnet and Mainnet network configuration
  • Foundry-compatible Solidity tests and TypeScript tests using node:test
  • Viem for TypeScript interactions
  • Hardhat Ignition deployment modules
  • Sourcify and MonadScan contract verification
Clone and test the template:
See the template’s README for local, Testnet, and Mainnet deployment commands.

Configure an existing Hardhat 3 project

Merge the following compiler and network settings into your hardhat.config.ts. Keep any plugins and other project-specific settings already in the file.
Never put a private key directly in hardhat.config.ts or commit it to version control. Provide PRIVATE_KEY through Hardhat’s configuration variable system, using the PRIVATE_KEY environment variable or the Hardhat keystore.
The prague EVM target is required when compiling contracts for Monad. For the canonical RPC URLs, chain IDs, and explorer URLs, see Network Information and Network Information - Testnet. Confirm the updated project still compiles and passes its tests:

Deploy and verify