Skill 2.3.1

Compile contracts with solc, Remix and Hardhat and interpret the outputs

Key Concepts

solc is the Solidity compiler, available as a native binary and as solc-js for JavaScript. Most developers use it through tools: the Remix Solidity Compiler panel compiles in the browser, and npx hardhat build (or compile, or any task such as test) downloads the configured compiler and compiles every file under contracts/.

The main outputs are the ABI, a JSON list of functions, events and errors with their types, and the bytecode. The creation bytecode runs the constructor and returns the runtime bytecode, which is what is stored at the contract address. Hardhat writes these into artifact files under artifacts/; Remix shows them in the compilation details. The compiler also produces metadata, which records the compiler version and settings and is used for source verification.