Trait penumbra_governance::component::StateReadExt
source · pub trait StateReadExt: StateRead + StateReadExt {
Show 34 methods
// Provided methods
fn is_upgrade_height<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn get_governance_params<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<GovernanceParameters>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn next_proposal_id<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn proposal_definition<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<Option<Proposal>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn proposal_payload<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<Option<ProposalPayload>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn proposal_deposit_amount<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<Option<Amount>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn proposal_state<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<Option<ProposalState>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn unfinished_proposals<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<BTreeSet<u64>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn validator_vote<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64,
identity_key: IdentityKey
) -> Pin<Box<dyn Future<Output = Result<Option<Vote>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn proposal_voting_start<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<Option<u64>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn proposal_voting_end<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<Option<u64>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn proposal_voting_start_position<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<Option<Position>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn total_voting_power_at_proposal_start<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn check_nullifier_unvoted_for_proposal<'life0, 'life1, 'async_trait>(
&'life0 self,
proposal_id: u64,
nullifier: &'life1 Nullifier
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn rate_data_at_proposal_start<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64,
identity_key: IdentityKey
) -> Pin<Box<dyn Future<Output = Result<Option<RateData>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn check_proposal_votable<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn check_proposal_started_at_position<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64,
claimed_position: Position
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn check_nullifier_unspent_before_start_block_height<'life0, 'life1, 'async_trait>(
&'life0 self,
proposal_id: u64,
nullifier: &'life1 Nullifier
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn validator_by_delegation_asset<'life0, 'async_trait>(
&'life0 self,
asset_id: Id
) -> Pin<Box<dyn Future<Output = Result<IdentityKey>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn check_unbonded_amount_correct_exchange_for_proposal<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
proposal_id: u64,
value: &'life1 Value,
unbonded_amount: &'life2 Amount
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn check_height_in_future_of_voting_end<'life0, 'async_trait>(
&'life0 self,
height: u64
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn check_validator_has_not_voted<'life0, 'life1, 'async_trait>(
&'life0 self,
proposal_id: u64,
identity_key: &'life1 IdentityKey
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn check_governance_key_matches_validator<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
identity_key: &'life1 IdentityKey,
governance_key: &'life2 GovernanceKey
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn check_proposal_claimable<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn check_proposal_claim_valid_deposit<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64,
claim_deposit_amount: Amount
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn validator_voting_power_at_proposal_start<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<BTreeMap<IdentityKey, u64>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn check_validator_active_at_proposal_start<'life0, 'life1, 'async_trait>(
&'life0 self,
proposal_id: u64,
identity_key: &'life1 IdentityKey
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn validator_votes<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<BTreeMap<IdentityKey, Vote>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn tallied_delegator_votes<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<BTreeMap<IdentityKey, Tally>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn current_tally<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<Tally>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn param_changes_for_height<'life0, 'async_trait>(
&'life0 self,
height: u64
) -> Pin<Box<dyn Future<Output = Result<Option<ParameterChange>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn proposal_started(&self) -> bool { ... }
fn is_chain_halted<'life0, 'async_trait>(
&'life0 self,
total_halt_count: u64
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn halt_count<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
}
component
only.Provided Methods§
sourcefn is_upgrade_height<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn is_upgrade_height<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Returns true if the next height is an upgrade height. We look-ahead to the next height because we want to halt the chain immediately after committing the block.
sourcefn get_governance_params<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<GovernanceParameters>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn get_governance_params<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<GovernanceParameters>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Gets the governance parameters from the JMT.
sourcefn next_proposal_id<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn next_proposal_id<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Get the id of the next proposal in the sequence of ids.
sourcefn proposal_definition<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<Option<Proposal>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn proposal_definition<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<Option<Proposal>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Get the proposal definition for a proposal.
sourcefn proposal_payload<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<Option<ProposalPayload>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn proposal_payload<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<Option<ProposalPayload>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Get the proposal payload for a proposal.
sourcefn proposal_deposit_amount<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<Option<Amount>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn proposal_deposit_amount<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<Option<Amount>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Get the proposal deposit amount for a proposal.
sourcefn proposal_state<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<Option<ProposalState>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn proposal_state<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<Option<ProposalState>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Get the state of a proposal.
sourcefn unfinished_proposals<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<BTreeSet<u64>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn unfinished_proposals<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<BTreeSet<u64>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Get all the unfinished proposal ids.
sourcefn validator_vote<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64,
identity_key: IdentityKey
) -> Pin<Box<dyn Future<Output = Result<Option<Vote>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn validator_vote<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64,
identity_key: IdentityKey
) -> Pin<Box<dyn Future<Output = Result<Option<Vote>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Get the vote of a validator on a particular proposal.
sourcefn proposal_voting_start<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<Option<u64>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn proposal_voting_start<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<Option<u64>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Get the proposal voting start block for a given proposal.
sourcefn proposal_voting_end<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<Option<u64>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn proposal_voting_end<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<Option<u64>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Get the proposal voting end block for a given proposal.
sourcefn proposal_voting_start_position<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<Option<Position>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn proposal_voting_start_position<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<Option<Position>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Get the proposal voting start block for a given proposal.
sourcefn total_voting_power_at_proposal_start<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn total_voting_power_at_proposal_start<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Get the total voting power across all validators.
sourcefn check_nullifier_unvoted_for_proposal<'life0, 'life1, 'async_trait>(
&'life0 self,
proposal_id: u64,
nullifier: &'life1 Nullifier
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn check_nullifier_unvoted_for_proposal<'life0, 'life1, 'async_trait>(
&'life0 self,
proposal_id: u64,
nullifier: &'life1 Nullifier
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check whether a nullifier was spent for a given proposal.
sourcefn rate_data_at_proposal_start<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64,
identity_key: IdentityKey
) -> Pin<Box<dyn Future<Output = Result<Option<RateData>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn rate_data_at_proposal_start<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64,
identity_key: IdentityKey
) -> Pin<Box<dyn Future<Output = Result<Option<RateData>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Get the RateData
for a validator at the start height of a given proposal.
sourcefn check_proposal_votable<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn check_proposal_votable<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Throw an error if the proposal is not votable.
sourcefn check_proposal_started_at_position<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64,
claimed_position: Position
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn check_proposal_started_at_position<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64,
claimed_position: Position
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Throw an error if the proposal was not started at the claimed position.
sourcefn check_nullifier_unspent_before_start_block_height<'life0, 'life1, 'async_trait>(
&'life0 self,
proposal_id: u64,
nullifier: &'life1 Nullifier
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn check_nullifier_unspent_before_start_block_height<'life0, 'life1, 'async_trait>(
&'life0 self,
proposal_id: u64,
nullifier: &'life1 Nullifier
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Throw an error if the nullifier was spent before the proposal started.
sourcefn validator_by_delegation_asset<'life0, 'async_trait>(
&'life0 self,
asset_id: Id
) -> Pin<Box<dyn Future<Output = Result<IdentityKey>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn validator_by_delegation_asset<'life0, 'async_trait>(
&'life0 self,
asset_id: Id
) -> Pin<Box<dyn Future<Output = Result<IdentityKey>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Look up the validator for a given asset ID, if it is a delegation token.
sourcefn check_unbonded_amount_correct_exchange_for_proposal<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
proposal_id: u64,
value: &'life1 Value,
unbonded_amount: &'life2 Amount
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn check_unbonded_amount_correct_exchange_for_proposal<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
proposal_id: u64,
value: &'life1 Value,
unbonded_amount: &'life2 Amount
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Throw an error if the exchange between the value and the unbonded amount isn’t correct for the proposal given.
fn check_height_in_future_of_voting_end<'life0, 'async_trait>(
&'life0 self,
height: u64
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
sourcefn check_validator_has_not_voted<'life0, 'life1, 'async_trait>(
&'life0 self,
proposal_id: u64,
identity_key: &'life1 IdentityKey
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn check_validator_has_not_voted<'life0, 'life1, 'async_trait>(
&'life0 self,
proposal_id: u64,
identity_key: &'life1 IdentityKey
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check that the validator has not voted on the proposal.
sourcefn check_governance_key_matches_validator<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
identity_key: &'life1 IdentityKey,
governance_key: &'life2 GovernanceKey
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn check_governance_key_matches_validator<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
identity_key: &'life1 IdentityKey,
governance_key: &'life2 GovernanceKey
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Check that the governance key matches the validator’s identity key.
sourcefn check_proposal_claimable<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn check_proposal_claimable<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Check that a deposit claim could be made on the proposal.
sourcefn check_proposal_claim_valid_deposit<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64,
claim_deposit_amount: Amount
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn check_proposal_claim_valid_deposit<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64,
claim_deposit_amount: Amount
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Check that the deposit claim amount matches the proposal’s deposit amount.
sourcefn validator_voting_power_at_proposal_start<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<BTreeMap<IdentityKey, u64>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn validator_voting_power_at_proposal_start<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<BTreeMap<IdentityKey, u64>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Get all the active validator voting power for the proposal.
sourcefn check_validator_active_at_proposal_start<'life0, 'life1, 'async_trait>(
&'life0 self,
proposal_id: u64,
identity_key: &'life1 IdentityKey
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn check_validator_active_at_proposal_start<'life0, 'life1, 'async_trait>(
&'life0 self,
proposal_id: u64,
identity_key: &'life1 IdentityKey
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check whether a validator was active at the start of a proposal, and fail if not.
sourcefn validator_votes<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<BTreeMap<IdentityKey, Vote>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn validator_votes<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<BTreeMap<IdentityKey, Vote>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Get all the validator votes for the proposal.
sourcefn tallied_delegator_votes<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<BTreeMap<IdentityKey, Tally>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn tallied_delegator_votes<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<BTreeMap<IdentityKey, Tally>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Get all the tallied delegator votes for the proposal (excluding those which have been cast but not tallied).
sourcefn current_tally<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<Tally>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn current_tally<'life0, 'async_trait>(
&'life0 self,
proposal_id: u64
) -> Pin<Box<dyn Future<Output = Result<Tally>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Add up all the currently tallied votes (without tallying any cast votes that haven’t been tallied yet).
sourcefn param_changes_for_height<'life0, 'async_trait>(
&'life0 self,
height: u64
) -> Pin<Box<dyn Future<Output = Result<Option<ParameterChange>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn param_changes_for_height<'life0, 'async_trait>(
&'life0 self,
height: u64
) -> Pin<Box<dyn Future<Output = Result<Option<ParameterChange>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Gets the parameter changes scheduled for the given height, if any.
sourcefn proposal_started(&self) -> bool
fn proposal_started(&self) -> bool
Check if any proposal is started in this block.