Hardhat is a popular development framework for compiling, testing, and deploying Solidity smart contracts. Since Moonbeam is Ethereum compatible, with a few lines of extra configuration, you can use Hardhat as you normally would to develop on Moonbeam.
Configure Hardhat to Connect to Moonbeam¶
To get started with Hardhat you must have an npm project. If you do not yet have one, to create one you can run:
Once you have a npm project, install Hardhat:
npm install hardhat
Then to create a Hardhat config file in your project, run:
hardhat.config.js file, add network configurations for a Moonbeam development node and the Moonbase Alpha TestNet:
If you are interested in a more detailed step-by-step guide, check out our specific tutorial about using Hardhat with Moonbeam.