Building a Web3 Blockchain Decentralized Voting Application (DAPP) using React JS and Solidity

Поділитися
Вставка
  • Опубліковано 7 кві 2023
  • Github Repo: github.com/syedmuhamaddanish/...
    In this video, I will show you how to build a decentralized voting application using React JS and Solidity smart contracts. We will cover the entire development process from creating the smart contract, setting up the Ethereum network, to building the front-end user interface in React JS. By the end of this video, you will have a working decentralized voting application that is secured by the Ethereum blockchain.
  • Наука та технологія

КОМЕНТАРІ • 119

  • @anshulgarg58
    @anshulgarg58 5 місяців тому +2

    An amazing project for new learner's in this field. Thanks a lot for this project.

  • @swastikpatel234
    @swastikpatel234 Рік тому

    wowow really needed this !! thanks alot , keep up your good work...

  • @zooomba62
    @zooomba62 2 місяці тому

    Great one to start❤❤

  • @mahendranath2504
    @mahendranath2504 8 місяців тому

    Wow nice thank you so much, liked 👍 and subscribed

  • @danishzaki9452
    @danishzaki9452 Місяць тому

    Behtreen .. Mashallah❤

  • @muneeburrehman547
    @muneeburrehman547 Рік тому +7

    I think I found a Blockchain King 😍😍😍😍👑

  • @LocusGamingYT2004
    @LocusGamingYT2004 8 місяців тому

    Thanks alot Sir You have did a great job I want you to create MERN Stack and Smart Contract App beginner Edition. Please

  • @waqarrao3610
    @waqarrao3610 4 місяці тому +5

    Why do we create a * .env* file? where should i copy paste my own *Private-Key* and * API url* ....please ..I'm learning blockchain development and this is important for me ...i wanna create these types of projects and deploy them on Netlify for my portfolio ...

  • @rohitroy.youtube
    @rohitroy.youtube Рік тому +5

    That's a great project :)

  • @eliyagervas8680
    @eliyagervas8680 2 місяці тому

    I clicked the ads so you can make some money brother, Thanks alot

  • @sahil_gidwani
    @sahil_gidwani 3 місяці тому +2

    Could you please help fix the issue that a new contract deployed says - "Voting is Finished". This is applicable to all my metamask accounts

  • @bhumiy273
    @bhumiy273 Рік тому +5

    Thank you soo much, i just finished doing this project using sepolia testnet, works perfect!

    • @prathameshsalunkhe3423
      @prathameshsalunkhe3423 10 місяців тому

      Hey can you get any error

    • @rajthakur-17xx
      @rajthakur-17xx 9 місяців тому

      i am intersted in your project ...i would like to know more aabout it

    • @amritanand4471
      @amritanand4471 4 місяці тому

      Did you use the same api url and private key as in video?? If not ...how did you get a new one???

  • @vayudarji
    @vayudarji 9 місяців тому +5

    how can i get this volta api ?

  • @360DegreeVr
    @360DegreeVr Рік тому +1

    Is it complete project Voting system with blockchain?

  • @siddhantjagdish855
    @siddhantjagdish855 3 місяці тому

    Hey, so I am stuck where at the time of deployment it throws an INSUFFICIENT FUNDS error. I was wondering how do I migrate the project from using Volta to using a testnet like sepolia? Please reply

  • @Bildad
    @Bildad Рік тому +2

    Can't find network vota.

  • @pth55
    @pth55 13 днів тому

    I'm a newbie to all these stuff,
    Is there any way to speed up this transaction process, like updating time in frontend and voting etc..

  • @sujalmudaliar3030
    @sujalmudaliar3030 Місяць тому

    Can anyone tell me what all softwares should be downloaded in my system to start this project as it shows error everytime i run the npm command please reply

  • @vayudarji
    @vayudarji 9 місяців тому +2

    how can i get private key?

  • @mehdiiwanii
    @mehdiiwanii Рік тому +2

    Whats the node version used
    and also this it means user can vote multiple times as you can change accounts

    • @adityasurve3062
      @adityasurve3062 Рік тому +1

      Voting multiple times is possible just because you are testing , in real life you will only have one account

    • @mehdiiwanii
      @mehdiiwanii Рік тому

      @@adityasurve3062 i was working on it and i was testing that how could we add or integrate external database so that we could integrate a wallet address to a particular Voter id number and give the one token to vote

    • @Bildad
      @Bildad Рік тому

      @@mehdiiwanii how did you work with the vota network

  • @prathmeshsingh8082
    @prathmeshsingh8082 3 місяці тому

    Worked, thnx 🙌

    • @AmanSingh-gg6zc
      @AmanSingh-gg6zc 3 місяці тому

      How did you get volta private key... I tried and got but while compiling it shows insufficient funds... Please help

    • @siddhantjagdish855
      @siddhantjagdish855 3 місяці тому

      @@AmanSingh-gg6zc same issue. volta is a real coin and not a testnet. How do I find a workaround?

  • @user-yl1kf7qi3b
    @user-yl1kf7qi3b 9 місяців тому +1

    how to download volta-rpc

  • @aminabcf5749
    @aminabcf5749 Рік тому

    what if i want to create a react page that register the candidate by the person deploying the contract how can i do that can u please help

    • @syedmuhammaddanish
      @syedmuhammaddanish  Рік тому +1

      You should create a useState variable const [owner, setOwner] = useState(null)
      store the owner address as setOwner("address") in useEffect(), so as the code loads, owner is set.
      Write a function in App.js which first checks if the metamask account is owner or not, if yes sends a transcation to addCandidate function.
      Add an input and button in Components/connected.jsx, and send owner, account and function as props.
      So when user simply clicks on addCandidate, it calls the function in app.js

  • @amansingh4374
    @amansingh4374 10 місяців тому +1

    thanks you so much brother ...the project was working fine but now whenever i m running npm start it open local host which showing Voting finished so how can i restart it??

    • @pratyush2331raj
      @pratyush2331raj 7 місяців тому

      You can use different account for voting or you have to deploy and compile your smart contract again and again you have to change the contract address in the code.

    • @rutwik2.033
      @rutwik2.033 4 місяці тому

      @@pratyush2331raj bro its still not working can you elaborate more exactly what to do

    • @mehdiiwanii
      @mehdiiwanii Місяць тому

      you have to deploy it again

  • @MUHAMMADHASSAN-uu3jx
    @MUHAMMADHASSAN-uu3jx 7 місяців тому +1

    How to get Volta API? also will the ABI generated after I make the smart contract?

  • @baldwinmatondo4519
    @baldwinmatondo4519 Рік тому

    Did you do it my friend

  • @sagarkumar-cu8ys
    @sagarkumar-cu8ys 4 місяці тому +1

    to vote a candidate voter needs balance in his metamask accounts? if yes then how much minimum balance they need to vote?

    • @syedmuhammaddanish
      @syedmuhammaddanish  4 місяці тому

      It depends on the type of blockchain and the token value as well as gas cost of a transaction

  • @dikshantdhude3412
    @dikshantdhude3412 11 місяців тому

    hii where you from copy env files details

  • @Rezhin-nc7vg
    @Rezhin-nc7vg Рік тому +1

    hello , I have a question ,
    if I want to reset voting , how can I do that ?

    • @syedmuhammaddanish
      @syedmuhammaddanish  Рік тому +1

      You need to deploy new smart contract and put the new smart contract address. Abi of the contract will be same

    • @GJRahul-rr3uk
      @GJRahul-rr3uk 8 місяців тому

      ​@@syedmuhammaddanishyou mean deploy hardhat ?

    • @neyrm8020
      @neyrm8020 7 місяців тому

      @@GJRahul-rr3uk yes, then change de contract address in constans.js for the new one

  • @baldwinmatondo4519
    @baldwinmatondo4519 Рік тому

    My freind can you create those pages please

  • @baldwinmatondo4519
    @baldwinmatondo4519 Рік тому +1

    What if I want to create a home page and login page and register page would you be able to do a video on this part by any chance.

    • @syedmuhammaddanish
      @syedmuhammaddanish  Рік тому +1

      Will do it soon bro. :)

    • @baldwinmatondo4519
      @baldwinmatondo4519 Рік тому

      @@syedmuhammaddanish Thank you is it possible to do it today as this project is due Friday for me and I need to do it :)

    • @baldwinmatondo4519
      @baldwinmatondo4519 Рік тому

      When will you be doing this my friend

    • @baldwinmatondo4519
      @baldwinmatondo4519 Рік тому

      @@syedmuhammaddanish Will you be able to do that video my friend :) with the home page and candidate Registration and login page thank you :).

    • @baldwinmatondo4519
      @baldwinmatondo4519 Рік тому

      If you can do this I would really appreciate it.

  • @akshanshkaushal9422
    @akshanshkaushal9422 9 місяців тому +1

    from where we get api url and private key?

  • @the_Morpheus99
    @the_Morpheus99 Рік тому +2

    bro im having error in volta
    Error: could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.7.1)
    reason: 'could not detect network',
    code: 'NETWORK_ERROR',
    event: 'noNetwork'

    • @amansingh4374
      @amansingh4374 10 місяців тому +1

      u got the fix?

    • @the_Morpheus99
      @the_Morpheus99 10 місяців тому

      @@amansingh4374 yes, I was providing the wrong url for volta network.

  • @adityasurve3062
    @adityasurve3062 Рік тому +1

    How do we get out own private key??

    • @mehdiiwanii
      @mehdiiwanii Рік тому

      From metamask wallet
      you need to copy your accounts priv key in whic you have your VLT test tokens

  • @rushabhdabhade3095
    @rushabhdabhade3095 Рік тому

    I have only knowledge of react js and js can I start it directly

    • @JanessaTechZhao
      @JanessaTechZhao 8 місяців тому

      I think you can start it directly. Don't hesitate

  • @abubakarrishi5332
    @abubakarrishi5332 2 місяці тому

    How can i get api url key or private kindly give that

  • @the_Morpheus99
    @the_Morpheus99 Рік тому

    14:00

  • @thejeshwar7680
    @thejeshwar7680 5 місяців тому

    HardhatError: HH110: Invalid JSON-RPC response received: {"jsonrpc":"2.0","error": "Action not found.","id": 2}
    i got this errror what to do ?

    • @thejeshwar7680
      @thejeshwar7680 5 місяців тому

      so that i cant get the contract address

  • @drazen.antunovic
    @drazen.antunovic 4 місяці тому

    u should put a license on ur project I guess

  • @mm0320
    @mm0320 Місяць тому

    I have a doubt- If one user can create multiple metamask wallets, then he/she can cast multiple votes. How do we ensure that this doesn't happen in the real world if hypothetically voting is being done via this app?

    • @mehdiiwanii
      @mehdiiwanii Місяць тому

      ye sbut for real world we will integrate a hybrid model where we can assing their ID cards to the Walllet address so that they can vote only once

  • @baldwinmatondo4519
    @baldwinmatondo4519 Рік тому

    Can a register and login page be created by any chance

    • @syedmuhammaddanish
      @syedmuhammaddanish  Рік тому +1

      It will be uploaded tomorrow

    • @baldwinmatondo4519
      @baldwinmatondo4519 Рік тому

      @@syedmuhammaddanish Thank you my friend I really appreciate it :)

    • @baldwinmatondo4519
      @baldwinmatondo4519 Рік тому

      @@syedmuhammaddanish my freind can you include a registeration and logout page also

    • @baldwinmatondo4519
      @baldwinmatondo4519 Рік тому

      @@syedmuhammaddanish my friend please reply as I need the other project before Thursday 😭😭

  • @PrajwalR-zg2mu
    @PrajwalR-zg2mu 9 місяців тому +1

    bro why its displaying Voting is Finished after run ?

    • @rushikeshu4983
      @rushikeshu4983 7 місяців тому +1

      yes facing same issue

    • @amritanand4471
      @amritanand4471 4 місяці тому

      Did you use the same api url and private key as in video?? If not ...how did you get a new one???

    • @rutwik2.033
      @rutwik2.033 4 місяці тому

      @@rushikeshu4983 bro did you get the solution??

    • @mehdiiwanii
      @mehdiiwanii Місяць тому

      it only works for a specific time if you want to do it again just re deploy your project

  • @chiragkunder7713
    @chiragkunder7713 9 місяців тому

    the website says voting is finished
    what to do

    • @manikantadevadiga7146
      @manikantadevadiga7146 5 місяців тому

      did u get the solution

    • @rutwik2.033
      @rutwik2.033 4 місяці тому

      @@manikantadevadiga7146bro did you get the solution??

    • @HighInSky07
      @HighInSky07 3 місяці тому

      Did you get the solution ? please reply

    • @manikantadevadiga7146
      @manikantadevadiga7146 2 місяці тому

      @@HighInSky07 u have to deploy again
      then u paste the deployed address in react code that is it

  • @604_aftabshaikh8
    @604_aftabshaikh8 4 місяці тому

    Hey Can you please tell , How to get this API_URL and Private Key ?

    • @ishikasingh9098
      @ishikasingh9098 4 місяці тому

      did u get it?

    • @syedmuhammaddanish
      @syedmuhammaddanish  4 місяці тому

      Hey, the API_URL is basically the RPC url which you need to communicate with the blockchain network. Each blockchain including mainnet and testnet have different rpc url. You may find the rpc url in this link rpc.info/ or simply search for rpc url of your choice of blockchain network.
      For private key, if you use metamask, simply go to your account and get the private key. In my videos I have shown how you can extract private key from metamask.

  • @gauravgakhar2850
    @gauravgakhar2850 3 місяці тому

    It's not showing the candidates names, can someone help? I voted and my Eth got deducted. Urgent help needed

  • @ifediorahgregoryugonna6210
    @ifediorahgregoryugonna6210 4 місяці тому

    Bro, do I need Gas fees to run this application?

  • @kuldeepkunwar8706
    @kuldeepkunwar8706 Рік тому

    hello sir I need help!!
    how can we know the API URL and PRIVATE KEY to paste in our .env file.
    because of this "ERROR HH100" showing .

    • @the_Morpheus99
      @the_Morpheus99 Рік тому

      did you get the solution? same problem, please reply asap

    • @husnainumar2099
      @husnainumar2099 11 місяців тому

      private key is from the metamask. it is the private address. And API key is from the node API provider. There are many API providers like moralis, ALCHEMY etc, you can get API key from there. For more information you can watch any relevant youtube video.

    • @Rapunzel-mo9ur
      @Rapunzel-mo9ur 11 місяців тому

      ​@@husnainumar2099Can I use other API except Volta?

  • @harisankar3249
    @harisankar3249 Рік тому

    App.jsx:25 TypeError: Cannot read properties of undefined (reading 'Web3Provider')
    at connectToMetamask (App.jsx:16:51)
    how to solve this errr?

    • @syedmuhammaddanish
      @syedmuhammaddanish  Рік тому

      See the code from github and copy line 25. It should work properly. You made some english mistake

  • @Unknown373d
    @Unknown373d 4 місяці тому

    bro is this project working now @2024

  • @dharunrakesh151
    @dharunrakesh151 4 місяці тому

    Bruh, is there any risk of fake votes in this application?

    • @syedmuhammaddanish
      @syedmuhammaddanish  4 місяці тому

      Yes there might be a vulnerability in smart contract which can be exploited to cast multiple votes. Secure smart contract design is equally important

  • @mehdiiwanii
    @mehdiiwanii Рік тому +3

    Hello Sir I need your help. I used your source code but i am getting this error
    async function getCurrentStatus() {
    const provider = new ethers.providers.Web3Provider(window.ethereum);
    await provider.send("eth_requestAccounts", []);
    const signer = provider.getSigner();
    const contractInstance = new ethers.Contract (
    contractAddress, contractAbi, signer
    );
    const status = await contractInstance.getVotingStatus();
    console.log(status);
    setVotingStatus(status);
    }
    i am getting status = false here and its skipping the voting page
    but when i change it to setVotingStatus(true);
    i am getting the voting page but the remaining time is not working

    • @vickyvignesh3147
      @vickyvignesh3147 11 місяців тому

      sometimes ethers js version can be a problem , make sure it's working ! check with the documentation

  • @gohaya851
    @gohaya851 Рік тому

    pls can i get your email account