Skip to main content

Solidity API

ExceedsMaxVotePerUser

Custom errors for the POP contract

InsufficientVotedAmount

TokensStillLocked

NoTokensToWithdraw

InvalidAddress

Contract: POP

voteOnAttestation

Allows users to vote on an attestation to increase its popularity

Parameters

requestVoteWithdrawal

Allows users to request withdrawal of their votes

Parameters

withdrawVotes

Allows users to withdraw their tokens after timelock period

Parameters

getPopularityScore

Returns the popularity score of an attestation

Parameters

Return Values

getUserVotedAmount

Returns the amount of tokens voted by a user for an attestation

Parameters

Return Values

getTotalVotedAmount

Returns the total amount of tokens voted for an attestation

Parameters

Return Values

getUnlockTime

Returns the unlock time for a user’s voted tokens

Parameters

Return Values

setMaxVotePerUser

Updates the maximum vote per user

Parameters

Dev: Only callable by the contract owner

setCASAddress

Updates the CAS contract address

Parameters

Dev: Only callable by the contract owner

getTopAttestations

Get top N most popular attestations

Parameters

Return Values

getTopAttestationsWithScores

Get the top 3 attestations and their scores

Return Values

withdrawVoteToken

Withdraws specified amount of vote tokens from the contract

Parameters

Dev: Only callable by the contract owner

Public Functions

constructor

initialize

Initializes the POP contract with required parameters

Parameters

Events

TokensVoted

WithdrawalRequested

TokensWithdrawn

TopAttestationsUpdated