An overview of hardhat, a smart contract development framework
npx hardhat init
, which provides a set of options to bootstrap a Hardhat project:
@nomicfoundation/hardhat-toolbox
package that contains some of the most used Hardhat plugins.
task
folder.
It is important to mention that all these paths are fully configurable in the hardhat.config.ts
file. You can specify a different folder for the contracts, such as src
.
hardhat.config.ts
file.
Since the project uses Typescript, you have the benefit of using static typing.
The following is the default configuration:
Lock.sol
.
To run your first command, enter npx hardhat compile
, which compiles the smart contracts and generates the correct artifacts that includes the bytecode and ABI.
After running the npx hardhat compile
command, you should see a new folder named artifacts. This folder contains each contract name as a folder and a
{ContractName}.json
file.