My First Smart Contract on Ethereum: A Remix Tutorial
🧠 Overview
In this tutorial, I deployed my first Solidity smart contract using Remix IDE. I went from writing a basic storage contract to compiling, deploying, and interacting with it — all without leaving the browser.
🧩 Contract: SimpleStorage.sol
solidityCopyEdit// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract SimpleStorage {
uint256 private storedNumber;
function set(uint256 _num) public {
storedNumber = _num;
}
function get() public view returns (uint256) {
return storedNumber;
}
}
🧾 Function Explanation
| Function | Type | Description |
set() | Public Write | Sets a value to storedNumber |
get() | Public View | Returns the currently stored number |
✅ Step 1: Compile the Contract
Selected compiler version:
0.8.30File:
SimpleStorage.solClicked Compile
📸 Compilation Screenshot:

🚀 Step 2: Deploy to Remix VM
Environment:
Remix VM (Prague)Gas Limit: 3,000,000 (default)
Clicked Deploy
📸 Deployment Screenshot:

🧪 Step 3: Interact with the Contract
Called
set(42)to store a valueThen called
get()to retrieve it — ✅ returned42
📸 Interaction Screenshot:

📝 What I Learned
How Solidity functions like
viewandpublicworkHow transactions are recorded and gas is calculated
The Remix IDE flow: write → compile → deploy → test
🧱 Challenges Faced
Remembering to set the correct compiler version
Understanding Remix's deploy tab (e.g. gas limit, value, etc.)
⛓ What's Next?
Deploy this to a real testnet like Sepolia or Goerli
Use MetaMask + Injected Provider
Add events, ownership, and unit testing with Hardhat
