Skip to content

Latest commit

 

History

History
58 lines (38 loc) · 1.26 KB

README.md

File metadata and controls

58 lines (38 loc) · 1.26 KB

Voting App exection Guide

Thank you for using my Voting application.
This application consists of three parts: Smart contract, unit test and front-end.

Getting Started

  1. Run Hardhat Network: You can run a local Hardhat Network instance by running:
npx hardhat node

This will spin up a local Ethereum network. You will see output similar to:

Started HTTP and WebSocket JSON-RPC server at http://127.0.0.1:8545/

Accounts:
0x123... (1000 ETH)
0x456... (1000 ETH)
...
  1. Keep the Local Node Running: Leave this terminal open with the node running. This network mimics a real Ethereum environment, but it’s only local, so transactions are fast and don't require real ETH.

  2. Compile the smart contract

npx hardhat compile
  1. Deploy to the localtest net
npx hardhat run scripts/deploy.js --network localhost
  1. Run the test on the local testnet
npx hardhat test --network localhost
  1. Run the front-end

Leave this terminal open with the node running. Open other terminal.

npm start

Reference

MetaMask must be installed to ensure interaction between the frontend and voting contract deployed on the local testnet.
The process of a contract can be simulated through the front-end.