A simple voting smart contract on Edu Chain that rewards participants with tokens for each valid vote. Ensures fair voting by preventing double voting and tracking rewards transparently.
This is a simple voting smart contract written in Solidity, designed to reward participants with tokens for voting. The contract is deployed on the Edu Chain at the following address:
Deployed Contract Address: 0xD4d9685A9B5fEB31D9A8062B6AF55bD89aE868B5
✅ Simple Voting Mechanism: Users can vote for any valid candidate address.
🎁 Token Rewards: Each voter is rewarded with 1 token for casting a valid vote.
🔒 One Vote Per Address: Prevents double voting by ensuring each address can only vote once.
📊 Vote Tracking: Allows anyone to check the total votes for a candidate.
💰 Reward Tracking: Users can check how many tokens they have earned.
vote(address _candidate)
Allows a user to vote for a candidate. Rewards the voter with 1 token upon successful voting.
checkRewards(address _voter)
Returns the total number of reward tokens earned by a voter.
getVotes(address _candidate)
Returns the total number of votes received by a candidate.
Connect your wallet to the Edu Chain network.
Interact with the contract using the deployed address.
Cast your vote by providing a valid candidate address.
Check your rewards and candidate vote counts using the available functions.
Solidity ^0.8.0
Edu Chain-compatible wallet (e.g., MetaMask)
Network: Edu Chain
Deployed Address: 0xD4d9685A9B5fEB31D9A8062B6AF55bD89aE868B5
This project is licensed under the MIT License.
Feel free to contribute or raise issues for improvements!
50
0