Lesson 02 of 25
Setting Up Your Environment
Remix IDE, Hardhat, and MetaMask — your complete Web3 development toolkit.
BeginnerRemix 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:
- Open
remix.ethereum.orgin your browser - Create a new file with a
.solextension - Select Solidity compiler version
^0.8.0 - Write your contract and click Compile
- 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:
- Create a new wallet and securely store your seed phrase
- Switch to a testnet like Sepolia for free testing
- Get test ETH from a faucet at
sepoliafaucet.com - Connect MetaMask to Remix by selecting Injected Provider in the Deploy tab