Skip to content

5jisoo/SimpleVoting-DApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🗳️ Simple Voting DApp 🗳️

관리자 계정 잠금 해제 Unlock Admin Account
유권자 등록 Register Voters
제안서 등록 Register Proposals
투표 Vote

Installation

terminal

  • run geth console
% geth --datadir "data" \
--http  \
--http.addr "0.0.0.0" \
--http.port "8545" \
--http.api "web3,eth,personal,net" \
--http.corsdomain "*" \
--allow-insecure-unlock \
--nodiscover console
  • execute migration
% cd SimpleVoting
% truffle migrate

geth

  • connect to blockchain
> miner.start()
> miner.stop()

terminal

  1. copy json file to SimpleVotingWeb project
  2. move to root folder of SimpleVotingWeb project (/SimpleVotingWeb)
  3. install npm dependencies
  4. execute web project
% cp SimpleVoting/build/contracts/SimpleVoting.json SimpleVotingWeb/contracts/SimpleVoting.json
% cd SimpleVotingWeb
% npm install
% node webserver.js

Structure

📦SimpleVoting
 ┣ 📂contracts
 ┃ ┗ 📜SimpleVoting.sol
 ┣ 📂migrations
 ┃ ┗ 📜1_deploy_contracts.js
 ┗ 📜truffle-config.js
📦SimpleVotingWeb
 ┣ 📂assets
 ┃ ┣ 📜admin.html
 ┃ ┗ 📜voter.html
 ┣ 📂contracts
 ┃ ┗ 📜SimpleVoting.json
 ┣ 📂src
 ┃ ┣ 📜registerProposal.js
 ┃ ┣ 📜registerVoter.js
 ┃ ┣ 📜tallyVotes.js
 ┃ ┣ 📜util.js
 ┃ ┗ 📜vote.js
 ┣ 📜index.js
 ┣ 📜package-lock.json
 ┗ 📜package.json

About

Voting DApp 투표 분산 애플리케이션

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published