You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: frontend/README.md
+11-15Lines changed: 11 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,15 +2,13 @@
2
2
3
3
## 1. Overview
4
4
5
-
Power Voting dApp utilizes timelock based on smart contract technology to achieve fair and private voting. Before the voting deadline, no one’s voting results will be seen by others, and the voting process will not be disturbed by other participant’s voting results. After the voting deadline, anyone can count the votes in a decentralized manner, and the results of the counting will executed and stored by smart contract and will not be manipulated by any centralized organization or individual.
6
-
7
-
Power Voting dApp aims to become the infrastructure of DAO governance.
5
+
Power Voting dApp is implemented according to [Filecoin Community Voting Specs](https://docs.google.com/document/d/13910NE-O3mUQ6rztt6f3xe7hwW_aS-xaPW_zHuTpBW4/edit#heading=h.4kbcnjlru68f). It utilizes Drand Timelock technology to achieve fair and private voting. It supports voting for multiple roles including Token Holders, Storage Providers, Clients and Developers. Different roles are given different voting weights according to their contributions or token holdings. Power Voting dApp allows different roles with different voting weights to cast the votes and then unify voting power.
8
6
9
7
## 2. Problem
10
8
11
9
In the community voting process governed by DAO, since the voting data of other community members can be seen before the vote counting time, the community members will be affected by the existing voting data before voting, and some members will even take advantage of a large number of voting rights in their hands to vote at the end of the voting process to make the voting results are reversed, resulting in unfair voting.
12
10
13
-
In the centralized voting process, since the vote counting power is in the hands of the centralized organization, it will cause problems such as vote fraud and black box operation of vote counting, resulting in the voting results being manipulated by others, which cannot truly reflect the wishes of the community.
11
+
In the centralized voting process, since the vote counting power is in the hands of the centralized organization, it will cause problems such as vote fraud and black box operation of vote counting, resulting in the voting results being manipulated by others, which cannot truly reflect the views of the community.
14
12
15
13
## 3. Solution
16
14
@@ -26,7 +24,7 @@ When creating a proposal, the creator will enter a voting expiration time, and P
26
24
27
25
## 5. Voting Power Snapshot
28
26
29
-
Power Oracle will request raw data from FileCoin, GitHub and other data sources to calculate role identity and voting power and save them into Power Oracle contracts. SP and Client respectively invoke the `PowerAPI.minerRawPower(filActorld)` and `DataCapAPI.balance(filActorld)` interfaces to retrieve power. Power Oracle contracts will store 60 days history of voting power. When users vote, only the percentage is recorded, not the actual voting power. During the vote counting process, a random weight will be selected from the 60 days history and multiplied by the percentage to calculate the vote.
27
+
Power Oracle will request raw data from FileCoin, GitHub and other data sources to identify roles and calculate their voting weights and save them into Power Oracle contracts. SP and Client respectively invoke the `PowerAPI.minerRawPower(filActorld)` and `DataCapAPI.balance(filActorld)` interfaces to retrieve power. Power Oracle contracts will store 60-day history of voting power. When users vote, only the percentage is recorded, not the actual voting power. During the vote counting process, a random weight will be selected from the 60 days history and multiplied by the percentage to calculate the vote.
30
28
31
29
## 6. Power Voting Flowchart
32
30
@@ -41,9 +39,9 @@ Power Oracle will request raw data from FileCoin, GitHub and other data sources
41
39

42
40

43
41
44
-
## 9. Install
42
+
## 9. Deploy
45
43
46
-
#### 1.Environment and Development Tools
44
+
#### 1.Environment and Development Tools
47
45
48
46
1.Node.js 14 or later installed
49
47
@@ -55,15 +53,15 @@ Power Oracle will request raw data from FileCoin, GitHub and other data sources
55
53
56
54
<imgsrc="./img/git.png"style="zoom:50%;"alt="" />
57
55
58
-
#### 2.Download Source Code
56
+
#### 2.Download Source Code
59
57
60
58
Download the source code with the following command:
Deploying PowerVoting and Oracle contract on Filecoin main network and replace the following address in ‘/.env.example’
82
80
@@ -96,7 +94,7 @@ Create wallet connect project id by https://www.rainbowkit.com/docs/migration-gu
96
94
97
95
Set 'WALLET_CONNECT_ID' in ‘/.env.example’
98
96
99
-
#### 6.Build And Package
97
+
#### 6.Build And Package
100
98
101
99
Build with the following command:
102
100
@@ -108,13 +106,11 @@ After building, you will get a 'dist' folder in the root directory.
108
106
109
107
<imgsrc="img/dist.png"style="zoom:50%;"alt="" />
110
108
111
-
#### 7.Deployment
109
+
#### 7.Deployment
112
110
113
111
To deploy the 'dist ' folder generated after building your front-end project, you can follow these steps:
114
112
115
113
1.**Upload the dist folder to the server**: Upload the `dist` folder to your server. You can use FTP tools, SSH, or other methods to transfer the files to a specific directory on your server.
116
114
2.**Configure the Web Server**: Ensure that your web server (such as Nginx, Apache, etc.) is properly configured, and you know where to serve static files from. Add a new site or virtual host in the configuration file and set the document root to point to the uploaded `dist` folder.
117
115
3.**Start the Web Server**: Start or restart your web server to apply the new configuration.
118
-
4.**Access the Website**: Open your browser and enter your domain name or server IP address. You should be able to see your deployed front-end application.
119
-
120
-
116
+
4.**Access the Website**: Open your browser and enter your domain name or server IP address. You should be able to see your deployed front-end application.
0 commit comments