Solidity API
ExceedsMaxVotePerUser
InsufficientVotedAmount
TokensStillLocked
NoTokensToWithdraw
InvalidAddress
Contract: POP
voteOnAttestation
Parameters
| Name | Description |
|---|---|
attestationUID | The unique identifier of the attestation |
amount | The amount of tokens to vote with |
requestVoteWithdrawal
Parameters
| Name | Description |
|---|---|
attestationUID | The unique identifier of the attestation |
amount | The amount of tokens to withdraw |
withdrawVotes
Parameters
| Name | Description |
|---|---|
attestationUID | The unique identifier of the attestation |
getPopularityScore
Parameters
| Name | Description |
|---|---|
attestationUID | The unique identifier of the attestation |
Return Values
| Description |
|---|
| The popularity score |
getUserVotedAmount
Parameters
| Name | Description |
|---|---|
attestationUID | The unique identifier of the attestation |
user | The address of the user |
Return Values
| Description |
|---|
| The amount of tokens voted |
getTotalVotedAmount
Parameters
| Name | Description |
|---|---|
attestationUID | The unique identifier of the attestation |
Return Values
| Description |
|---|
| The total amount of tokens voted |
getUnlockTime
Parameters
| Name | Description |
|---|---|
attestationUID | The unique identifier of the attestation |
user | The address of the user |
Return Values
| Description |
|---|
| The unlock time as a Unix timestamp |
setMaxVotePerUser
Parameters
| Name | Description |
|---|---|
_maxVotePerUser | The new maximum vote per user |
setCASAddress
Parameters
| Name | Description |
|---|---|
_casAddress | The new CAS contract address |
getTopAttestations
Parameters
| Name | Description |
|---|---|
count | The number of attestations to return |
Return Values
| Description |
|---|
| An array of attestation UIDs sorted by popularity |
getTopAttestationsWithScores
Return Values
| Description |
|---|
| Array of the top 3 attestation UIDs |
| Array of the scores for the top 3 attestations |
withdrawVoteToken
Parameters
| Name | Description |
|---|---|
amount | The amount of vote tokens to withdraw |
Public Functions
constructor
initialize
Parameters
| Name | Description |
|---|---|
initialOwner | The address that will own the contract |
voteToken | The address of the ERC20 token used for voting (same as CAS bond token) |
_casAddress | The address of the CAS contract |
_maxVotePerUser | Maximum vote amount per user per attestation |

