Setup Guide
This guide will help you set up your development environment and deploy your first smart contract using Remix IDE.Prerequisites
You’ll need:- A modern web browser (Chrome, Firefox, or Brave recommended)
- MetaMask wallet extension (for testnet deployment)
- Sepolia testnet ETH (free from faucets)
No local installation required! Remix IDE runs entirely in your browser.
Setting Up Remix IDE
Open Remix IDE
Navigate to https://remix.ethereum.org/ in your web browser.Remix will load with a default workspace and example contracts.
Create a New Workspace
In the File Explorer panel on the left:
- Click the workspace dropdown (default is “default_workspace”)
- Click Create to create a new workspace
- Name it something like “Solidity-Course”
- Select Blank template
- Click OK
Your First Contract: SimpleStorage
Let’s deploy the SimpleStorage contract to understand the basics.1. Copy the Contract Code
Create a new fileSimpleStorage.sol and paste the following code:
SimpleStorage.sol
2. Compile the Contract
Open Solidity Compiler
Click the Solidity Compiler icon in the left sidebar (looks like an “S” with a box).
3. Deploy the Contract
Open Deploy & Run
Click the Deploy & Run Transactions icon (looks like an Ethereum logo with an arrow).
Select Environment
In the Environment dropdown, select:
- Remix VM (Shanghai) - For quick local testing (recommended for beginners)
- Injected Provider - MetaMask - For deploying to Sepolia testnet
4. Interact with the Contract
Expand your deployed contract to see all available functions:store - Write a favorite number
store - Write a favorite number
- Enter a number in the field next to
store(e.g.,42) - Click the store button (orange, indicates it’s a transaction)
- Wait for the transaction to confirm
retrieve - Read the stored number
retrieve - Read the stored number
- Click the blue retrieve button (blue indicates it’s a view function - no gas cost)
- The current favorite number displays below the button
addPerson - Add a person with their favorite number
addPerson - Add a person with their favorite number
- Enter a name and number:
"Alice", 7 - Click addPerson
- Click listOfPeople and enter index
0to see Alice’s data - Click nameToNumber and enter
"Alice"to see her favorite number
Deploying to Sepolia Testnet
Ready to deploy to a real testnet?Install MetaMask
Install the MetaMask browser extension and create a wallet if you haven’t already.
Get Sepolia ETH
Use a Sepolia faucet to get free testnet ETH:You’ll need a small amount (~0.1 ETH) for deployment and transactions.
Connect MetaMask to Remix
- In Remix, select Injected Provider - MetaMask from the Environment dropdown
- MetaMask will pop up asking to connect
- Approve the connection
- Ensure Sepolia network is selected in MetaMask
Deploy and Verify
- Click Deploy
- MetaMask will ask you to confirm the transaction
- Approve and wait for deployment
- Copy the contract address from Deployed Contracts
- View your contract on Sepolia Etherscan
Working with Other Contracts
Storage Factory
For contracts with multiple files like StorageFactory, you’ll need to import dependencies:- Create a folder structure:
factory-storage/ - Add both
StorageFactory.solandSimpleStorage.solto the folder - Remix automatically resolves local imports
Fund Me (with Chainlink)
The FundMe contract uses Chainlink Price Feeds:FundMe.sol
Tips for Success
Save Your Work
Remix auto-saves, but export your workspace periodically: File → Export Workspace
Use Console
Open browser DevTools (F12) to see detailed transaction logs and errors
Gas Estimation
Remix shows gas estimates before deployment - useful for optimization
Debugger
Use Remix’s debugger to step through failed transactions and understand what went wrong
Common Issues
Compilation Error: Wrong Solidity Version
Compilation Error: Wrong Solidity Version
Make sure the compiler version matches the pragma:
Transaction Failed: Out of Gas
Transaction Failed: Out of Gas
Increase the gas limit in the Deploy & Run panel, or optimize your contract code.
Import Not Found
Import Not Found
For local imports, ensure both files are in the same folder in Remix’s file explorer.
MetaMask Not Connecting
MetaMask Not Connecting
- Refresh the Remix page
- Disconnect and reconnect MetaMask
- Make sure you’re on the correct network (Sepolia)
Next Steps
Start with Simple Storage
Now that you’re set up, dive into the SimpleStorage contract to learn Solidity fundamentals