Create a simple Voting DApp with Solidity 1/2

Sdílet
Vložit
  • čas přidán 10. 07. 2023
  • In this tutorial, you will learn how to build a basic decentralized voting application (DApp) using Solidity, a programming language for writing smart contracts on the Ethereum blockchain.
    The tutorial will guide you through the step-by-step process of setting up the development environment, including installing necessary tools such as the Solidity compiler and the Ethereum development framework. You will also learn about the basic concepts of blockchain and smart contracts.
    Next, you will dive into the implementation of the Voting DApp. Starting from the smart contract design, you will learn how to define the necessary data structures and functions for creating, managing, and tallying votes. You will explore concepts such as contract deployment, interacting with the contract using web3.js, and handling events.
    As you progress through the tutorial, you will gain hands-on experience in writing Solidity code, deploying smart contracts to the Ethereum test network, and interacting with your DApp through a user-friendly web interface. You will also learn best practices for security and efficiency when designing and deploying smart contracts.
    By the end of this tutorial, you will have a fully functional Voting DApp that enables users to create polls, cast votes, and view the results in a decentralized and transparent manner.
    Whether you are a beginner looking to get started with blockchain development or an experienced developer interested in building decentralized applications, this tutorial will provide you with the knowledge and skills needed to create your own simple Voting DApp using Solidity. Get ready to embark on an exciting journey into the world of decentralized voting!
    ---------------------------------------
    ⭐ Follow us on Social Media ⭐
    💻 LinkedIn/onecodecamp
    🐦 Twiter/onecodecamp
    📷 Instagram/onecodecamp
    📱 Facebook/onecodecamp

Komentáře • 29

  • @damdam9625
    @damdam9625 Před 5 dny

    so easy to understand with basic knowledge. Bravo.

  • @cjcodes1764
    @cjcodes1764 Před 12 dny

    how do we switch this from polygon mumbai to polygon amoy

  • @Avatar40456
    @Avatar40456 Před 10 měsíci +4

    code link?

  • @nanonkay5669
    @nanonkay5669 Před 4 měsíci

    Who did these subtitles? They were constantly messing up what you were saying lol, but I could still hear what you were saying even without them, thankfully

  • @wendtoinissaka
    @wendtoinissaka Před 7 měsíci +1

    Thanks! can I have your github link?

  • @ifediorahgregoryugonna6210
    @ifediorahgregoryugonna6210 Před 5 měsíci

    Bro, in minute 12.27, you talked about getting an application as a prerequisite. Please which application is this?

    • @nanonkay5669
      @nanonkay5669 Před 4 měsíci

      He said you need to install Git. The subtitles are all messed up lol

  • @shobika.g9462
    @shobika.g9462 Před 7 dny

    there is no deploy.js after creating hardhat , instead getting iginition\modules folder under which it has Lock.js , and also another Lock.js uder test folder like seen in video

    • @loneewolf15
      @loneewolf15 Před 6 dny

      same issue i am having

    • @shobika.g9462
      @shobika.g9462 Před 6 dny

      @@loneewolf15 what did you do ? I just made a script folder and deploy. js on my own

    • @loneewolf15
      @loneewolf15 Před 6 dny

      @@shobika.g9462 same thing

  • @SWETHA.S-po2mk
    @SWETHA.S-po2mk Před 3 měsíci

    in meta mask the network mumbai is not working ..can we use another network

    • @aaryankumar7486
      @aaryankumar7486 Před 2 měsíci

      Will it work in another network

    • @user-xq4zg8tl1h
      @user-xq4zg8tl1h Před měsícem

      yes you can! just make sure you get the right rpc url

    • @cjcodes1764
      @cjcodes1764 Před 12 dny

      @@user-xq4zg8tl1h all we need to change is the url? what about the mumbai installation he made?

  • @aryantewatia3161
    @aryantewatia3161 Před 7 měsíci

    bro, when i am deploying my contract it is showing "Contract Address deployed: undefined" it is showing undefined how to get my contract address now ????

    • @steveantony5775
      @steveantony5775 Před 7 měsíci +1

      Ur deployment was successful but you have a typo in your code that's why it doesn't show the contract address faced the same issue but I fixed it later

    • @aalansasonsingarayana854
      @aalansasonsingarayana854 Před 5 měsíci

      how you fixed it@@steveantony5775

    • @matthewhigginbottom2580
      @matthewhigginbottom2580 Před 4 měsíci

      I also have the same problem! Not sure what to do. Any ideas?

    • @steveantony5775
      @steveantony5775 Před 4 měsíci

      @@matthewhigginbottom2580 need to see the code

    • @steveantony5775
      @steveantony5775 Před 4 měsíci

      @@matthewhigginbottom2580 need to see the code

  • @tsunningwah3471
    @tsunningwah3471 Před 4 měsíci

    zhihai2

  • @tsunningwah3471
    @tsunningwah3471 Před 4 měsíci

    lknlkjnlnln

  • @itslucas00
    @itslucas00 Před 8 měsíci

    how do I fix these errors (the ones underlined)?
    ------------------------------------------------------------------------------------------------
    First Error:
    the code:
    for (uint256 i = 0; i < _candidates.length; i++) {
    candidates.push(

    );
    }
    error message: Named argument "numberOfVotes" does not match function declaration.
    ------------------------------------------------------------------------------------------------
    Second Error:
    the code:
    // to vote function
    function voteTo(uint256 _id) public electionOngoing {
    require(checkElectionPeriod(), "Election period has ended");
    require(!voterStatus(msg.sender), "You already voted. You can only vote once.");

    voters[msg.sender] = true;
    listOfVoters.push(msg.sender);
    }
    error message: Member "numberOfVotes" not found or not visible after argument-dependent lookup in struct Voting.Candidate storage ref.