PLCRVotingCheckpoint.sol
View Source: contracts/modules/Checkpoint/Voting/PLCR/PLCRVotingCheckpoint.sol
↗ Extends: PLCRVotingCheckpointStorage, VotingCheckpoint
PLCRVotingCheckpoint
Events
Functions
Arguments
Name | Type | Description |
_securityToken | address | |
_polyAddress | address |
createBallot
Use to create the ballot
Arguments
Name | Type | Description |
_commitDuration | uint256 | Unix time period till the voters commit there vote |
_revealDuration | uint256 | Unix time period till the voters reveal there vote starts when commit duration ends |
_noOfProposals | uint256 | Total number of proposal used in the ballot. In general it is 2 (For & Against) |
_quorumPercentage | uint256 | Minimum number of weight vote percentage requires to win a election. |
createCustomBallot
Use to create the ballot
Arguments
Name | Type | Description |
_commitDuration | uint256 | Unix time period till the voters commit there vote |
_revealDuration | uint256 | Unix time period till the voters reveal there vote starts when commit duration ends |
_noOfProposals | uint256 | Total number of proposal used in the ballot. In general it is 2 (For & Against) |
_quorumPercentage | uint256 | Minimum number of weight vote percentage requires to win a election. |
_checkpointId | uint256 | Valid checkpoint Id |
_startTime | uint256 | startTime of the ballot |
_createBallotWithCheckpoint
Arguments
Name | Type | Description |
_commitDuration | uint256 | |
_revealDuration | uint256 | |
_noOfProposals | uint256 | |
_quorumPercentage | uint256 | |
_checkpointId | uint256 | |
_startTime | uint256 |
commitVote
Used to commit the vote
Arguments
Name | Type | Description |
_ballotId | uint256 | Given ballot Id |
_secretVote | bytes32 | It is secret hash value (hashed offchain) |
revealVote
Used to reveal the vote
Arguments
Name | Type | Description |
_ballotId | uint256 | Given ballot Id |
_choiceOfProposal | uint256 | Proposal chossed by the voter. It varies from (1 to totalProposals) |
_salt | uint256 | used salt for hashing (unique for each user) |
changeBallotExemptedVotersList
Arguments
Name | Type | Description |
_ballotId | uint256 | Given ballot Id |
_voter | address | Address of the voter |
_exempt | bool | Whether it is exempted or not |
changeBallotExemptedVotersListMulti
Arguments
Name | Type | Description |
_ballotId | uint256 | Given ballot Id |
_voters | address[] | Address of the voter |
_exempts | bool[] | Whether it is exempted or not |
_changeBallotExemptedVotersList
Arguments
Name | Type | Description |
_ballotId | uint256 | |
_voter | address | |
_exempt | bool |
isVoterAllowed
Returns
bool
Arguments
Name | Type | Description |
_ballotId | uint256 | The index of the target ballot |
_voter | address | Address of the voter |
changeBallotStatus
⤾ overrides IVoting.changeBallotStatus
Allows the token issuer to set the active stats of a ballot
Arguments
Name | Type | Description |
_ballotId | uint256 | The index of the target ballot |
_isActive | bool | The bool value of the active stats of the ballot |
getCurrentBallotStage
Used to get the current stage of the ballot
Arguments
Name | Type | Description |
_ballotId | uint256 | Given ballot Id |
getBallotResults
⤾ overrides IVoting.getBallotResults
Queries the result of a given ballot
Returns
uint256 voteWeighting
Arguments
Name | Type | Description |
_ballotId | uint256 | Id of the target ballot |
getSelectedProposal
⤾ overrides IVoting.getSelectedProposal
Get the voted proposal
Arguments
Name | Type | Description |
_ballotId | uint256 | Id of the ballot |
_voter | address | Address of the voter |
getBallotDetails
⤾ overrides IVoting.getBallotDetails
Get the details of the ballot
Returns
uint256 quorum
Arguments
Name | Type | Description |
_ballotId | uint256 | The index of the target ballot |
getBallotCommitRevealDuration
Arguments
Name | Type | Description |
_ballotId | uint256 | Id of a ballot |
getInitFunction
⤾ overrides IModule.getInitFunction
This function returns the signature of configure function
Arguments
Name | Type | Description |
getPermissions
⤾ overrides IModule.getPermissions
Return the permissions flag that are associated with CountTransferManager
Arguments
Name | Type | Description |
_isGreaterThanZero
Arguments
Name | Type | Description |
_value | uint256 |
_checkIndexOutOfBound
Arguments
Name | Type | Description |
_ballotId | uint256 |
_checkValidStage
Arguments
Name | Type | Description |
_ballotId | uint256 | |
_stage | enum PLCRVotingCheckpointStorage.Stage |
Last updated