Build & Deploy Your First Decentralized Voting DApp | S… — Transcript

Full Transcript — Download SRT & Markdown

00:00
Speaker 1
you welcome back once again.
00:03
Speaker 1
I hope all of you are doing great.
00:05
Speaker 1
We got an amazing feedback on our decentralized voting app.
00:09
Speaker 1
A lot of you have followed the project and I got an amazing feedback.
00:15
Speaker 1
The way you guys have built on top of the existing model we have utilized in the decentralized app.
00:20
Speaker 1
In this video, I'm going to give you a quick update in the project because one student facing a problem during the setup.
00:26
Speaker 1
But I would highly encourage you to follow the complete project so you can simply come and watch this.
00:30
Speaker 1
You will master complete decentralized voting management on the blockchain and how you can use the model you can utilize in corporate in business governance.
00:39
Speaker 1
So make sure to follow the complete project, you will understand every single thing that how we have built this particular project.
00:45
Speaker 1
So make sure to come back here in the blockchain coder and you can simply get the startup file.
00:50
Speaker 1
In which every single thing is provided, so click on this get now.
00:54
Speaker 1
Click on this starter file, it will take you to get up and here you can able to find all the folder and file structure.
00:58
Speaker 1
We have designed for this particular project, so you can easily be able to understand the packages, the module we are utilizing.
01:03
Speaker 1
So you can simply click on the package JSON file.
01:07
Speaker 1
And you will find that we are using all the modern technology, which is very relevant, which will help you to do the optimization in the project in a higher level.
01:15
Speaker 1
So make sure to check the complete project, you will understand every single thing.
01:20
Speaker 1
In this video, I'm going to show you that how you can do the setup once you will take the final source code.
01:25
Speaker 1
Once you download the final source code, you will get the zip file.
01:30
Speaker 1
Make sure to extract that file, and that you will have this particular folder called voting app.
01:36
Speaker 1
In which you will have the complete source code of the project.
01:40
Speaker 1
So this is the one which I'm going to simply open.
01:43
Speaker 1
Let me close this one.
01:46
Speaker 1
And let me click on my VS code, I'll go back to open.
01:52
Speaker 1
And go back to download and here I have this particular folder.
01:56
Speaker 1
Select this one.
01:57
Speaker 1
And open.
02:00
Speaker 1
So this is the complete source code of the project which we have coded in the project.
02:05
Speaker 1
So make sure to follow the complete project, you will understand everything.
02:08
Speaker 1
Now let me give you a complete walk-through of the entire folder file structure.
02:14
Speaker 1
And how we have made this even in more optimized, so all you have to do is to change in environment variable.
02:20
Speaker 1
And everything would be working fine.
02:22
Speaker 1
That's also we have explained in detail in the project.
02:25
Speaker 1
So the very first thing we have in this particular folder is the assets.
02:30
Speaker 1
You will find all the images which we are utilizing.
02:33
Speaker 1
So we have all of this images for the candidates.
02:36
Speaker 1
And we are simply importing here and we are simply exporting.
02:41
Speaker 1
So you can check this.
02:42
Speaker 1
Then we have the component in which we have all the component for our application.
02:46
Speaker 1
Like button, we have the card, we have the input, we have the navbar.
02:51
Speaker 1
We have the voter card.
02:53
Speaker 1
And we have the loader.
02:56
Speaker 1
You don't need to make any changes in any one of these components.
02:59
Speaker 1
I'll tell you what are the changes you have to do.
03:01
Speaker 1
Now come back to the context, here you will find that this is the main feature.
03:05
Speaker 1
Where we are performing all the transaction.
03:08
Speaker 1
So we have the constant.
03:10
Speaker 1
What I'm doing here, we are getting the important environment variable like network configuration, owner and the contract addresses from our environment variable.
03:18
Speaker 1
So you don't need to make any changes right up here.
03:21
Speaker 1
Right now you can see we have all of this network is available.
03:25
Speaker 1
So I'm going to first deploy the contract in the local host.
03:30
Speaker 1
So first I'm going to deploy the contract to local host.
03:36
Speaker 1
And this is the configuration we have for the MetaMask as well as in our project.
03:42
Speaker 1
And then I'm going to deploy the contract to hostly test network.
03:46
Speaker 1
So you can literally configure any network, but make sure you should provide the relevant information in these places.
03:53
Speaker 1
So you don't need to make any changes.
03:55
Speaker 1
Just keep it as it is.
03:57
Speaker 1
I'll tell you what are the changes you have to do.
03:58
Speaker 1
Close this one, now come back to the create JSON.
04:01
Speaker 1
So this is going to be our complete ABI of our contract which we will get once we'll deploy the contract.
04:06
Speaker 1
So let's close this one.
04:08
Speaker 1
And here we have our voter.
04:11
Speaker 1
So you don't need to make any changes here as well.
04:13
Speaker 1
Every single thing is well optimized, well performed.
04:17
Speaker 1
So what we are doing, we are getting the environment variables like Pinata API key, secret key, hash, post hash, and JSON hash.
04:24
Speaker 1
That's what we have imported.
04:26
Speaker 1
And we have done the update exactly.
04:29
Speaker 1
So every single thing is fine.
04:31
Speaker 1
Don't need to make any changes.
04:32
Speaker 1
Let's close this one.
04:33
Speaker 1
Now come back to the contract.
04:36
Speaker 1
So this is the huge contract we have written.
04:40
Speaker 1
Which allow us to facilitate this entire transaction.
04:45
Speaker 1
So this one is very important, you have to understand the logic we have utilized in this particular contract.
04:50
Speaker 1
Because some of you have got confused when it's come to a registration of the candidate and the voter.
04:56
Speaker 1
So only admin has the authority to register a candidate and the voter.
05:01
Speaker 1
That's the thing you have to understand.
05:03
Speaker 1
This is the contract we have.
05:05
Speaker 1
Let's close this.
05:06
Speaker 1
I'll show you everything in action.
05:08
Speaker 1
Just wait.
05:09
Speaker 1
Then we have the page.
05:11
Speaker 1
So all together we will have four pages.
05:14
Speaker 1
This is how it's going to be our complete context management setup.
05:18
Speaker 1
You don't need to do anything in here.
05:20
Speaker 1
We're going to have a allow voter.
05:23
Speaker 1
So here you will find all the voter which is allowed for giving vote.
05:27
Speaker 1
We'll have a candidate registration.
05:30
Speaker 1
We have a index.js where we are displaying all the candidates.
05:34
Speaker 1
Then we have the voter list.
05:36
Speaker 1
That's all you will find.
05:38
Speaker 1
Now close this one.
05:40
Speaker 1
Close this one in which you will find these two icons.
05:43
Speaker 1
Simply ignore that.
05:44
Speaker 1
It's not that important.
05:46
Speaker 1
Now you can come back to the script.
05:49
Speaker 1
So we have optimized the script so you can easily be able to run on the hard hat environment.
05:53
Speaker 1
As well as in the test network environment.
05:56
Speaker 1
So just keep it as it is.
05:59
Speaker 1
Then we have the CSS file.
06:01
Speaker 1
We have coded all the CSS code for our application.
06:05
Speaker 1
So just keep it as it is.
06:06
Speaker 1
If you want to make any changes in the coloring, in the pattern, you can do that.
06:10
Speaker 1
So this is the color framework we are using, but you can simply play around with this variable.
06:14
Speaker 1
If you know how to do it.
06:17
Speaker 1
Because you need to have a basic understanding of CSS.
06:21
Speaker 1
And here we have the test.
06:23
Speaker 1
So just keep it as it is.
06:25
Speaker 1
It's not that important.
06:28
Speaker 1
And now come back to the most important thing, which is our environment variable.
06:32
Speaker 1
Environment variable and this one is very important.
06:35
Speaker 1
You have to provide the relevant information where you are deploying the contract.
06:39
Speaker 1
So when I'm going to deploy the contract to the actual test network, I'm going to go with Ethereum hostly test network.
06:45
Speaker 1
And this is the RPC URL I'm using and this is the provider I'm using.
06:49
Speaker 1
There are multiple provider like Infura, we have Acme.
06:54
Speaker 1
But this one is most popular one and it will mostly a free one which you can use it.
07:00
Speaker 1
And here you have to get your private key of your wallet which you want to use it for deploying the contract.
07:05
Speaker 1
But make sure you should have some fun in that.
07:09
Speaker 1
So when you will use that particular account private key, it's going to become the admin of the contract.
07:15
Speaker 1
You will have the access over the contract for registration, candidate and voter, which I will show you.
07:21
Speaker 1
So you have to get your variables.
07:23
Speaker 1
So this one is working fine when we go to deploy on hostly.
07:27
Speaker 1
But if you are deploying to any other network, make sure to provide this one in all the places.
07:32
Speaker 1
Now we have the environment variable for our product side.
07:35
Speaker 1
So if I click here.
07:37
Speaker 1
Here I have done all the optimization.
07:40
Speaker 1
So you don't need to do anything.
07:42
Speaker 1
All you have to do is to get your own Pinata API key and secret key.
07:48
Speaker 1
Like this will work absolutely fine.
07:51
Speaker 1
There's no problem in that.
07:53
Speaker 1
But it has a limit.
07:55
Speaker 1
So once it will reach its limit, this is not going to work.
07:59
Speaker 1
So you have to get your own Pinata API key and secret key, which I will tell you how you can get.
08:03
Speaker 1
And here you have to provide the information.
08:06
Speaker 1
So you have to provide your contract address once you will deploy that.
08:10
Speaker 1
That's what you have to give here.
08:12
Speaker 1
Here you have to give the account which you're going to use for deploying the contract.
08:16
Speaker 1
And first I'm going to test on local host, after that I'm going to deploy to hostly.
08:20
Speaker 1
So the moment you will switch any one of this, if I bring this back and if I close this one.
08:25
Speaker 1
So the entire configuration which I have in the system is going to focus on hostly test network.
08:30
Speaker 1
Not on the local host.
08:31
Speaker 1
So this is how you can switch.
08:32
Speaker 1
But make sure deploy the contract wherever you deploying your contract.
08:36
Speaker 1
Activate that portion as well.
08:38
Speaker 1
So we'll show you how you can do that.
08:39
Speaker 1
So first we go to deploy on the local host.
08:41
Speaker 1
Now close this one.
08:42
Speaker 1
Now the next one we have is the hard hat setup.
08:45
Speaker 1
And this one is very, very important that you have to understand the basic requirement for testing this particular application.
08:52
Speaker 1
In your local environment using hard hat.
08:56
Speaker 1
So here I have explained few important things.
08:59
Speaker 1
Which you have to give a little focus right up here.
09:01
Speaker 1
So the first thing you have to understand that when you are deploying your contract and testing in the hard hat environment.
09:09
Speaker 1
You cannot use any other account.
09:12
Speaker 1
So you have to use the hard hat account.
09:15
Speaker 1
So when you will run the node, hard hat will give you 20 plus account.
09:20
Speaker 1
And that account you can only use in the hard hat environment.
09:24
Speaker 1
If you have your account like your main account.
09:30
Speaker 1
You cannot use that in the hard hat environment.
09:33
Speaker 1
That's the first thing.
09:34
Speaker 1
The second thing is that you need to have this particular node version.
09:38
Speaker 1
If you have any other node version, hard hat will not work.
09:41
Speaker 1
Because hard hat is not compatible with the latest node version.
09:46
Speaker 1
So you have to use this particular node version.
09:50
Speaker 1
Then we have to install the packages.
09:52
Speaker 1
You have to run the node, when you will run the node, then you can able to get the hard hat account.
09:57
Speaker 1
And you can able to add this network.
10:00
Speaker 1
The hard hat network in your MetaMask.
10:02
Speaker 1
And by default, hard hat is going to use this particular account.
10:09
Speaker 1
That's the first thing you have to keep in mind that this going account is going to be used as an admin.
10:14
Speaker 1
And this account has this much fake ETH, which you can use for testing the contract.
10:20
Speaker 1
And this is the network configuration you have to do in your MetaMask.
10:24
Speaker 1
And here is one more important thing.
10:27
Speaker 1
That when you will switch your account like you are in your MetaMask and you have two account for hard hat or four account for hard hat.
10:36
Speaker 1
So if you are in account number one and if you are switching to account number two, so you have to clear the history.
10:43
Speaker 1
Every single time whenever you do this.
10:47
Speaker 1
Because if you don't do that, the transaction will fail and you will get an error of RPC URL error.
10:53
Speaker 1
So you have to clear the history, then it will recognize as a fresh account.
10:57
Speaker 1
And you can able to make the transaction.
11:00
Speaker 1
So here you will have all the hard hat account which hard hat will give you.
11:04
Speaker 1
So you can simply copy the private key and you can simply import in your MetaMask and perform the transaction.
11:10
Speaker 1
This is going to be the admin of the contract.
11:14
Speaker 1
And you can simply import that.
11:16
Speaker 1
I hope so far things are clear to you.
11:20
Speaker 1
That what exactly you have to do.
11:23
Speaker 1
And how it will work.
11:26
Speaker 1
So this is the hard hat setup.
11:28
Speaker 1
Which I'm going to do together.
11:30
Speaker 1
So you can simply follow as it is.
11:33
Speaker 1
Now we have this hard hat configuration.
11:36
Speaker 1
So here I have done the optimized configuration.
11:40
Speaker 1
So you don't need to do anything.
11:42
Speaker 1
First we're going to test on the hard hat.
11:44
Speaker 1
After that we're going to move to hostly.
11:47
Speaker 1
So we have done the optimization as for the global approach.
11:51
Speaker 1
The next one we have is this next.config.
11:54
Speaker 1
You don't need to do anything in here.
11:55
Speaker 1
We are using Pinata IPFS for uploading the data, so we have to configure their root domain.
12:00
Speaker 1
And that's what I have done.
12:02
Speaker 1
So the next one we have is the package JSON file.
12:04
Speaker 1
And here I have done the advanced configuration.
12:07
Speaker 1
So here you will find all the packages which we are utilizing.
12:10
Speaker 1
Which is very much stable and well audited.
12:13
Speaker 1
Here we are using this particular Nomic Foundation hard hat toolbox and hard hat version.
12:17
Speaker 1
And here I have given you couple of commands.
12:20
Speaker 1
So this is the command we're going to run.
12:23
Speaker 1
To run the local node.
12:25
Speaker 1
This is the command we're going to run for deploying our contract locally.
12:29
Speaker 1
And this command is going to be run for deploying to Ethereum test network.
12:33
Speaker 1
And if you run this particular command, it's going to remove this particular folders files.
12:38
Speaker 1
Which will automatically get generated whenever you install the packages and run the project.
12:43
Speaker 1
So we have all of this.
12:45
Speaker 1
You don't need to touch anything because every single thing is properly well optimized.
12:49
Speaker 1
Now come back to the readme file.
12:51
Speaker 1
And here you will have some important links, some important resources which you will find.
12:55
Speaker 1
So you can simply explore.
12:57
Speaker 1
So here you will have the complete project which you can simply must watch.
13:03
Speaker 1
That's why I've given you the URL.
13:06
Speaker 1
So you can simply follow the complete project to understand the complete architecture of the project.
13:10
Speaker 1
And here you will find the code structure.
13:13
Speaker 1
You can simply install the VS code by following this link.
13:18
Speaker 1
And here is the most important thing.
13:21
Speaker 1
Like you might be wondering that how you can simply downgrade your node version or upgrade your node version.
13:27
Speaker 1
So I would highly encourage you to follow this particular video in which I have explained that how you can install NVM.
13:34
Speaker 1
NVM start for node version manager which allow you to control your node version in your system.
13:41
Speaker 1
Whether you are using Mac or OS.
13:43
Speaker 1
So you simply watch this video where I have simply downgrade my node version showing you actually how you can install the packages.
13:49
Speaker 1
And how you can control it.
13:51
Speaker 1
That's all is there.
13:53
Speaker 1
And you can use this ANKR.com for getting the RPC URL.
13:58
Speaker 1
So this is the RPC URL I have used this particular website to get.
14:02
Speaker 1
So you will find multiple website RPC URL which you can check.
14:06
Speaker 1
Come here and check, you can get the free faucet for the hostly network.
14:10
Speaker 1
That's all is given.
14:12
Speaker 1
Now, I hope you have understood the complete folder and file structure.
14:17
Speaker 1
Now let me show you every single thing in practical.
14:21
Speaker 1
So first thing you have to do is to open up your terminal.
14:24
Speaker 1
And you have to check your node version.
14:26
Speaker 1
So if I check my node version.
14:29
Speaker 1
I have this one.
14:31
Speaker 1
Which is the latest one.
14:32
Speaker 1
And it's not going to work with hard hat.
14:35
Speaker 1
So I have to downgrade my node version.
14:40
Speaker 1
So if I simply type NVM use 18, the version name.
14:46
Speaker 1
So this is the version I'm using.
14:48
Speaker 1
The moment I will hit, it's going to simply downgrade my node version.
14:53
Speaker 1
It will also downgrade my NPM version.
14:56
Speaker 1
Now if I check my node version.
14:59
Speaker 1
I have the required one.
15:01
Speaker 1
Now everything is set.
15:04
Speaker 1
So this is how you can downgrade once you will install NVM in your system.
15:09
Speaker 1
And the configuration I have done in my system, in my terminal.
15:14
Speaker 1
Right now you can see that I have this particular node version.
15:17
Speaker 1
But the moment I will delete my terminal.
15:21
Speaker 1
It will switch back to this particular one, the latest one.
15:25
Speaker 1
This is the my personal configuration I have done.
15:30
Speaker 1
So whenever you open a new terminal, you should check that what configuration you have in your system as a default.
15:35
Speaker 1
So the moment I will simply close and open it up.
15:39
Speaker 1
It will automatically come back to the latest version.
15:43
Speaker 1
So I have to simply downgrade it.
15:46
Speaker 1
Because I'm working on a multiple project, that's why I have set this particular system.
15:51
Speaker 1
So I hope you have understood.
15:53
Speaker 1
So I have the required version, now I can simply install the packages.
15:57
Speaker 1
Simply type NPM I.
15:59
Speaker 1
And it's going to do the installation.
16:02
Speaker 1
It will take few seconds.
16:04
Speaker 1
So just give some time.
16:06
Speaker 1
So finally the installation is completed, I got my node modules.
16:10
Speaker 1
In that I have all the packages.
16:13
Speaker 1
Perfect.
16:15
Speaker 1
And I'm getting couple of vulnerabilities and couple of commands.
16:20
Speaker 1
Simply ignore this command.
16:22
Speaker 1
Don't need to run it.
16:23
Speaker 1
Otherwise it's going to change the package structure.
16:26
Speaker 1
Package version.
16:28
Speaker 1
Simply ignore this.
16:30
Speaker 1
It's not that important.
16:32
Speaker 1
So simply clear your terminal.
16:34
Speaker 1
Now our terminal is clear.
16:36
Speaker 1
Now I'm ready to start the node because first I'm going to deploy in our hard hat environment.
16:40
Speaker 1
So if you come back here, this is the command which I have to execute.
16:45
Speaker 1
So if I simply come back here.
16:48
Speaker 1
So before I run this particular command, we have to do couple of setup.
16:51
Speaker 1
So come back to the environment variable.
16:55
Speaker 1
Like right up here.
16:57
Speaker 1
And we have to get our own Pinata API key and secret key.
17:02
Speaker 1
And we have to do the local host network configuration.
17:06
Speaker 1
Because I want to show you some important concept here.
17:10
Speaker 1
That's why let's do the setup first.
17:12
Speaker 1
So let's get this environment variable first.
17:15
Speaker 1
So what I will do, I'll come back here.
17:17
Speaker 1
Open a new tab and type Pinata cloud.
17:20
Speaker 1
This one is a really powerful site which help you to get the API key and secret key.
17:25
Speaker 1
Which you can use to deploy to IPFS through Pinata.
17:29
Speaker 1
So simply log it.
17:30
Speaker 1
I already have my account.
17:32
Speaker 1
So I'm going to simply log it.
17:34
Speaker 1
But when you will create your account for the fresh email ID, it might take up to three to four hours to get your account verified.
17:40
Speaker 1
And when you will generate the API key, it will take little hours.
17:44
Speaker 1
So you have to check that how long it takes to get your API completely active.
17:48
Speaker 1
So here you will find all the file which you will upload.
17:50
Speaker 1
So I'll simply click on this API key.
17:53
Speaker 1
And here I will find all the API key which I have created.
17:57
Speaker 1
So I'll simply click on this new API key.
18:00
Speaker 1
And I can give a name to my API key.
18:02
Speaker 1
So I'll say.
18:04
Speaker 1
Let's say app.
18:06
Speaker 1
I want to have the access of all the feature which is available.
18:11
Speaker 1
So I'll simply click on admin.
18:12
Speaker 1
And from here you can able to set the limit that how many files you want to upload from this particular API key.
18:18
Speaker 1
So the maximum you can set to 1000 because it's my free account.
18:22
Speaker 1
And you can use it for absolutely free.
18:25
Speaker 1
Now click on this generate API key.
18:28
Speaker 1
And here you will get this three modules like you will get the API key, secret key and JWT.
18:32
Speaker 1
If you want to do the backend configuration.
18:36
Speaker 1
But you need these two.
18:37
Speaker 1
Simply copy.
18:39
Speaker 1
And that's what you have to update here.
18:43
Speaker 1
Then you can simply copy this one.
18:46
Speaker 1
And that's what you have to update here.
18:49
Speaker 1
So I will go with the same one because it will take a little bit time to get activated.
18:54
Speaker 1
So this one is the activated one which I can simply use.
18:57
Speaker 1
So this is how you can get your API key.
18:59
Speaker 1
Hope you have understood.
19:01
Speaker 1
You should always check your API key whether it's activated or not.
19:04
Speaker 1
Because when you will upload it, you will get that 401 or 403.
19:09
Speaker 1
This is the two error you will get.
19:11
Speaker 1
When you will not fully activate your account.
19:14
Speaker 1
But you will get it very easily.
19:15
Speaker 1
Make sure to use a fresh account.
19:17
Speaker 1
Fresh email ID.
19:19
Speaker 1
So once you get your API key, now simply close this one.
19:22
Speaker 1
Come back here.
19:23
Speaker 1
So we're done with that.
19:25
Speaker 1
Now we have to do the network configuration.
19:28
Speaker 1
So first thing I would suggest you that if you already have the hard hat accounts in your MetaMask.
19:33
Speaker 1
You should remove that.
19:36
Speaker 1
So what I can do.
19:38
Speaker 1
I can show you my MetaMask and I'm going to simply log into my MetaMask account.
19:42
Speaker 1
And you will find that currently I have four accounts.
19:47
Speaker 1
These two accounts, one and two is my actual account.
19:52
Speaker 1
And this three and four is my hard hat account.
19:56
Speaker 1
So what I will do, I'll first going to remove this account.
20:00
Speaker 1
I want you to do exactly.
20:02
Speaker 1
Because this one is very important to understand that which account will have the access as admin level.
20:08
Speaker 1
So simply remove this one.
20:10
Speaker 1
I want you to have the same path.
20:12
Speaker 1
Where I am at the moment.
20:15
Speaker 1
So we have removed the hard hat account.
20:17
Speaker 1
Right now this one is my actual account.
20:20
Speaker 1
So I'll just keep it.
20:22
Speaker 1
So once you're done with that, now you have to remove the local host.
20:25
Speaker 1
Network configuration from your MetaMask.
20:27
Speaker 1
I want you to do the fresh configuration.
20:30
Speaker 1
Because I want to show you.
20:32
Speaker 1
Otherwise you will say that my local host is not working.
20:36
Speaker 1
So I already done the configuration, if I want to do the editing, I can do all of that.
20:41
Speaker 1
And I can simply do it.
20:43
Speaker 1
But I want to simply erase it.
20:46
Speaker 1
To show you the fresh configuration you can do it.
20:49
Speaker 1
So simply remove this one.
20:52
Speaker 1
So I have successfully removed the local host.
20:55
Speaker 1
And you can see I don't have it.
20:57
Speaker 1
Now I'm going to simply add this network manually.
21:00
Speaker 1
So first thing what I can do is.
21:02
Speaker 1
I want to show you one thing.
21:03
Speaker 1
Click here, click on this add network and here you have to provide the details.
21:08
Speaker 1
Of the network which you want to configure.
21:11
Speaker 1
So I want to configure local host.
21:14
Speaker 1
So I already given you the configuration details right up here.
21:18
Speaker 1
So if you come back to the context.
21:21
Speaker 1
Constant.
21:23
Speaker 1
Here we have this configuration details.
21:25
Speaker 1
So this is the exact details you have to provide in your MetaMask.
21:30
Speaker 1
So first thing is going to be the name.
21:32
Speaker 1
Copy that one.
21:34
Speaker 1
And paste here.
21:36
Speaker 1
And the second thing you have to provide is the RPC URL.
21:40
Speaker 1
And you will notice one thing.
21:42
Speaker 1
That when I will try to import this RPC URL, it will not work.
21:47
Speaker 1
It will throw me an error.
21:49
Speaker 1
So let me show you.
21:50
Speaker 1
I'll click on this and I will paste here.
21:53
Speaker 1
And click on add URL.
21:55
Speaker 1
It's giving me this particular error.
21:58
Speaker 1
Fetch chain ID.
22:00
Speaker 1
RPC correct.
22:03
Speaker 1
So this particular error you will face when your local node is not running.
22:09
Speaker 1
As you can see, my local node is not running.
22:12
Speaker 1
If I show you my package JSON file, I have to run this command.
22:18
Speaker 1
Then I can able to add the network.
22:20
Speaker 1
So this is what you have to do.
22:21
Speaker 1
So first what I'm going to do is.
22:24
Speaker 1
First I'm going to bring my terminal up.
22:27
Speaker 1
I'll type, I'll check my node version.
22:29
Speaker 1
Do I have the required one?
22:31
Speaker 1
Yes, I have.
22:32
Speaker 1
Command NPM run node and hit enter.
22:36
Speaker 1
And it's going to start our local node in our system.
22:37
Speaker 1
You can see it will give you 20 plus accounts.
22:41
Speaker 1
And you can only use this account to test your contract in the hard hat.
22:45
Speaker 1
Now our RPC server is started.
22:48
Speaker 1
Now we can easily be able to import in our MetaMask.
22:52
Speaker 1
So this one is very important.
22:54
Speaker 1
You have to use this account.
22:59
Speaker 1
Like this is the private key.
23:01
Speaker 1
And this is going to be your admin.
23:04
Speaker 1
And the rest of the account you can use as a user.
23:07
Speaker 1
Got it.
23:09
Speaker 1
This account will have the control over the smart contract.
23:12
Speaker 1
For registration of the candidate and the voter.
23:15
Speaker 1
That's very important.
23:17
Speaker 1
Now this is running.
23:19
Speaker 1
You have to make this running.
23:20
Speaker 1
Now we can able to add the local host in our MetaMask.
23:23
Speaker 1
So let's come back here.
23:25
Speaker 1
And I'm going to click on this, click on the add network.
23:28
Speaker 1
And I can give the information.
23:30
Speaker 1
So we'll say local host.
23:32
Speaker 1
I've given the name.
23:33
Speaker 1
Now I can give the RPC URL.
23:36
Speaker 1
So you can get the RPC URL from here.
23:38
Speaker 1
Or you can get the from here.
23:40
Speaker 1
Both are the same one.
23:43
Speaker 1
Like both are the same.
23:45
Speaker 1
Now I can come back here.
23:47
Speaker 1
And you will see that the moment I will add, I won't have any issue.
23:50
Speaker 1
So the RPC URL is added successfully.
23:53
Speaker 1
Perfect.
23:55
Speaker 1
Now we can give the chain ID.
23:57
Speaker 1
I can come back here.
23:59
Speaker 1
And this is the chain ID I have.
24:03
Speaker 1
Simply copy this one.
24:05
Speaker 1
And that's what I can provide here.
24:07
Speaker 1
And it says ETH.
24:09
Speaker 1
So I have to give the ETH symbol.
24:12
Speaker 1
Perfect.
24:14
Speaker 1
You can just skip this part.
24:16
Speaker 1
External URL.
24:18
Speaker 1
And I want to change it here as well.
24:20
Speaker 1
So it's saying ETH.
24:21
Speaker 1
So we have to use ETH.
24:24
Speaker 1
ETH.
24:26
Speaker 1
And that's what I can simply say ETH.
24:29
Speaker 1
Perfect.
24:30
Speaker 1
Save it.
24:32
Speaker 1
So this should be running.
24:33
Speaker 1
This should be running.
24:35
Speaker 1
Okay.
24:37
Speaker 1
Now I can click on this save.
24:40
Speaker 1
So the network is added successfully.
24:42
Speaker 1
Now I can simply come back here.
24:46
Speaker 1
And I can simply switch back to my local host.
24:48
Speaker 1
Click on it.
24:50
Speaker 1
Right now I'm connected with my local host.
24:53
Speaker 1
But the account which I'm using is my actual account on the main net and the test net.
24:58
Speaker 1
But I cannot use this account.
25:00
Speaker 1
So now I have to import this account.
25:03
Speaker 1
And I want you to import this account, this particular account first.
25:07
Speaker 1
Because it's going to be the admin.
25:09
Speaker 1
And I'm importing this account in my account number three.
25:13
Speaker 1
So I have one, two and I'm going to be the three.
25:15
Speaker 1
So I'll simply click here, click on this import account.
25:18
Speaker 1
And I'm going to paste my private key.
25:21
Speaker 1
And import.
25:23
Speaker 1
So I have import the account successfully.
25:26
Speaker 1
You can see it's loading.
25:28
Speaker 1
Here I will come.
25:30
Speaker 1
It's going to fetch the balance.
25:33
Speaker 1
You can see the account address is reflecting 2266.
25:37
Speaker 1
It's going to be the admin.
25:39
Speaker 1
Now what I will do.
25:41
Speaker 1
I can simply come back here.
25:42
Speaker 1
And I'm going to simply import this account.
25:46
Speaker 1
Account number one.
25:49
Speaker 1
The second account.
25:51
Speaker 1
So let's click here.
25:54
Speaker 1
Come back here.
25:56
Speaker 1
And click on this import.
25:59
Speaker 1
Paste and import.
26:01
Speaker 1
I have imported the four.
26:03
Speaker 1
In the four number account.
26:06
Speaker 1
So now I will import, let's say two more account.
26:10
Speaker 1
So I can show you all the transaction.
26:13
Speaker 1
So I can simply import one more account.
26:19
Speaker 1
Perfect.
26:21
Speaker 1
We have done with five.
26:23
Speaker 1
Three accounts we have imported.
26:25
Speaker 1
And we're going to import this one as well.
26:30
Speaker 1
You have to do exactly the same thing.
26:33
Speaker 1
Otherwise you're going to have a lot of confusion.
26:37
Speaker 1
So I have imported the account.
26:39
Speaker 1
Now it's fetching the balance.
26:41
Speaker 1
I can come back to account number three, which is the admin.
26:45
Speaker 1
Click here.
26:47
Speaker 1
It's still fetching the information.
26:49
Speaker 1
I'll simply give a reload.
26:51
Speaker 1
And I'm going to open the application one more time.
26:54
Speaker 1
And you can see the fund is reflecting fine.
26:58
Speaker 1
So I have this much fund.
26:59
Speaker 1
If I open this one.
27:02
Speaker 1
I have the full fund in my wallet address.
27:05
Speaker 1
But the moment I will execute the transaction and deploy the contract.
27:11
Speaker 1
This particular account going to pay the fee for deployment.
27:16
Speaker 1
So let's come back here.
27:18
Speaker 1
That's the first thing we have done.
27:20
Speaker 1
Make sure to keep running this.
27:23
Speaker 1
I'm going to simply close this one.
27:26
Speaker 1
Now I'm on the same admin account.
27:29
Speaker 1
Click on this register voter register.
27:31
Speaker 1
It will take me here.
27:33
Speaker 1
I'm going to simply remove it.
27:34
Speaker 1
And now I can simply register my voters.
27:37
Speaker 1
So I'll simply select here.
27:39
Speaker 1
You can pick any image.
27:42
Speaker 1
So this time I'll go with this.
27:45
Speaker 1
This.
27:47
Speaker 1
I'll select this image.
27:49
Speaker 1
It's going to simply upload.
27:52
Speaker 1
And just wait.
27:54
Speaker 1
Once the upload will complete, you will have the image right up here.
27:58
Speaker 1
I can give the details.
28:00
Speaker 1
I'll say.
28:03
Speaker 1
Voter one.
28:06
Speaker 1
I can give the address of the wallet.
28:09
Speaker 1
So I'll simply click here.
28:12
Speaker 1
I'm going to get the address.
28:15
Speaker 1
Copy.
28:17
Speaker 1
And that's what I can simply paste here.
28:20
Speaker 1
And I can give, let's say 30, 45.
28:23
Speaker 1
And click on this authorize voter.
28:26
Speaker 1
It's going to make a call.
28:28
Speaker 1
And I have to confirm the transaction.
28:30
Speaker 1
And the transaction is completed.
28:32
Speaker 1
I haven't given the vote and you can see the wallet address.
28:36
Speaker 1
Perfect.
28:38
Speaker 1
Got it.
28:40
Speaker 1
I want to register one more voter.
28:43
Speaker 1
So I'll simply select here.
28:45
Speaker 1
Can come back to my code.
28:47
Speaker 1
I can get the next address.
28:50
Speaker 1
Simply copy that one.
28:52
Speaker 1
I can come back here.
28:55
Speaker 1
Click on this.
28:57
Speaker 1
Click on the.
28:59
Speaker 1
And let's upload one more.
29:02
Speaker 1
So this time.
29:04
Speaker 1
I'm going to get this buddy.
29:05
Speaker 1
It's my image.
29:07
Speaker 1
It's uploading.
29:10
Speaker 1
And we have uploaded successfully.
29:13
Speaker 1
I'll say voter two.
29:15
Speaker 1
I can give the wallet address.
29:18
Speaker 1
This is the exact wallet address we have.
29:20
Speaker 1
Let's say 65.
29:22
Speaker 1
Perfect.
29:24
Speaker 1
Now I can give a age.
29:26
Speaker 1
I'll say 23.
29:28
Speaker 1
And click on this authorize voter.
29:31
Speaker 1
It's going to make a call.
29:33
Speaker 1
And we'll have this voter registered.
29:35
Speaker 1
So click on confirm.
29:38
Speaker 1
And the transaction went successfully.
29:40
Speaker 1
So we got two voters and a candidate.
29:44
Speaker 1
So I'll simply come back here.
29:46
Speaker 1
We have this.
29:47
Speaker 1
We have two candidate and two voter.
29:50
Speaker 1
Now we can able to give the vote.
29:52
Speaker 1
So you can simply come back here.
29:56
Speaker 1
And now if I show you.
29:59
Speaker 1
We have registered account number four and account number five as a candidate.
30:03
Speaker 1
And that's what we have here.
30:05
Speaker 1
Now we have to register the voters.
30:08
Speaker 1
So I'm going to use this account.
30:10
Speaker 1
Account number three and four.
30:12
Speaker 1
Got it.
30:14
Speaker 1
Now I can simply come back here.
30:17
Speaker 1
I'll simply close this one.
30:19
Speaker 1
Now I'm on the same admin account.
30:22
Speaker 1
Click on this register voter register.
30:25
Speaker 1
It will take me here.
30:27
Speaker 1
I'm going to simply remove it.
30:29
Speaker 1
And now I can simply register my voters.
30:32
Speaker 1
So I'll simply select here.
30:35
Speaker 1
You can pick any image.
30:37
Speaker 1
So this time I'll go with this.
30:40
Speaker 1
This.
30:42
Speaker 1
I'll select this image.
30:44
Speaker 1
It's going to simply upload.
30:47
Speaker 1
And just wait.
30:49
Speaker 1
Once the upload will complete, you will have the image right up here.
30:53
Speaker 1
I can give the details.
30:55
Speaker 1
I'll say.
30:58
Speaker 1
Voter one.
31:01
Speaker 1
I can give the address of the wallet.
31:04
Speaker 1
So I'll simply click here.
31:07
Speaker 1
I'm going to get the address.
31:10
Speaker 1
Copy.
31:12
Speaker 1
And that's what I can simply paste here.
31:15
Speaker 1
And I can give, let's say 30, 45.
31:18
Speaker 1
And click on this authorize voter.
31:21
Speaker 1
It's going to make a call.
31:23
Speaker 1
And I have to confirm the transaction.
31:26
Speaker 1
And the transaction is completed.
31:28
Speaker 1
I haven't given the vote and you can see the wallet address.
31:32
Speaker 1
Perfect.
31:34
Speaker 1
Got it.
31:36
Speaker 1
I want to register one more voter.
31:39
Speaker 1
So I'll simply select here.
31:41
Speaker 1
Can come back to my code.
31:43
Speaker 1
I can get the next address.
31:46
Speaker 1
Simply copy that one.
31:48
Speaker 1
I can come back here.
31:51
Speaker 1
Click on this.
31:53
Speaker 1
Click on the.
31:55
Speaker 1
And let's upload one more.
31:58
Speaker 1
So this time.
32:00
Speaker 1
I'm going to get this buddy.
32:01
Speaker 1
It's my image.
32:03
Speaker 1
It's uploading.
32:06
Speaker 1
And we have uploaded successfully.
32:09
Speaker 1
I'll say voter two.
32:11
Speaker 1
I can give the wallet address.
32:14
Speaker 1
This is the exact wallet address we have.
32:16
Speaker 1
Let's say 65.
32:18
Speaker 1
Perfect.
32:20
Speaker 1
Now I can give a age.
32:22
Speaker 1
I'll say 23.
32:24
Speaker 1
And click on this authorize voter.
32:27
Speaker 1
It's going to make a call.
32:29
Speaker 1
And we'll have this voter registered.
32:31
Speaker 1
So click on confirm.
32:34
Speaker 1
And the transaction went successfully.
32:36
Speaker 1
So we got two voters and a candidate.
32:39
Speaker 1
So I'll simply come back here.
32:41
Speaker 1
We have this.
32:43
Speaker 1
We have two candidate and two voter.
32:46
Speaker 1
Now we can able to give the vote.
32:48
Speaker 1
So you can simply come back here.
32:52
Speaker 1
And now if I show you.
32:55
Speaker 1
We have registered account number four and account number five as a candidate.
32:59
Speaker 1
And that's what we have here.
33:01
Speaker 1
Now we have to register the voters.
33:04
Speaker 1
So I'm going to use this account.
33:06
Speaker 1
Account number three and four.
33:09
Speaker 1
Got it.
33:11
Speaker 1
Now I can simply come back here.
33:14
Speaker 1
I'll simply close this one.
33:16
Speaker 1
Now I'm on the same admin account.
33:19
Speaker 1
Click on this register voter register.
33:22
Speaker 1
It will take me here.
33:24
Speaker 1
I'm going to simply remove it.
33:26
Speaker 1
And now I can simply register my voters.
33:29
Speaker 1
So I'll simply select here.
33:32
Speaker 1
You can pick any image.
33:34
Speaker 1
So this time I'll go with this.
33:37
Speaker 1
This.
33:39
Speaker 1
I'll select this image.
33:41
Speaker 1
It's going to simply upload.
33:44
Speaker 1
And just wait.
33:46
Speaker 1
Once the upload will complete, you will have the image right up here.
33:50
Speaker 1
I can give the details.
33:52
Speaker 1
I'll say.
33:55
Speaker 1
Voter one.
33:58
Speaker 1
I can give the address of the wallet.
34:01
Speaker 1
So I'll simply click here.
34:04
Speaker 1
I'm going to get the address.
34:07
Speaker 1
Copy.
34:09
Speaker 1
And that's what I can simply paste here.
34:12
Speaker 1
And I can give, let's say 30, 45.
34:15
Speaker 1
And click on this authorize voter.
34:18
Speaker 1
It's going to make a call.
34:20
Speaker 1
And I have to confirm the transaction.
34:22
Speaker 1
And the transaction is completed.
34:24
Speaker 1
I haven't given the vote and you can see the wallet address.
34:28
Speaker 1
Perfect.
34:30
Speaker 1
Got it.
34:32
Speaker 1
I want to register one more voter.
34:35
Speaker 1
So I'll simply select here.
34:37
Speaker 1
Can come back to my code.
34:39
Speaker 1
I can get the next address.
34:42
Speaker 1
Simply copy that one.
34:44
Speaker 1
I can come back here.
34:47
Speaker 1
Click on this.
34:49
Speaker 1
Click on the.
34:51
Speaker 1
And let's upload one more.
34:54
Speaker 1
So this time.
34:56
Speaker 1
I'm going to get this buddy.
34:57
Speaker 1
It's my image.
34:59
Speaker 1
It's uploading.
35:02
Speaker 1
And we have uploaded successfully.
35:05
Speaker 1
I'll say voter two.
35:07
Speaker 1
I can give the wallet address.
35:10
Speaker 1
This is the exact wallet address we have.
35:12
Speaker 1
Let's say 65.
35:14
Speaker 1
Perfect.
35:16
Speaker 1
Now I can give a age.
35:18
Speaker 1
I'll say 23.
35:20
Speaker 1
And click on this authorize voter.
35:23
Speaker 1
It's going to make a call.
35:25
Speaker 1
And we'll have this voter registered.
35:27
Speaker 1
So click on confirm.
35:30
Speaker 1
And the transaction went successfully.
35:32
Speaker 1
So we got two voters and a candidate.
35:36
Speaker 1
So I'll simply come back here.
35:38
Speaker 1
We have this.
35:40
Speaker 1
We have two candidate and two voter.
35:43
Speaker 1
Now we can able to give the vote.
35:45
Speaker 1
So you can simply come back here.
35:49
Speaker 1
And now if I show you.
35:52
Speaker 1
We have registered account number four and account number five as a candidate.
35:56
Speaker 1
And that's what we have here.
35:58
Speaker 1
Now we have to register the voters.
36:01
Speaker 1
So I'm going to use this account.
36:03
Speaker 1
Account number three and four.
36:06
Speaker 1
Got it.
36:08
Speaker 1
Now I can simply come back here.
36:11
Speaker 1
I'll simply close this one.
36:13
Speaker 1
Now I'm on the same admin account.
36:16
Speaker 1
Click on this register voter register.
36:19
Speaker 1
It will take me here.
36:21
Speaker 1
I'm going to simply remove it.
36:23
Speaker 1
And now I can simply register my voters.
36:26
Speaker 1
So I'll simply select here.
36:29
Speaker 1
You can pick any image.
36:31
Speaker 1
So this time I'll go with this.
36:34
Speaker 1
This.
36:36
Speaker 1
I'll select this image.
36:38
Speaker 1
It's going to simply upload.
36:41
Speaker 1
And just wait.
36:43
Speaker 1
Once the upload will complete, you will have the image right up here.
36:47
Speaker 1
I can give the details.
36:49
Speaker 1
I'll say.
36:52
Speaker 1
Voter one.
36:55
Speaker 1
I can give the address of the wallet.
36:58
Speaker 1
So I'll simply click here.
37:01
Speaker 1
I'm going to get the address.
37:04
Speaker 1
Copy.
37:06
Speaker 1
And that's what I can simply paste here.
37:09
Speaker 1
And I can give, let's say 30, 45.
37:12
Speaker 1
And click on this authorize voter.
37:15
Speaker 1
It's going to make a call.
37:17
Speaker 1
And I have to confirm the transaction.
37:20
Speaker 1
And the transaction is completed.
37:22
Speaker 1
I haven't given the vote and you can see the wallet address.
37:26
Speaker 1
Perfect.
37:28
Speaker 1
Got it.
37:30
Speaker 1
I want to register one more voter.
37:33
Speaker 1
So I'll simply select here.
37:35
Speaker 1
Can come back to my code.
37:37
Speaker 1
I can get the next address.
37:40
Speaker 1
Simply copy that one.
37:42
Speaker 1
I can come back here.
37:45
Speaker 1
Click on this.
37:47
Speaker 1
Click on the.
37:49
Speaker 1
And let's upload one more.
37:52
Speaker 1
So this time.
37:54
Speaker 1
I'm going to get this buddy.
37:55
Speaker 1
It's my image.
37:57
Speaker 1
It's uploading.
38:00
Speaker 1
And we have uploaded successfully.
38:03
Speaker 1
I'll say voter two.
38:05
Speaker 1
I can give the wallet address.
38:08
Speaker 1
This is the exact wallet address we have.
38:10
Speaker 1
Let's say 65.
38:12
Speaker 1
Perfect.
38:14
Speaker 1
Now I can give a age.
38:16
Speaker 1
I'll say 23.
38:18
Speaker 1
And click on this authorize voter.
38:21
Speaker 1
It's going to make a call.
38:23
Speaker 1
And we'll have this voter registered.
38:25
Speaker 1
So click on confirm.
38:28
Speaker 1
And the transaction went successfully.
38:30
Speaker 1
So we got two voters and a candidate.
38:34
Speaker 1
So I'll simply come back here.
38:36
Speaker 1
We have this.
38:38
Speaker 1
We have two candidate and two voter.
38:41
Speaker 1
Now we can able to give the vote.
38:43
Speaker 1
So you can simply come back here.
38:47
Speaker 1
And now if I show you.
38:50
Speaker 1
We have registered account number four and account number five as a candidate.
38:54
Speaker 1
And that's what we have here.
38:56
Speaker 1
Now we have to register the voters.
38:59
Speaker 1
So I'm going to use this account.
39:01
Speaker 1
Account number three and four.
39:04
Speaker 1
Got it.
39:06
Speaker 1
Now I can simply come back here.
39:09
Speaker 1
I'll simply close this one.
39:11
Speaker 1
Now I'm on the same admin account.
39:14
Speaker 1
Click on this register voter register.
39:17
Speaker 1
It will take me here.
39:19
Speaker 1
I'm going to simply remove it.
39:21
Speaker 1
And now I can simply register my voters.
39:24
Speaker 1
So I'll simply select here.
39:27
Speaker 1
You can pick any image.
39:29
Speaker 1
So this time I'll go with this.
39:32
Speaker 1
This.
39:34
Speaker 1
I'll select this image.
39:36
Speaker 1
It's going to simply upload.
39:39
Speaker 1
And just wait.
39:41
Speaker 1
Once the upload will complete, you will have the image right up here.
39:45
Speaker 1
I can give the details.
39:47
Speaker 1
I'll say.
39:50
Speaker 1
Voter one.
39:53
Speaker 1
I can give the address of the wallet.
39:56
Speaker 1
So I'll simply click here.
39:59
Speaker 1
I'm going to get the address.
40:02
Speaker 1
Copy.
40:04
Speaker 1
And that's what I can simply paste here.
40:07
Speaker 1
And I can give, let's say 30, 45.
40:10
Speaker 1
And click on this authorize voter.
40:13
Speaker 1
It's going to make a call.
40:15
Speaker 1
And I have to confirm the transaction.
40:18
Speaker 1
And the transaction is completed.
40:20
Speaker 1
I haven't given the vote and you can see the wallet address.
40:24
Speaker 1
Perfect.
40:26
Speaker 1
Got it.
40:28
Speaker 1
I want to register one more voter.
40:31
Speaker 1
So I'll simply select here.
40:33
Speaker 1
Can come back to my code.
40:35
Speaker 1
I can get the next address.
40:38
Speaker 1
Simply copy that one.
40:40
Speaker 1
I can come back here.
40:43
Speaker 1
Click on this.
40:45
Speaker 1
Click on the.
40:47
Speaker 1
And let's upload one more.
40:50
Speaker 1
So this time.
40:52
Speaker 1
I'm going to get this buddy.
40:53
Speaker 1
It's my image.
40:55
Speaker 1
It's uploading.
40:58
Speaker 1
And we have uploaded successfully.
41:01
Speaker 1
I'll say voter two.
41:03
Speaker 1
I can give the wallet address.
41:06
Speaker 1
This is the exact wallet address we have.
41:08
Speaker 1
Let's say 65.
41:10
Speaker 1
Perfect.
41:12
Speaker 1
Now I can give a age.
41:14
Speaker 1
I'll say 23.
41:16
Speaker 1
And click on this authorize voter.
41:19
Speaker 1
It's going to make a call.
41:21
Speaker 1
And I have to confirm the transaction.
41:24
Speaker 1
And the transaction is completed.
41:26
Speaker 1
I haven't given the vote and you can see the wallet address.
41:30
Speaker 1
Perfect.
41:32
Speaker 1
Got it.
41:34
Speaker 1
I want to register one more voter.
41:37
Speaker 1
So I'll simply select here.
41:39
Speaker 1
Can come back to my code.
41:41
Speaker 1
I can get the next address.
41:44
Speaker 1
Simply copy that one.
41:46
Speaker 1
I can come back here.
41:49
Speaker 1
Click on this.
41:51
Speaker 1
Click on the.
41:53
Speaker 1
And let's upload one more.
41:56
Speaker 1
So this time.
41:58
Speaker 1
I'm going to get this buddy.
41:59
Speaker 1
It's my image.
42:01
Speaker 1
It's uploading.
42:04
Speaker 1
And we have uploaded successfully.
42:07
Speaker 1
I'll say voter two.
42:09
Speaker 1
I can give the wallet address.
42:12
Speaker 1
This is the exact wallet address we have.
42:14
Speaker 1
Let's say 65.
42:16
Speaker 1
Perfect.
42:18
Speaker 1
Now I can give a age.
42:20
Speaker 1
I'll say 23.
42:22
Speaker 1
And click on this authorize voter.
42:25
Speaker 1
It's going to make a call.
42:27
Speaker 1
And we'll have this voter registered.
42:29
Speaker 1
So click on confirm.
42:32
Speaker 1
And the transaction went successfully.
42:34
Speaker 1
So we got two voters and a candidate.
42:38
Speaker 1
So I'll simply come back here.
42:40
Speaker 1
We have this.
42:42
Speaker 1
We have two candidate and two voter.
42:45
Speaker 1
Now we can able to give the vote.
42:47
Speaker 1
So you can simply come back here.
42:51
Speaker 1
And now if I show you.
42:54
Speaker 1
We have registered account number four and account number five as a candidate.
42:58
Speaker 1
And that's what we have here.
43:00
Speaker 1
Now we have to register the voters.
43:03
Speaker 1
So I'm going to use this account.
43:05
Speaker 1
Account number three and four.
43:08
Speaker 1
Got it.
43:10
Speaker 1
Now I can simply come back here.
43:13
Speaker 1
I'll simply close this one.
43:15
Speaker 1
Now I'm on the same admin account.
43:18
Speaker 1
Click on this register voter register.
43:21
Speaker 1
It will take me here.
43:23
Speaker 1
I'm going to simply remove it.
43:25
Speaker 1
And now I can simply register my voters.
43:28
Speaker 1
So I'll simply select here.
43:31
Speaker 1
You can pick any image.
43:33
Speaker 1
So this time I'll go with this.
43:36
Speaker 1
This.
43:38
Speaker 1
I'll select this image.
43:40
Speaker 1
It's going to simply upload.
43:43
Speaker 1
And just wait.
43:45
Speaker 1
Once the upload will complete, you will have the image right up here.
43:49
Speaker 1
I can give the details.
43:51
Speaker 1
I'll say.
43:54
Speaker 1
Voter one.
43:57
Speaker 1
I can give the address of the wallet.
44:00
Speaker 1
So I'll simply click here.
44:03
Speaker 1
I'm going to get the address.
44:06
Speaker 1
Copy.
44:08
Speaker 1
And that's what I can simply paste here.
44:11
Speaker 1
And I can give, let's say 30, 45.
44:14
Speaker 1
And click on this authorize voter.
44:17
Speaker 1
It's going to make a call.
44:19
Speaker 1
And I have to confirm the transaction.
44:22
Speaker 1
And the transaction is completed.
44:24
Speaker 1
I haven't given the vote and you can see the wallet address.
44:28
Speaker 1
Perfect.
44:30
Speaker 1
Got it.
44:32
Speaker 1
I want to register one more voter.
44:35
Speaker 1
So I'll simply select here.
44:37
Speaker 1
Can come back to my code.
44:39
Speaker 1
I can get the next address.
44:42
Speaker 1
Simply copy that one.
44:44
Speaker 1
I can come back here.
44:47
Speaker 1
Click on this.
44:49
Speaker 1
Click on the.
44:51
Speaker 1
And let's upload one more.
44:54
Speaker 1
So this time.
44:56
Speaker 1
I'm going to get this buddy.
44:57
Speaker 1
It's my image.
44:59
Speaker 1
It's uploading.
45:02
Speaker 1
And we have uploaded successfully.
45:05
Speaker 1
I'll say voter two.
45:07
Speaker 1
I can give the wallet address.
45:10
Speaker 1
This is the exact wallet address we have.
45:12
Speaker 1
Let's say 65.
45:14
Speaker 1
Perfect.
45:16
Speaker 1
Now I can give a age.
45:18
Speaker 1
I'll say 23.
45:20
Speaker 1
And click on this authorize voter.
45:23
Speaker 1
It's going to make a call.
45:25
Speaker 1
And I have to confirm the transaction.
45:28
Speaker 1
And the transaction went successfully.
45:30
Speaker 1
So we got two voters and a candidate.
45:34
Speaker 1
So I'll simply come back here.
45:36
Speaker 1
We have this.
45:38
Speaker 1
We have two candidate and two voter.
45:41
Speaker 1
Now we can able to give the vote.
45:43
Speaker 1
So you can simply come back here.
45:47
Speaker 1
And now if I show you.
45:50
Speaker 1
We have registered account number four and account number five as a candidate.
45:54
Speaker 1
And that's what we have here.
45:56
Speaker 1
Now we have to register the voters.
45:59
Speaker 1
So I'm going to use this account.
46:01
Speaker 1
Account number three and four.
46:04
Speaker 1
Got it.
46:06
Speaker 1
Now I can simply come back here.
46:09
Speaker 1
I'll simply close this one.
46:11
Speaker 1
Now I'm on the same admin account.
46:14
Speaker 1
Click on this register voter register.
46:17
Speaker 1
It will take me here.
46:19
Speaker 1
I'm going to simply remove it.
46:21
Speaker 1
And now I can simply register my voters.
46:24
Speaker 1
So I'll simply select here.
46:27
Speaker 1
You can pick any image.
46:29
Speaker 1
So this time I'll go with this.
46:32
Speaker 1
This.
46:34
Speaker 1
I'll select this image.
46:36
Speaker 1
It's going to simply upload.
46:39
Speaker 1
And just wait.
46:41
Speaker 1
Once the upload will complete, you will have the image right up here.
46:45
Speaker 1
I can give the details.
46:47
Speaker 1
I'll say.
46:50
Speaker 1
Voter one.
46:53
Speaker 1
I can give the address of the wallet.
46:56
Speaker 1
So I'll simply click here.
46:59
Speaker 1
I'm going to get the address.
47:02
Speaker 1
Copy.
47:04
Speaker 1
And that's what I can simply paste here.
47:07
Speaker 1
And I can give, let's say 30, 45.
47:10
Speaker 1
And click on this authorize voter.
47:13
Speaker 1
It's going to make a call.
47:15
Speaker 1
And I have to confirm the transaction.
47:18
Speaker 1
And the transaction is completed.
47:20
Speaker 1
I haven't given the vote and you can see the wallet address.
47:24
Speaker 1
Perfect.
47:26
Speaker 1
Got it.
47:28
Speaker 1
I want to register one more voter.
47:31
Speaker 1
So I'll simply select here.
47:33
Speaker 1
Can come back to my code.
47:35
Speaker 1
I can get the next address.
47:38
Speaker 1
Simply copy that one.
47:40
Speaker 1
I can come back here.
47:43
Speaker 1
Click on this.
47:45
Speaker 1
Click on the.
47:47
Speaker 1
And let's upload one more.
47:50
Speaker 1
So this time.
47:52
Speaker 1
I'm going to get this buddy.
47:53
Speaker 1
It's my image.
47:55
Speaker 1
It's uploading.
47:58
Speaker 1
And we have uploaded successfully.
48:01
Speaker 1
I'll say voter two.
48:03
Speaker 1
I can give the wallet address.
48:06
Speaker 1
This is the exact wallet address we have.
48:08
Speaker 1
Let's say 65.
48:10
Speaker 1
Perfect.
48:12
Speaker 1
Now I can give a age.
48:14
Speaker 1
I'll say 23.
48:16
Speaker 1
And click on this authorize voter.
48:19
Speaker 1
It's going to make a call.
48:21
Speaker 1
And I have to confirm the transaction.
48:24
Speaker 1
And the transaction is completed.
48:26
Speaker 1
I haven't given the vote and you can see the wallet address.
48:30
Speaker 1
Perfect.
48:32
Speaker 1
Got it.
48:34
Speaker 1
I want to register one more voter.
48:37
Speaker 1
So I'll simply select here.
48:39
Speaker 1
Can come back to my code.
48:41
Speaker 1
I can get the next address.
48:44
Speaker 1
Simply copy that one.
48:46
Speaker 1
I can come back here.
48:49
Speaker 1
Click on this.
48:51
Speaker 1
Click on the.
48:53
Speaker 1
And let's upload one more.
48:56
Speaker 1
So this time.
48:58
Speaker 1
I'm going to get this buddy.
48:59
Speaker 1
It's my image.
49:01
Speaker 1
It's uploading.
49:04
Speaker 1
And we have uploaded successfully.
49:07
Speaker 1
I'll say voter two.
49:09
Speaker 1
I can give the wallet address.
49:12
Speaker 1
This is the exact wallet address we have.
49:14
Speaker 1
Let's say 65.
49:16
Speaker 1
Perfect.
49:18
Speaker 1
Now I can give a age.
49:20
Speaker 1
I'll say 23.
49:22
Speaker 1
And click on this authorize voter.
49:25
Speaker 1
It's going to make a call.
49:27
Speaker 1
And I have to confirm the transaction.
49:30
Speaker 1
And the transaction went successfully.
49:32
Speaker 1
So we got two voters and a candidate.
49:36
Speaker 1
So I'll simply come back here.
49:38
Speaker 1
We have this.
49:40
Speaker 1
We have two candidate and two voter.
49:43
Speaker 1
Now we can able to give the vote.
49:45
Speaker 1
So you can simply come back here.
49:49
Speaker 1
And now if I show you.
49:52
Speaker 1
We have registered account number four and account number five as a candidate.
49:56
Speaker 1
And that's what we have here.
49:58
Speaker 1
Now we have to register the voters.
50:01
Speaker 1
So I'm going to use this account.
50:03
Speaker 1
Account number three and four.
50:06
Speaker 1
Got it.
50:08
Speaker 1
Now I can simply come back here.
50:11
Speaker 1
I'll simply close this one.
50:13
Speaker 1
Now I'm on the same admin account.
50:16
Speaker 1
Click on this register voter register.
50:19
Speaker 1
It will take me here.
50:21
Speaker 1
I'm going to simply remove it.
50:23
Speaker 1
And now I can simply register my voters.
50:26
Speaker 1
So I'll simply select here.
50:29
Speaker 1
You can pick any image.
50:31
Speaker 1
So this time I'll go with this.
50:34
Speaker 1
This.
50:36
Speaker 1
I'll select this image.
50:38
Speaker 1
It's going to simply upload.
50:41
Speaker 1
And just wait.
50:43
Speaker 1
Once the upload will complete, you will have the image right up here.
50:47
Speaker 1
I can give the details.
50:49
Speaker 1
I'll say.
50:52
Speaker 1
Voter one.
50:55
Speaker 1
I can give the address of the wallet.
50:58
Speaker 1
So I'll simply click here.
51:01
Speaker 1
I'm going to get the address.
51:04
Speaker 1
Copy.
51:06
Speaker 1
And that's what I can simply paste here.
51:09
Speaker 1
And I can give, let's say 30, 45.
51:12
Speaker 1
And click on this authorize voter.
51:15
Speaker 1
It's going to make a call.
51:17
Speaker 1
And I have to confirm the transaction.
51:20
Speaker 1
And the transaction is completed.
51:22
Speaker 1
I haven't given the vote and you can see the wallet address.
51:26
Speaker 1
Perfect.
51:28
Speaker 1
Got it.
51:30
Speaker 1
I want to register one more voter.
51:33
Speaker 1
So I'll simply select here.
51:35
Speaker 1
Can come back to my code.
51:37
Speaker 1
I can get the next address.
51:40
Speaker 1
Simply copy that one.
51:42
Speaker 1
I can come back here.
51:45
Speaker 1
Click on this.
51:47
Speaker 1
Click on the.
51:49
Speaker 1
And let's upload one more.
51:52
Speaker 1
So this time.
51:54
Speaker 1
I'm going to get this buddy.
51:55
Speaker 1
It's my image.
51:57
Speaker 1
It's uploading.
52:00
Speaker 1
And we have uploaded successfully.
52:03
Speaker 1
I'll say voter two.
52:05
Speaker 1
I can give the wallet address.
52:08
Speaker 1
This is the exact wallet address we have.
52:10
Speaker 1
Let's say 65.
52:12
Speaker 1
Perfect.
52:14
Speaker 1
Now I can give a age.
52:16
Speaker 1
I'll say 23.
52:18
Speaker 1
And click on this authorize voter.
52:21
Speaker 1
It's going to make a call.
52:23
Speaker 1
And I have to confirm the transaction.
52:26
Speaker 1
And the transaction went successfully.
52:28
Speaker 1
So we got two voters and a candidate.
52:32
Speaker 1
So I'll simply come back here.
52:34
Speaker 1
We have this.
52:36
Speaker 1
We have two candidate and two voter.
52:39
Speaker 1
Now we can able to give the vote.
52:41
Speaker 1
So you can simply come back here.
52:45
Speaker 1
And now if I show you.
52:48
Speaker 1
We have registered account number four and account number five as a candidate.
52:52
Speaker 1
And that's what we have here.
52:54
Speaker 1
Now we have to register the voters.
52:57
Speaker 1
So I'm going to use this account.
52:59
Speaker 1
Account number three and four.
53:02
Speaker 1
Got it.
53:04
Speaker 1
Now I can simply come back here.
53:07
Speaker 1
I'll simply close this one.
53:09
Speaker 1
Now I'm on the same admin account.
53:12
Speaker 1
Click on this register voter register.
53:15
Speaker 1
It will take me here.
53:17
Speaker 1
I'm going to simply remove it.
53:19
Speaker 1
And now I can simply register my voters.
53:22
Speaker 1
So I'll simply select here.
53:25
Speaker 1
You can pick any image.
53:27
Speaker 1
So this time I'll go with this.
53:30
Speaker 1
This.
53:32
Speaker 1
I'll select this image.
53:34
Speaker 1
It's going to simply upload.
53:37
Speaker 1
And just wait.
53:39
Speaker 1
Once the upload will complete, you will have the image right up here.
53:43
Speaker 1
I can give the details.
53:45
Speaker 1
I'll say.
53:48
Speaker 1
Voter one.
53:51
Speaker 1
I can give the address of the wallet.
53:54
Speaker 1
So I'll simply click here.
53:57
Speaker 1
I'm going to get the address.
54:00
Speaker 1
Copy.
54:02
Speaker 1
And that's what I can simply paste here.
54:05
Speaker 1
And I can give, let's say 30, 45.
54:08
Speaker 1
And click on this authorize voter.
54:11
Speaker 1
It's going to make a call.
54:13
Speaker 1
And I have to confirm the transaction.
54:16
Speaker 1
And the transaction is completed.
54:18
Speaker 1
I haven't given the vote and you can see the wallet address.
54:22
Speaker 1
Perfect.
54:24
Speaker 1
Got it.
54:26
Speaker 1
I want to register one more voter.
54:29
Speaker 1
So I'll simply select here.
54:31
Speaker 1
Can come back to my code.
54:33
Speaker 1
I can get the next address.
54:36
Speaker 1
Simply copy that one.
54:38
Speaker 1
I can come back here.
54:41
Speaker 1
Click on this.
54:43
Speaker 1
Click on the.
54:45
Speaker 1
And let's upload one more.
54:48
Speaker 1
So this time.
54:50
Speaker 1
I'm going to get this buddy.
54:51
Speaker 1
It's my image.
54:53
Speaker 1
It's uploading.
54:56
Speaker 1
And we have uploaded successfully.
54:59
Speaker 1
I'll say voter two.
55:01
Speaker 1
I can give the wallet address.
55:04
Speaker 1
This is the exact wallet address we have.
55:06
Speaker 1
Let's say 65.
55:08
Speaker 1
Perfect.
55:10
Speaker 1
Now I can give a age.
55:12
Speaker 1
I'll say 23.
55:14
Speaker 1
And click on this authorize voter.
55:17
Speaker 1
It's going to make a call.
55:19
Speaker 1
And I have to confirm the transaction.
55:22
Speaker 1
And the transaction went successfully.
55:24
Speaker 1
So we got two voters and a candidate.
55:28
Speaker 1
So I'll simply come back here.
55:30
Speaker 1
We have this.
55:32
Speaker 1
We have two candidate and two voter.
55:35
Speaker 1
Now we can able to give the vote.
55:37
Speaker 1
So you can simply come back here.
55:41
Speaker 1
And now if I show you.
55:44
Speaker 1
We have registered account number four and account number five as a candidate.
55:48
Speaker 1
And that's what we have here.
55:50
Speaker 1
Now we have to register the voters.
55:53
Speaker 1
So I'm going to use this account.
55:55
Speaker 1
Account number three and four.
55:58
Speaker 1
Got it.
56:00
Speaker 1
Now I can simply come back here.
56:03
Speaker 1
I'll simply close this one.
56:05
Speaker 1
Now I'm on the same admin account.
56:08
Speaker 1
Click on this register voter register.
56:11
Speaker 1
It will take me here.
56:13
Speaker 1
I'm going to simply remove it.
56:15
Speaker 1
And now I can simply register my voters.
56:18
Speaker 1
So I'll simply select here.
56:21
Speaker 1
You can pick any image.
56:23
Speaker 1
So this time I'll go with this.
56:26
Speaker 1
This.
56:28
Speaker 1
I'll select this image.
56:30
Speaker 1
It's going to simply upload.
56:33
Speaker 1
And just wait.
56:35
Speaker 1
Once the upload will complete, you will have the image right up here.
56:39
Speaker 1
I can give the details.
56:41
Speaker 1
I'll say.
56:44
Speaker 1
Voter one.
56:47
Speaker 1
I can give the address of the wallet.
56:50
Speaker 1
So I'll simply click here.
56:53
Speaker 1
I'm going to get the address.
56:56
Speaker 1
Copy.
56:58
Speaker 1
And that's what I can simply paste here.
57:01
Speaker 1
And I can give, let's say 30, 45.
57:04
Speaker 1
And click on this authorize voter.
57:07
Speaker 1
It's going to make a call.
57:09
Speaker 1
And I have to confirm the transaction.
57:12
Speaker 1
And the transaction is completed.
57:14
Speaker 1
I haven't given the vote and you can see the wallet address.
57:18
Speaker 1
Perfect.
57:20
Speaker 1
Got it.
57:22
Speaker 1
I want to register one more voter.
57:25
Speaker 1
So I'll simply select here.
57:27
Speaker 1
Can come back to my code.
57:29
Speaker 1
I can get the next address.
57:32
Speaker 1
Simply copy that one.
57:34
Speaker 1
I can come back here.
57:37
Speaker 1
Click on this.
57:39
Speaker 1
Click on the.
57:41
Speaker 1
And let's upload one more.
57:44
Speaker 1
So this time.
57:46
Speaker 1
I'm going to get this buddy.
57:47
Speaker 1
It's my image.
57:49
Speaker 1
It's uploading.
57:52
Speaker 1
And we have uploaded successfully.
57:55
Speaker 1
I'll say voter two.
57:57
Speaker 1
I can give the wallet address.
58:00
Speaker 1
This is the exact wallet address we have.
58:02
Speaker 1
Let's say 65.
58:04
Speaker 1
Perfect.
58:06
Speaker 1
Now I can give a age.
58:08
Speaker 1
I'll say 23.
58:10
Speaker 1
And click on this authorize voter.
58:13
Speaker 1
It's going to make a call.
58:15
Speaker 1
And I have to confirm the transaction.
58:18
Speaker 1
And the transaction went successfully.
58:20
Speaker 1
So we got two voters and a candidate.
58:24
Speaker 1
So I'll simply come back here.
58:26
Speaker 1
We have this.
58:28
Speaker 1
We have two candidate and two voter.

Frequently Asked Questions

What is the purpose of this video update regarding the decentralized voting DApp?

This video provides a quick update on the project, specifically addressing a setup problem faced by one student. It encourages viewers to follow the complete project to master decentralized voting management on the blockchain.

Where can users find the starter files and source code for the decentralized voting DApp?

Users can find the startup files by clicking 'get now' and then 'starter file' on the blockchain coder platform, which will lead them to GitHub. The complete source code, after downloading and extracting the zip file, will be in a folder called 'voting app'.

What modern technologies are utilized in the decentralized voting DApp project?

The project utilizes modern technologies that are relevant and help with optimization at a higher level. Users can inspect the 'package JSON file' to see the specific technologies being used.

Get More with the Söz AI App

Transcribe recordings, audio files, and YouTube videos — with AI summaries, speaker detection, and unlimited transcriptions.

Or transcribe another YouTube video here →