🏠 Home
Beginner
01 — Introduction to Solidity 02 — Setting Up Your Environment 03 — Your First Smart Contract 04 — Data Types & Variables 05 — Functions & Visibility 06 — Control Flow 07 — Arrays & Mappings 08 — Structs & Enums
Intermediate
09 — Events & Logging 10 — Modifiers 11 — Inheritance 12 — Interfaces & Abstract Contracts 13 — Error Handling 14 — Ether & Wei 15 — Payable Functions 16 — msg.sender & msg.value 17 — Storage vs Memory vs Stack
Advanced
18 — Gas Optimization 19 — ERC-20 Tokens 20 — ERC-721 NFT Standard 21 — Contract Security 22 — Reentrancy Attacks 23 — Oracles & Chainlink 24 — Upgradeable Contracts 25 — Deploying to Mainnet
SolidityMaster / Lesson 02
Lesson 02 of 25

Setting Up Your Environment

Remix IDE, Hardhat, and MetaMask — your complete Web3 development toolkit.

Beginner

Remix IDE — Zero Setup Required

Remix IDE is a browser-based development environment — the fastest way to start writing Solidity. It includes a code editor, compiler, debugger, and deployment tools all in one. No installation needed. Steps to get started:
  1. Open remix.ethereum.org in your browser
  2. Create a new file with a .sol extension
  3. Select Solidity compiler version ^0.8.0
  4. Write your contract and click Compile
  5. Go to Deploy & Run and select JavaScript VM

Installing Hardhat (Local Development)

For production development, Hardhat is the industry-standard local toolchain. You'll need Node.js (v16+) installed.
Solidity
# Create a new project directory
mkdir my-solidity-project
cd my-solidity-project

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

# Initialize a Hardhat project
npx hardhat init

# Install common plugins
npm install --save-dev @nomicfoundation/hardhat-toolbox

Hardhat Project Structure

After initialization, your project will look like:
Solidity
my-solidity-project/
├── contracts/          ← Your .sol files go here
│   └── Lock.sol
├── scripts/            ← Deployment scripts
│   └── deploy.js
├── test/               ← Test files
│   └── Lock.js
├── hardhat.config.js   ← Hardhat configuration
└── package.json

Setting Up MetaMask

MetaMask is a browser wallet that lets you interact with deployed contracts. Install the MetaMask browser extension, then:
  1. Create a new wallet and securely store your seed phrase
  2. Switch to a testnet like Sepolia for free testing
  3. Get test ETH from a faucet at sepoliafaucet.com
  4. Connect MetaMask to Remix by selecting Injected Provider in the Deploy tab