IVxPremia

Git Source

Inherits: IPremiaStaking

Functions

getPoolVotes

get total votes for specific pools

function getPoolVotes(VoteVersion version, bytes calldata target) external view returns (uint256);

Parameters

NameTypeDescription
versionVoteVersionversion of target (used to know how to decode data)
targetbytesABI encoded target of the votes

Returns

NameTypeDescription
<none>uint256total votes for specific pool

getUserVotes

get votes of user

function getUserVotes(address user) external view returns (VxPremiaStorage.Vote[] memory);

Parameters

NameTypeDescription
useraddressuser from which to get votes

Returns

NameTypeDescription
<none>VxPremiaStorage.Vote[]votes of user

castVotes

add or remove votes, in the limit of the user voting power

function castVotes(VxPremiaStorage.Vote[] calldata votes) external;

Parameters

NameTypeDescription
votesVxPremiaStorage.Vote[]votes to cast

Events

AddVote

event AddVote(address indexed voter, VoteVersion indexed version, bytes target, uint256 amount);

RemoveVote

event RemoveVote(address indexed voter, VoteVersion indexed version, bytes target, uint256 amount);

Errors

VxPremia__InvalidPoolAddress

error VxPremia__InvalidPoolAddress();

VxPremia__InvalidVoteTarget

error VxPremia__InvalidVoteTarget();

VxPremia__NotEnoughVotingPower

error VxPremia__NotEnoughVotingPower();

Enums

VoteVersion

enum VoteVersion {
    V2,
    VaultV3
}