With Hardhat
Hardhat is a development environment to compile, deploy, test, and debug your Ethereum software.
Last updated
Hardhat is a development environment to compile, deploy, test, and debug your Ethereum software.
Last updated
There are a few dependencies to install before we start. Please install the following:
(comes with Node)
After installing the above dependencies, we can proceed to install hardhat:
To create your Hardhat project, run this command while you are in the project's root folder:
Return (choose the most appropriate option):
Let’s create the sample project and go through these steps to try out the sample task and compile, test and deploy the sample contract.
The sample project will ask you to install hardhat-waffle
and hardhat-ethers
, which makes Hardhat compatible with tests built with Waffle. You can learn more about it .
Hardhat will let you know how, but, in case you missed it, you can install them with
npm install --save-dev @nomiclabs/hardhat-waffle ethereum-waffle chai @nomiclabs/hardhat-ethers ethers
After setting up your truffle project, be it cloning a repository or initializing a new hardhat project
Open hardhat-config.js
Edit hardhat-config.js
with Pundi AIFX network credentials
Create a .env file to store your private key of that corresponding wallet address
The files below are just an example, feel free to rename your variables:
Run this command in root of the project directory:
Contract will be deployed on Pundi AIFX network, it will look something like this:
Remember your address would differ, the above is just to provide an idea of structure. Congratulations! You have successfully deployed Greeter Smart Contract. Now you can interact with the Smart Contract.
You can check the deployment status on .