This project demostrates the use of unit tests and scripts to interact with Ballot contract (voting contract from Eth official documentation). Hardhat and Ethers are used to deploy the contract, stablish connection, and execute its methods.
.env MNEMONIC=""
Installation
yarn install
Compile Ballot.sol
yarn hardhat compile
Unit tests
yarn hardhat test
Deploy contract on Testnet
yarn hardhat run ./scripts/deploy.ts
Give right to vote
yarn hardhat run ./scripts/giveRightToVote.ts
Vote a proposal
yarn hardhat run ./scripts/vote.ts