I have the front-end now ready and the MetaMask
has got all the accounts and I have here created about four or five accounts.
I'm just going to start off by registering some of the accounts.
So, let's register that.
Okay. That should go successfully.
Okay? Then it'll show that it's successful.
I'm going to go to the next account.
These were the support functions you found in the
App.js that brought about these to the Web,
and that was registered successfully.
Then, I'm going to go into the third account a two,
one and then "Register".
Remember that we're going from the owner and three accounts have been registered.
Let's run through one more.
But this time, I'm going to go to account number two
and try to register.
Let's see what happens.
You can see there's something happening here, there's no.
Okay, I just hit "Submit".
Okay. I'm just going to increase that, and then submit,
and you will see that registration failed because it was from account number two,
where only owner can do it.
Anyway we have registered three of them,
and let's see whether we can vote on all of them.
So, I'm just going to go back to one,
start voting from account one.
Account number one has got twice though.
So, let's see whether we can vote for banana,
the owner is voting for the banana.
That's good, and that went successfully and the rest of them,
the three of them outsiders and other than
the voter are going to vote for some other maybe apple this time.
So, they will vote for an apple and it should go through fine and successfully.
Let's see, we have one more account three,
and that's also apple and that went through all right.
You can see the gas points and other things are
indeed truly reflected and taking care of the MetaMask management.
I'm going to go to account four and again vote for an apple.
That should go through fine.
We can see the gas limit and other thing displayed.
Finally, I'm just going to go to account number five,
which has not been registered and see what happens here.
It has not been registered,
we do have a test case and I'm just going to see whether it can vote.
You can see that there is no gas limit here,
that means that account is unknown, when I submit,
it's going to say it failed because we do have a test case holding it,
and making sure that it will not work.
Note in this case, at the solidity contract
is written in such a way, unregistered cannot go.
So, we aborted enough and let's see whether we can declare the winner,
it should be apple.
Yes, the apple is a winner.
That is a complete DApp demo.