IPoll
Poll interface
numSignUpsAndMessages
function numSignUpsAndMessages() external view returns (uint256 numSignups, uint256 numMsgs)
The number of messages which have been processed and the number of signups
Return Values
Name | Type | Description |
---|---|---|
numSignups | uint256 | The number of signups |
numMsgs | uint256 | The number of messages sent by voters |
topup
function topup(uint256 stateIndex, uint256 amount) external
Allows to publish a Topup message
Parameters
Name | Type | Description |
---|---|---|
stateIndex | uint256 | The index of user in the state queue |
amount | uint256 | The amount of credits to topup |
publishMessage
function publishMessage(struct DomainObjs.Message _message, struct DomainObjs.PubKey _encPubKey) external
Allows anyone to publish a message (an encrypted command and signature). This function also enqueues the message.
Parameters
Name | Type | Description |
---|---|---|
_message | struct DomainObjs.Message | The message to publish |
_encPubKey | struct DomainObjs.PubKey | An epheremal public key which can be combined with the coordinator's private key to generate an ECDH shared key with which to encrypt the message. |
mergeMaciStateAq
function mergeMaciStateAq() external
The second step of merging the MACI state AccQueue. This allows the ProcessMessages circuit to access the latest state tree and ballots via currentSbCommitment.
mergeMessageAqSubRoots
function mergeMessageAqSubRoots(uint256 _numSrQueueOps) external
The first step in merging the message AccQueue so that the ProcessMessages circuit can access the message root.
Parameters
Name | Type | Description |
---|---|---|
_numSrQueueOps | uint256 | The number of subroot queue operations to perform |