Dapp that solves the age-old debate of which pet is better - 😼 or 🐶? Cast your vote now on The Ultimate Cats vs Dogs Poll powered by blockchain to ensure transparency and immutability.
It is a React Dapp that lets you connect your wallet and cast exactly one vote, either an up or a downvote, for the two animals. You can either choose to upvote both of them (unbiased animal lover), downvote both of them (unbiased animal hater), or up and downvote one or the other (biased animal lover), to change the preferred % ratio for the purry and barking creature respectively.
Depending on the number of votes and voters, the preferred % ratio for each of the animals is calculated, updated and displayed.
I am new to blockchain development so I had to go through a bunch of Chainlink and Moralis tutorials to understand how to locally build smart contracts and web apps using Solidity, hardhat, and React. I then tweaked my tutorial project knowledge to make this Dapp.
Here is a list of tools and technologies I used to build this:
- Solidity: Write my smart contract code
- Chainlink: Experiment with ETH/USD conversion
- Hardhat/Rinkeby Testnet: Compile, deploy and verify my smart contracts
- React + basic HTML/CSS: Build a single-page web app
- Moralis: Connect smart contract and web app, sync events and live query the Votes database table
- GitHub Pages: Host my React web app on a live server