Skip to content

ashifsekh/SimpleCounter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

🧮 SimpleCounter Smart Contract

A beginner-friendly Solidity project to learn the basics of smart contract development and interaction with the Ethereum blockchain.
This project demonstrates how a simple counter can be created, deployed, and interacted with — without needing any user inputs.

Blockscout link : https://celo-alfajores.blockscout.com/address/0x34bC376D2dd18BfCa8B5Ea1e64E0DdB2503Fe4C4

Screenshot 2025-10-30 at 2 06 51 PM

📘 Project Description

This project introduces a basic Solidity smart contract called SimpleCounter.
It’s designed for those who are new to blockchain and smart contract programming.
The contract has a simple purpose — to count upward every time it’s called.


⚙️ What It Does

  • Starts with a counter initialized to zero.
  • Allows anyone to increment the counter by calling a function.
  • Lets users view the current count stored on the blockchain.
  • Demonstrates how data persistence works in Ethereum smart contracts.

✨ Features

Simple and Clean Code — Easy to read and understand for new Solidity developers.
No Input Fields — Functions don’t require any arguments.
Transparent Storage — The counter value is stored permanently on-chain.
Public Access — Anyone can read or increment the counter.


💻 Smart Contract Code

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract SimpleCounter {
    // A number that will store the counter value
    uint256 public count = 0;

    // Function to increase the counter by 1
    function increment() public {
        count += 1;
    }

    // Function to get the current count
    function getCount() public view returns (uint256) {
        return count;
    }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages