100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace
Programming

Setting Up Remix and Hardhat

Learn the two most common Solidity development environments: the browser-based Remix IDE for quick experiments and the Node.js-based Hardhat framework for professional project workflows.

FoundationsBeginner9 min readJul 10, 2026
Analogies

Two Tools, Two Purposes

Solidity developers generally reach for one of two environments. Remix is a browser-based IDE hosted at remix.ethereum.org that requires zero installation: you open a tab, write a contract, compile it, and deploy it to an in-browser virtual chain within minutes. Hardhat is a Node.js command-line framework you install locally with npm; it manages compilation, a local blockchain, automated testing, scripting, and deployment across real networks. A common workflow is to prototype and debug small ideas in Remix, then move serious projects into Hardhat where version control, tests, and reproducible builds matter.

🏏

Cricket analogy: Remix is like backyard net practice you can start instantly, while Hardhat is like a full stadium training setup with coaches, analysts, and video review for a Test series.

Getting Started with Remix

Remix's power comes from immediacy and visibility. The Solidity Compiler panel lets you pick a compiler version and see warnings and errors inline, while the Deploy & Run Transactions panel provides several environments, most notably the Remix VM, an in-memory blockchain seeded with test accounts holding fake ether. You can call functions with a single click, inspect return values, and read emitted events without writing any test harness. This makes Remix ideal for learning syntax, reproducing bugs, and demonstrating a contract, though its lack of file-based version control and reproducible tooling limits it for large codebases.

🏏

Cricket analogy: Like a bowling machine that feeds you deliveries instantly so you can groove your cover drive, Remix feeds you instant deploys so you can groove your contract logic.

Scaffolding a Hardhat Project

Hardhat turns a folder into a full Solidity project. After installing Node.js, you initialize a project with npm and run npx hardhat init to scaffold folders for contracts, tests, and deployment scripts alongside a hardhat.config.js file. That config declares the Solidity compiler version and network settings, including RPC URLs and private keys for testnets like Sepolia. Running npx hardhat compile produces artifacts, npx hardhat test runs your JavaScript or TypeScript tests against a built-in local network, and deployment scripts push contracts to whichever network you target. Because everything lives in files, the whole project is version-controllable and reproducible for a team.

🏏

Cricket analogy: Like setting up a full training camp with nets, pitches, and a fixture list before a tour, hardhat init lays out contracts, tests, and scripts before you build.

bash
# Create and enter a project folder
mkdir my-dapp && cd my-dapp

# Initialize an npm project and install Hardhat
npm init -y
npm install --save-dev hardhat

# Scaffold the project (choose a JavaScript or TypeScript project)
npx hardhat init

# Compile contracts and run the test suite
npx hardhat compile
npx hardhat test

Hardhat ships with a built-in local Ethereum network that starts automatically when you run tests. It provides funded accounts and detailed error messages, including Solidity console.log output, which makes debugging far easier than on a live network.

Never hardcode a real private key or seed phrase directly into hardhat.config.js or commit it to Git. Load secrets from environment variables (for example via a .env file that is gitignored) to avoid leaking keys that control real funds.

  • Remix is a zero-install browser IDE ideal for quick experiments, learning, and reproducing bugs.
  • The Remix VM is an in-browser blockchain with pre-funded test accounts for instant deployment.
  • Hardhat is a Node.js framework for professional projects with compilation, testing, and deployment.
  • npx hardhat init scaffolds contracts, tests, and scripts plus a hardhat.config.js file.
  • Hardhat's built-in local network powers fast automated tests and console.log debugging.
  • Everything in a Hardhat project is file-based, so it is version-controllable and reproducible.
  • Never commit real private keys; load secrets from gitignored environment variables.

Practice what you learned

Was this page helpful?

Topics covered

#Programming#SolidityStudyNotes#SettingUpRemixAndHardhat#Setting#Remix#Hardhat#Two#StudyNotes#SkillVeris#ExamPrep