Checkpoint module for token weighted vote (WeightedVoteCheckpoint.sol)
View Source: contracts/modules/Checkpoint/Voting/Transparent/WeightedVoteCheckpoint.sol
↗ Extends: WeightedVoteCheckpointStorage, VotingCheckpoint
WeightedVoteCheckpoint
This voting system uses public votes
Events
Functions
Constructor
Arguments
Name | Type | Description |
_securityToken | address | Address of the security token |
_polyToken | address | Address of the polytoken |
getInitFunction
⤾ overrides IModule.getInitFunction
This function returns the signature of configure function
Arguments
Name | Type | Description |
createBallot
Allows the token issuer to create a ballot
Arguments
Name | Type | Description |
_duration | uint256 | The duration of the voting period in seconds |
_noOfProposals | uint256 | Number of proposals |
_quorumPercentage | uint256 | Minimum Quorum percentage required to make a proposal won |
_createCustomBallot
Arguments
Name | Type | Description |
_checkpointId | uint256 | |
_quorumPercentage | uint256 | |
_startTime | uint256 | |
_endTime | uint256 | |
_noOfProposals | uint256 |
createCustomBallot
Allows the token issuer to create a ballot with custom settings
Arguments
Name | Type | Description |
_checkpointId | uint256 | Index of the checkpoint to use for token balances |
_quorumPercentage | uint256 | Minimum Quorum percentage required to make a proposal won |
_startTime | uint256 | Start time of the voting period in Unix Epoch time |
_endTime | uint256 | End time of the voting period in Unix Epoch time |
_noOfProposals | uint256 | Number of proposals |
castVote
Allows a token holder to cast their vote on a specific ballot
Arguments
Name | Type | Description |
_ballotId | uint256 | The index of the target ballot |
_proposalId | uint256 | Id of the proposal which investor want to vote for proposal |
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
Returns
bool success
Arguments
Name | Type | Description |
_ballotId | uint256 | The index of the target ballot |
_isActive | bool | The bool value of the active stats of the ballot |
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 |
getPermissions
⤾ overrides IModule.getPermissions
Return the permissions flag that are associated with STO
Returns
bytes32 array
Arguments
Name | Type | Description |
_checkIndexOutOfBound
Arguments
Name | Type | Description |
_ballotId | uint256 |
Last updated