IVotesSafeDispatcherTrait
Fully qualified path: openzeppelin_interfaces::governance::votes::IVotesSafeDispatcherTrait
Part of the group: dispatchers
pub trait IVotesSafeDispatcherTrait<T>
Trait functions
get_votes
Returns the current amount of votes that account has.
Fully qualified path: openzeppelin_interfaces::governance::votes::IVotesSafeDispatcherTrait::get_votes
fn get_votes(self: T, account: ContractAddress) -> Result<u256, Array<felt252>>
get_past_votes
Returns the amount of votes that account had at a specific moment in the past.
Fully qualified path: openzeppelin_interfaces::governance::votes::IVotesSafeDispatcherTrait::get_past_votes
fn get_past_votes(self: T, account: ContractAddress, timepoint: u64) -> Result<u256, Array<felt252>>
get_past_total_supply
Returns the total supply of votes available at a specific moment in the past.
NOTE: 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.
Fully qualified path: openzeppelin_interfaces::governance::votes::IVotesSafeDispatcherTrait::get_past_total_supply
fn get_past_total_supply(self: T, timepoint: u64) -> Result<u256, Array<felt252>>
delegates
Returns the delegate that account has chosen.
Fully qualified path: openzeppelin_interfaces::governance::votes::IVotesSafeDispatcherTrait::delegates
fn delegates(self: T, account: ContractAddress) -> Result<ContractAddress, Array<felt252>>
delegate
Delegates votes from the sender to delegatee.
Fully qualified path: openzeppelin_interfaces::governance::votes::IVotesSafeDispatcherTrait::delegate
fn delegate(self: T, delegatee: ContractAddress) -> Result<(), Array<felt252>>
delegate_by_sig
Delegates votes from delegator to delegatee.
Fully qualified path: openzeppelin_interfaces::governance::votes::IVotesSafeDispatcherTrait::delegate_by_sig
fn delegate_by_sig(
self: T,
delegator: ContractAddress,
delegatee: ContractAddress,
nonce: felt252,
expiry: u64,
signature: Span<felt252>,
) -> Result<(), Array<felt252>>
clock
Returns the current timepoint determined by the contract’s operational mode, intended for use in time-sensitive logic. See https://eips.ethereum.org/EIPS/eip-6372#clock.
Requirements:
- This function MUST always be non-decreasing.
Fully qualified path: openzeppelin_interfaces::governance::votes::IVotesSafeDispatcherTrait::clock
fn clock(self: T) -> Result<u64, Array<felt252>>
CLOCK_MODE
Returns a description of the clock the contract is operating in. See https://eips.ethereum.org/EIPS/eip-6372#clock_mode.
Requirements:
- The output MUST be formatted like a URL query string, decodable in standard JavaScript.
Fully qualified path: openzeppelin_interfaces::governance::votes::IVotesSafeDispatcherTrait::CLOCK_MODE
fn CLOCK_MODE(self: T) -> Result<ByteArray, Array<felt252>>