Voting Contract

This is a voting contract using Hardhat, to compile, test and deploy the contract. The contract was deployed on Sepolia Testnet

WALKTHROGH

  • After running npm install
  • You need to setup your environment variables by renaming .env.example to .env, then replace the uppercase keywords with their actual keys and links ETHERSCAN_KEY, PRIVATE_KEY from metamask and INFURA_LINK
  • You'll also need sepolia test ETH for deployment which can be gotten from various faucets like: sepoliafaucet, infurafaucet

SHELL COMMANDS

  • To compile the Voting.sol

npx hardhat compile

  • To test the contract

npx hardhat test

  • To deploy to sepolia testnet

npx hardhat run scripts/deploy.js --network sepolia