Voting.sol
contains functions that allows access-controlled addition of candidates for elections, and forms the basis of a decentralized voting platform.
NOTE: This steps assumes that you have Metamask Wallet setup and configured for use. If you have not already, check this guide to get started.
- Copy the contract and paste it to Remix IDE.
- Navigate to the
COMPILE
tab, select an appropriate compiler version, and compile the contract. - Select
Injected Provider - Metamask
in theENVIRONMENT
field of theDEPLOY
tab and make sure your Metamask wallet is unlocked. This will connect Remix to the first account in your Metamask wallet. - Deploy the contract by approving the transaction request. Record the deployed contract Address from the
Deployed/Unpinned Contracts
field in theDEPLOY
tab and the Contract Application Binary Interface or ABI from theCOMPILE
tab. You have successfully deployed your contract on the Sepolia Testnet! - (OPTIONAL) Paste the deployed contract address in the Sepolia Testnet Explorer to view the details of the contract.
Note that you cannot vote for a particular candidate using the same wallet address.
Check out the deployed contract instance used in this project HERE.