• Discover
  • Partner with us
  • Chapters
  • Blog

Learn everything about Solidity

Getting Started
✨Connect Your Profile to Open Campus
Introduction to Remix IDE
Counter Contract and Solidity Basics
Submit Your First Homework
Solidity Cheat Sheet
Creating Proposal Structure
Submit Your Second Homework

Creating a Counter
Creating a Proposal
Submit Your Third Homework
The Constructor
OnlyOwner Modifier
Voting Functionality

Correcting the Voting Functionality
Correcting the Voting Functionality 2
Calculating the Current State of a Proposal
Submit Your Fourth Task
Finalizing Proposal Contract
Final Version of the Proposal Contract

Submit Your Final Homework
Next Steps

In this lesson, you will be learning about Remix IDE. You can access Remix IDE here.

Down below, you will find the code that I will use in the video. Please copy the code, go to the Remix IDE, and follow along with me. If you encounter any problem, you can contact us through the discord channel.

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


contract Example {


    address owner;


    struct Counter {
        uint number;
        string description;
    }


    Counter counter;


    modifier onlyOwner() {
        require(msg.sender == owner, "Only the owner can increment or decrement the counter");
        _;
    }


    constructor(uint initial_value, string memory description) {
        owner = msg.sender;
        counter = Counter(initial_value, description);
    }


    function increment_counter() external onlyOwner {
        counter.number += 1;
    }


    function decrement_counter() external onlyOwner {
        counter.number -= 1;
    }


    function get_counter_value() external view returns(uint) {
        return counter.number;
    }
}
Previous
Next

Lesson discussion

Swap insights and ask questions about “Learn everything about Solidity”.

Enroll to participate
Start the course to unlock the discussion. Enrolling helps us keep conversations relevant to learners.
WebsiteDiscoverPartner with UsBlogEvents
Discover
CoursesCircleRustSoliditySolanaWeb3 FundamentalsBlockchain Basics
CompanyAbout UsBrand GuidelineFAQsTerms of UsePrivacy PolicyGDPR NoticeCookies
Don't miss any update!

Disclaimer: The information, programs, and events provided on https://risein.com is strictly for upskilling and networking purposes related to the technical infrastructure of blockchain platforms. We do not provide financial or investment advice, nor do we make any representations regarding the value, profitability, or future price of any blockchain or cryptocurrency. Users are encouraged to conduct their own research and consult with licensed financial professionals before engaging in any investment activities. https://risein.com disclaims any responsibility for financial decisions made by users based on the information provided here.

© 2026 Rise In, All rights reserved