Poll
A poll's storage.
APPEND-ONLY: new fields may only be added at the end.
struct Poll {
uint256 groupId; // the Semaphore group whose members may vote
NullifierRegistryLib.Registry nullifiers; // per-poll spent set (scope = pollId)
mapping(uint256 choice => uint256 votes) tally; // votes per option
uint256 totalVotes; // total ballots counted
address creator; // the group admin who created the poll
uint32 numChoices; // valid options: 0..numChoices-1
uint64 startTime; // voting opens (0 = immediately)
uint64 endTime; // voting closes (0 = never)
bool exists;
}Properties
| Name | Type | Description |
|---|---|---|
| groupId | uint256 | |
| nullifiers | NullifierRegistryLib.Registry | |
| tally | mapping(uint256 choice => uint256 votes) | |
| totalVotes | uint256 | |
| creator | address | |
| numChoices | uint32 | |
| startTime | uint64 | |
| endTime | uint64 | |
| exists | bool |