-
Notifications
You must be signed in to change notification settings - Fork 0
/
UNVoting_HierachyList.sol
44 lines (36 loc) · 1.07 KB
/
UNVoting_HierachyList.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// SPDX-License-Identifier: Unlicensed
pragma experimental ABIEncoderV2;
pragma solidity ^0.8.0;
/**
* @title Types
* @dev All custom types that we have used in E-Voting will be declared here
*/
library HierarchyList {
struct Voter {
uint256 identityNumber; // voter unique ID
string name;
uint8 age;
string gender;
string useraddress;
uint8 stateCode;
uint8 constituencyCode;
bool isAlive;
uint256 votedTo; // identity number of the candidate
bool UNmember; //to get list of all UN Members (UN members can also [participate in voting)
}
struct Candidate {
string name;
string symbolOfElection;
uint256 nominationNumber; // unique ID of candidate
uint8 stateCode;
uint8 constituencyCode;
}
struct Results {
string name;
string symbolOfElection;
uint256 voteCount; // number of accumulated votes
uint256 nominationNumber; // unique ID of candidate
uint8 stateCode;
uint8 constituencyCode;
}
}