![Forrest logo](/images/logo.png)
hardhat:tldr:8af57
The "hardhat compile" command is an instruction given in a command-line interface (CLI) tool called Hardhat. Hardhat is specifically designed for Ethereum and other Ethereum-compatible blockchains.
The "hardhat compile" command tells Hardhat to compile the smart contracts present in your project.
When you develop smart contracts, you typically write them in a high-level programming language like Solidity. However, for Ethereum nodes to understand and execute these contracts, they need to be compiled into a lower-level language called Ethereum Virtual Machine (EVM) bytecode.
The "hardhat compile" command takes care of this compilation process. It gathers all the smart contracts in your project, compiles them individually into EVM bytecode, and stores the resulting contract artifacts in a designated folder.
These contract artifacts contain information such as the contract's ABI (Application Binary Interface), address, and other metadata that are useful for interacting with the contracts from external applications.
By running the "hardhat compile" command, you ensure that your smart contracts are compiled and ready to be deployed onto the Ethereum network or used in your decentralized applications (DApps).