npm install
npx hardhat compile
make update-abi
cd votingdapp
andnpm install
npx hardhat node
-- keep this running in a separate terminal window. Copy a private key from a generated account.npx hardhat run --network localhost scripts/deploy.js
-- Copy the Contract Address and replace theContractAddress
variable in bothscripts/addPoll.js
andvotingdapp/src/initBlockchain.js
npx hardhat run scripts/addPoll.js
cd votingdapp
andnpm start
- From the dropdown in Metamask UI, choose
localhost:8545
as the network - From the menu in the upper right corner
Create Account
- Move to
Import
tab - Paste the private key copied in Step 5 above and click
Import