Votes trait is the interface for "what" is the voting power in a DAO.
get_votes(&self, account: AccountId, timestamp: Option<Timestamp>) -> Balance;
Returns the voting power of a given
account at specified
timestamp (if applicable).
- account - Address of the account for which we query the voting power.
- timestamp - Optional Timestamp in miliseconds at which we query the voting power.
fn delegate(&mut self, delegatee: AccountId) -> Result<(), VotesError>;
Delegates the voting power of the caller to
- delegatee - Address of the account for which we delegate the voting power.
fn delegates(&mut self, delegator: AccountId) -> Option<AccountId>;
Returns the address of of the delegatee of the
- delegator - Address of the account for which we query the address of the delegatee.