blockchain-voting-system

Decentralized voting system written in java

https://github.com/jensenyang2004/blockchain-voting-system

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (4.0%) to scientific vocabulary

Keywords

etheruem java web3j
Last synced: 6 months ago · JSON representation ·

Repository

Decentralized voting system written in java

Basic Info
  • Host: GitHub
  • Owner: jensenyang2004
  • Language: Java
  • Default Branch: main
  • Homepage:
  • Size: 336 KB
Statistics
  • Stars: 1
  • Watchers: 0
  • Forks: 1
  • Open Issues: 0
  • Releases: 0
Topics
etheruem java web3j
Created over 4 years ago · Last pushed over 4 years ago
Metadata Files
Readme Citation

README.md

DECENTRIALIZED VOTING SYSTEM

Build Status codecov.io License

程式碼原始路徑

## 投票合約程式碼路徑: ### 複製檔路徑:blockchain-voting-system/投票合約.sol

## 母合約程式碼路徑: ### 複製檔路徑:blockchain-voting-system/母合約.sol

## 主系統程式碼路徑: ### 複製檔路徑:blockchain-voting-system/系統主程式碼.java

Web3j 原始碼的生成指令

1_IVmYRWgQ4yw_aaUNJXdMfw

系統操作流程

母合約在整個系統中是必要的元素,在設計中,一個區塊鏈中(整個國家只會擁有一個區塊鏈)理論上只會存在一個母合約,而隨著投票的進行,投票合約會被母合約發佈,而母合約終究只有一個。

下方流程都是在母合約發佈後才能進行的操作,要發佈母合約,必須透過Java程式來進行發佈,母合約發佈檔路徑 blockchain-voting-system/src/main/java/org/web3j/mavenplugin/Main2.java 

登入畫面

2021-06-27 (9)

執行程式後會看到登入畫面,在文字框內輸入自己帳號的私鑰和地址便可登入。

合約發布

2021-06-16 (12)

如果登入者微系統預設管理者的私鑰則會出現部屬合約的視窗,管理者輸入候選人的名字後發布合約(預設候選人數為三個)。

2021-06-18 (2)

看到跳出視窗代表合約部屬成功

管理者畫面

2021-06-27 (3)

投票者畫面

2021-06-27 (5)

接著管理者可以看到管理者的操縱畫面,有start ballot 跟 end ballot兩個按鈕,管理者按下 start ballot 後投票者才能開始投票,當管理者按下結束投票,管理者視窗會跳出最終結果畫面。
但如果投票人要看到投票結果要按下顯示選舉結果按鈕,如果投票已經結束,才會顯示出結果視窗。另外refresh按鈕可以讓管理者在部屬合約時更新管理者畫面。

結果畫面

2021-06-27 (8)

結果頁面有每個候選人獲取的票數和當選者的名字顯示在最上方。

Ganache-cli畫面

因為UI介面的ganache測試鏈出現問題,使用架構相同ganache-cli來當作測試鏈。

1 2 3

Ganache畫面

原本使用的ganache畫面

image

Owner

  • Login: jensenyang2004
  • Kind: user

Citation (citation.cff)

cff-version: 1.2.0
authors:
  - family-names: Yang
    given-names: Jing Cheng
title: "blockchain voting system"
version: 11.01
doi: 10.5281/zenodo.5544148
date-released: 2021-09-30

GitHub Events

Total
Last Year

Dependencies

pom.xml maven
  • org.apache.maven.plugin-tools:maven-plugin-annotations 3.6.0 provided
  • com.googlecode.json-simple:json-simple 1.1.1
  • org.apache.maven.shared:file-management 3.0.0
  • org.apache.maven:maven-core 3.6.0
  • org.apache.maven:maven-plugin-api 3.6.0
  • org.slf4j:slf4j-simple 1.7.25
  • org.web3j:codegen 4.8.4
  • org.web3j:core 4.8.4
  • org.web3j:web3j-sokt 0.2.1
  • junit:junit 4.12 test
  • org.apache.maven.plugin-testing:maven-plugin-testing-harness 3.3.0 test
  • org.apache.maven:maven-compat 3.6.0 test
src/test/projects/import/pom.xml maven
src/test/projects/import-with-path/pom.xml maven
src/test/projects/import-with-path-with-spaces/pom.xml maven
src/test/projects/invalid/pom.xml maven
src/test/projects/issue/17/pom.xml maven
src/test/projects/issue/17.1/pom.xml maven
src/test/projects/issue/23/pom.xml maven
src/test/projects/issue/63/pom.xml maven
src/test/projects/valid/pom.xml maven