Governance
Reference of interfaces and utilities related to Governance.
Utils
IVotes
use openzeppelin::governance::utils::interfaces::IVotes;
Common interface for Votes-enabled contracts. For an implementation example see ERC20VotesComponent.
Functions
get_votes(account: ContractAddress) → u256
external
Returns the current amount of votes that account
has.
get_past_votes(account: ContractAddress, timepoint: u64) → u256
external
Returns the amount of votes that account
had at a specific moment in the past.
get_past_total_supply(timepoint: u64) → u256
external
Returns the total supply of votes available at a specific moment in the past.
This value is the sum of all available votes, which is not necessarily the sum of all delegated votes. Votes that have not been delegated are still part of total supply, even though they would not participate in a vote. |