ZK Vote Architecture
Vote
groupInfo
struct groupInfo {
uint256 id;
string name;
string desc;
string icon;
enum Vote.PRIVACY privacy;
address asset;
}
GroupInfo
event GroupInfo(uint256 groupId, string name, string desc, string icon, enum Vote.PRIVACY privacy, address asset)
CreateGroupExtra
function CreateGroupExtra(uint256 merkleTreeDepth, address admin, string name, string description, string privacy, string icon) public returns (uint256 groupId)
CreateGroupWithAssetDemand
function CreateGroupWithAssetDemand(uint256 merkleTreeDepth, address admin, string name, string description, enum Vote.PRIVACY privacy, string icon, address asset) public returns (uint256 groupId)
createPollInGroup
function createPollInGroup(uint256 groupId, string[] voteMsgs, string title) public returns (uint256 pollId)
votePollInGroup
function votePollInGroup(uint256 rc, uint256 groupId, uint256[8] group_proof, uint256 pollId, string voteMsg, uint256 nullifierHash, uint256 externalNullifier, uint256[8] signal_proof) public
Group
updateMember
function updateMember(uint256 groupId, uint256 identityCommitment, uint256 newIdentityCommitment, uint256[] proofSiblings, uint8[] proofPathIndices) public