/election_blockchain

Primary LanguageJavaScriptMIT LicenseMIT

Election Based On Blockchain

pre-requisites

Install node

https://nodejs.org/en/download/

Install Ganache

https://www.trufflesuite.com/ganache

Install truffle

https://www.trufflesuite.com/docs/truffle/getting-started/installation

ganache should be running before hand

to setup project run "npm install" after cloning

After changes in contracts you need to migrate contracts as a new copy by runnig "truffle migrate --reset"

to compile transaction run "truffle compile"

to run tests of contracts run "truffle test"

to run project on lite-server, run "npm run dev"

Project Tour

Initial View

Initially both the candidates have

1

Confirm transaction for candidate 1

2_confrm_txn_for_cand1

Now Candidate 1 has 1 vote

3_voted_for_cand1

Once Voted from one account, user cannot vote again, so now we need to import another account

4_import_another_account

After confirmation for candidate 2, now candidate 2 also has one vote

5_cand2_txn_confrm