Skip to main content
Version: 0.1.x

Votes

The Votes trait is the interface for "what" is the voting power in a DAO.

Methods


get_votes

get_votes(&self, account: AccountId, timestamp: Option<Timestamp>) -> Balance;

Returns the voting power of a given account at specified timestamp (if applicable).

Arguments
  • account - Address of the account for which we query the voting power.
  • timestamp - Optional Timestamp in miliseconds at which we query the voting power.

delegate

fn delegate(&mut self, delegatee: AccountId) -> Result<(), VotesError>;

Delegates the voting power of the caller to delegatee.

Arguments
  • delegatee - Address of the account for which we delegate the voting power.

delegates

fn delegates(&mut self, delegator: AccountId) -> Option<AccountId>;

Returns the address of of the delegatee of the delegator.

Arguments
  • delegator - Address of the account for which we query the address of the delegatee.