In this assignment, you will create a Voting Smart Contract, deploy it on any Ethereum test network using Remix (preferably using MetaMask), and submit your work through a Pull Request (PR) on GitHub.
You will also create a folder named with your roll number inside your respective branch.
Your smart contract should include at least the following features:
- Ability to add candidates
- Ability to vote for a candidate
- Prevent double voting
- Ability to view total votes for each candidate
-
Visit: https://remix.ethereum.org
-
Create a new file: Voting.sol
-
Paste your contract code
-
Open the Solidity Compiler tab
-
Select compiler version 0.8.20 or above
-
Click Compile Voting.sol
-
Go to Deploy & Run Transactions
-
(Bonus) Select environment: Injected Provider – MetaMask
-
(Bonus) Switch MetaMask to a test network (Sepolia / Holesky)
-
Click Deploy
- After deployment, Remix displays your contract address.
- Copy it — you will include it in the GitHub submission.
- Example:
/your-branch-name
/LCS20250XX
├── Voting.sol
└── contract-address.txt
-
✔ Voting.sol
-
Your complete smart contract file.
-
✔ contract-address.txt
-
Paste only your deployed contract address.
-
Example:
-
0x1234abcd5678ef901234abcd5678ef90aabbccdd
-
PR Title Format:
-
Added Voting Contract -
-
PR Description Must Include:
-
Your name
-
Your roll number
-
Contract address
-
Confirmation if deployed via MetaMask (for bonus)