Create a .env file at the Project root with a wallet's private key.
PRIVATE_KEY=<your private key>npm run deployment <proposals>
Deploys the Ballot contract to the Ropsten test network. The wallet
Example
npm run deployment A B C D
npm run castVote <ballotContractAddress> <proposalIndex>
Casts a vote for a proposal by the proposal index. The voter needs to have the right to vote (see Give Voting Rights).
npm run giveVotingRights <ballotContractAddress> <walletAddressToGiveVotingRightsTo>
Gives a wallet the right to vote.
npm run delegateVote <ballotContractAddress> <walletAddressToDelegateVotingRightsTo>
Gives another wallet the right to vote on your behalf. The delegating wallet must not have voted. The delegate wallet must have the right to vote.
npm run queryProposals <ballotContractAddress>
Displays all the proposals and their current vote count.
npm run queryWinningProposal <ballotContractAddress>
Display the winning proposal and it's current vote count.