Skip to content

voting dApp to cast votes, delegate and query results on chain

Notifications You must be signed in to change notification settings

EC-EVM/voting-dapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Voting dApp

Create a voting dApp to cast votes, delegate and query results on chain
Request voting tokens to be minted using the API
(bonus) Store a list of recent votes in the backend and display that on frontend
(bonus) Use an oracle to fetch off-chain data
Use an oracle to fetch information from a data source of your preference
Use the data fetched to create the proposals in the constructor of the ballot

Voting dApp integration guidelines

  • Build the frontend using Scaffold ETH 2 as a base
  • Build the backend using NestJS to provide the Mint method
  • Implement a single POST method
  • Request voting tokens from API
  • Use these tokens to interact with the tokenized ballot
  • All other interactions must be made directly on-chain

Getting Started

  1. Make sure you have your .env file up-to-date. Running the backend api's:
cd backend
npm install
npm run start:dev

Point your browser to see the swagger api: http://localhost:3001/api

  1. Running the frontend scaffold eth 2:
cd frontend
yarn install
yarn start

Group 2 Information

Unique id Discord username
RAAzLF @GRAVER 👾
2SyBp0 @wackozacco
10exgX @δαλλασκατ
r5YSqY @imchrismayfield
HhHAQw @swooz
Pok9XD @Timster
T5zGzt @Carl Youngblood

Final Report

Our group collaborated on the dapp functionality. Our repo requires that the TOKEN_ADDRESS and BALLOT_ADDRESS you want to visualize be set in the .env file. The dapp allows you to delegate votes, deploy a new tokenized ballot, and cast your vote on the ballot. A possible future improvement would be to traverse prior blockchain transactions to infer all previously deployed contracts and then display their results in the dapp.

References

token contract: 0x3c9d658a9b358cf1985bc52c5476229e8b186f1f

About

voting dApp to cast votes, delegate and query results on chain

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published