Skip to main content

Command Palette

Search for a command to run...

My First Smart Contract on Ethereum: A Remix Tutorial

Published
2 min read

🧠 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

FunctionTypeDescription
set()Public WriteSets a value to storedNumber
get()Public ViewReturns the currently stored number

✅ Step 1: Compile the Contract

  • Selected compiler version: 0.8.30

  • File: SimpleStorage.sol

  • Clicked 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 value

  • Then called get() to retrieve it — ✅ returned 42

📸 Interaction Screenshot:


📝 What I Learned

  • How Solidity functions like view and public work

  • How 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

Web3 for Backend Developers

Part 1 of 2

I'm documenting my journey from backend engineering (Java, MySQL, Kafka) into Web3. This series covers Solidity basics, smart contracts, and tools like Remix, Hardhat, and Foundry—perfect for backend devs curious about blockchain.

Up next

Transition Journal #1: From Java Backend Engineer to Web3 Explorer

#1: A Web2 Veteran's Leap into Web3