0PricingLogin
Web3 & DApp Development Fundamentals · Lesson

Compiling Contracts

Build artifacts.

Why Compile

Solidity source code cannot run on the EVM directly. The compiler turns .sol files into bytecode and an ABI that tools and clients use.

  • Bytecode — the low-level instructions deployed on-chain.
  • ABI — a JSON interface describing functions and events.

The Compile Task

Hardhat compiles every contract under contracts/ with a single command:

npx hardhat compile

Hardhat downloads the right solc version automatically, so you do not need to install the compiler manually.

npx hardhat compile

All lessons in this course

  1. Hardhat Setup
  2. Compiling Contracts
  3. Scripts and Tasks
  4. Local Network and Forking
← Back to Web3 & DApp Development Fundamentals