This project demonstrates a basic voting app with the Ethereum blockchain. It contains a Solidity smart contract along with a simple client app.
The smart contract has been implemented with hardhat. The client has been implemented with ethers.js and jquery to be as simple as possible.
- Edit the
Voter.sol
solidity contract - Run the tests:
npx hardhat test
- Copy over Voter ABI to be used by the js:
copy artifacts\contracts\Voter.sol\Voter.json client\Voter.json
- Run the local hardhat node:
npx hardhat node
- Deploy the contract to the local node:
npx hardhat run --network localhost scripts/deploy.js
- Import the local account to metamask
- Run esbuild to watch for changes:
npm run watch
- Edit
client\src\app.js
andclient\index.html