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. - Наука та технологія
An amazing project for new learner's in this field. Thanks a lot for this project.
Hii
wowow really needed this !! thanks alot , keep up your good work...
Great one to start❤❤
Wow nice thank you so much, liked 👍 and subscribed
Behtreen .. Mashallah❤
I think I found a Blockchain King 😍😍😍😍👑
Thanks alot Sir You have did a great job I want you to create MERN Stack and Smart Contract App beginner Edition. Please
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 ...
That's a great project :)
Thanks man
I clicked the ads so you can make some money brother, Thanks alot
Could you please help fix the issue that a new contract deployed says - "Voting is Finished". This is applicable to all my metamask accounts
Thank you soo much, i just finished doing this project using sepolia testnet, works perfect!
Hey can you get any error
i am intersted in your project ...i would like to know more aabout it
Did you use the same api url and private key as in video?? If not ...how did you get a new one???
how can i get this volta api ?
Is it complete project Voting system with blockchain?
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
Can't find network vota.
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..
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
how can i get private key?
Whats the node version used
and also this it means user can vote multiple times as you can change accounts
Voting multiple times is possible just because you are testing , in real life you will only have one account
@@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
@@mehdiiwanii how did you work with the vota network
Worked, thnx 🙌
How did you get volta private key... I tried and got but while compiling it shows insufficient funds... Please help
@@AmanSingh-gg6zc same issue. volta is a real coin and not a testnet. How do I find a workaround?
how to download volta-rpc
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
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
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??
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.
@@pratyush2331raj bro its still not working can you elaborate more exactly what to do
you have to deploy it again
How to get Volta API? also will the ABI generated after I make the smart contract?
same equestion
Did you do it my friend
to vote a candidate voter needs balance in his metamask accounts? if yes then how much minimum balance they need to vote?
It depends on the type of blockchain and the token value as well as gas cost of a transaction
hii where you from copy env files details
hello , I have a question ,
if I want to reset voting , how can I do that ?
You need to deploy new smart contract and put the new smart contract address. Abi of the contract will be same
@@syedmuhammaddanishyou mean deploy hardhat ?
@@GJRahul-rr3uk yes, then change de contract address in constans.js for the new one
My freind can you create those pages please
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.
Will do it soon bro. :)
@@syedmuhammaddanish Thank you is it possible to do it today as this project is due Friday for me and I need to do it :)
When will you be doing this my friend
@@syedmuhammaddanish Will you be able to do that video my friend :) with the home page and candidate Registration and login page thank you :).
If you can do this I would really appreciate it.
from where we get api url and private key?
mila kya?
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'
u got the fix?
@@amansingh4374 yes, I was providing the wrong url for volta network.
How do we get out own private key??
From metamask wallet
you need to copy your accounts priv key in whic you have your VLT test tokens
I have only knowledge of react js and js can I start it directly
I think you can start it directly. Don't hesitate
How can i get api url key or private kindly give that
14:00
HardhatError: HH110: Invalid JSON-RPC response received: {"jsonrpc":"2.0","error": "Action not found.","id": 2}
i got this errror what to do ?
so that i cant get the contract address
u should put a license on ur project I guess
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?
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
Can a register and login page be created by any chance
It will be uploaded tomorrow
@@syedmuhammaddanish Thank you my friend I really appreciate it :)
@@syedmuhammaddanish my freind can you include a registeration and logout page also
@@syedmuhammaddanish my friend please reply as I need the other project before Thursday 😭😭
bro why its displaying Voting is Finished after run ?
yes facing same issue
Did you use the same api url and private key as in video?? If not ...how did you get a new one???
@@rushikeshu4983 bro did you get the solution??
it only works for a specific time if you want to do it again just re deploy your project
the website says voting is finished
what to do
did u get the solution
@@manikantadevadiga7146bro did you get the solution??
Did you get the solution ? please reply
@@HighInSky07 u have to deploy again
then u paste the deployed address in react code that is it
Hey Can you please tell , How to get this API_URL and Private Key ?
did u get it?
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.
It's not showing the candidates names, can someone help? I voted and my Eth got deducted. Urgent help needed
The faucet or the real?
Bro, do I need Gas fees to run this application?
Yes but you can use any ethereum testnet
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 .
did you get the solution? same problem, please reply asap
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.
@@husnainumar2099Can I use other API except Volta?
App.jsx:25 TypeError: Cannot read properties of undefined (reading 'Web3Provider')
at connectToMetamask (App.jsx:16:51)
how to solve this errr?
See the code from github and copy line 25. It should work properly. You made some english mistake
bro is this project working now @2024
It should work
where can i get contract_address
Bruh, is there any risk of fake votes in this application?
Yes there might be a vulnerability in smart contract which can be exploited to cast multiple votes. Secure smart contract design is equally important
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
sometimes ethers js version can be a problem , make sure it's working ! check with the documentation
pls can i get your email account
Tanmaysamdani12345@gmail.com