I would like to integrate in my website just a simple contract integration.
This is my first exercise on Dapp world and I'm not sure which is the best way to do things.
What I want to do is to enable a logged user to vote for a specific product in a brand.
What I think to do is deploy a Brand contract that store all my brands and a contract for all products associates to the brand (I think I can use just Brand's contract ).
The decision to not give a wallet for every user is because I don't understand how to prevent user to charge his wallet. I can't say "pay eth to vote, nobody will vote on whether it should pay". How can I give a wallet to my user and prevent cost for him?
So what I want to do is:
- Deploy a Brand contract.
- provide a web3 connection to smart contract.
- call a contract function to increment vote.
- call a contract function to get all votes for a product.
I know that it sound like a stupid question but I don't know where to start.
Sorry for my bad english.