Hardhat
Last updated
Last updated
is an Ethereum development environment. Compile your contracts and run them on a development network. Get Solidity stack traces, console.log and more.
You can use Hardhat to edit, compile, debug, and deploy your smart contracts to Mint.
Create a directory for your project:
Initialize the project, which will create a package.json
file
Install Hardhat
Create a project
Create an empty hardhat.config.js
and install the Ethers plugin to use the Ethers.js library to interact with the network.
Create a contracts
directory
Create your_contract.sol
file in contracts
directory
Modify the Hardhat configuration file and create a secure file to store your private key in.
Create a secrets.json
file to store your private key
Add your private key to secrets.json
Add the file to your project’s .gitignore
, and never reveal your private key.
Modify the hardhat.config.js
file
Import the Ethers.js plugin
Import the secrets.json
file
Inside the module.exports
add the FlexNet TestNet network configuration