IVxPremia
Inherits: IPremiaStaking
Functions
getPoolVotes
get total votes for specific pools
function getPoolVotes(VoteVersion version, bytes calldata target) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
version | VoteVersion | version of target (used to know how to decode data) |
target | bytes | ABI encoded target of the votes |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | total votes for specific pool |
getUserVotes
get votes of user
function getUserVotes(address user) external view returns (VxPremiaStorage.Vote[] memory);
Parameters
Name | Type | Description |
---|---|---|
user | address | user from which to get votes |
Returns
Name | Type | Description |
---|---|---|
<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
Name | Type | Description |
---|---|---|
votes | VxPremiaStorage.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
}