common_primitives::node

Trait ProposalProvider

Source
pub trait ProposalProvider<AccountId, Proposal> {
    // Required methods
    fn propose(
        who: AccountId,
        threshold: u32,
        proposal: Box<Proposal>,
    ) -> Result<(u32, u32), DispatchError>;
    fn propose_with_simple_majority(
        who: AccountId,
        proposal: Box<Proposal>,
    ) -> Result<(u32, u32), DispatchError>;
}
Expand description

The provider of a collective action interface, for example an instance of pallet-collective.

Required Methods§

Source

fn propose( who: AccountId, threshold: u32, proposal: Box<Proposal>, ) -> Result<(u32, u32), DispatchError>

Add a new proposal with a threshold number of council votes. Returns a proposal length and active proposals count if successful.

Source

fn propose_with_simple_majority( who: AccountId, proposal: Box<Proposal>, ) -> Result<(u32, u32), DispatchError>

Add a new proposal with a simple majority (>50%) of council votes. Returns a proposal length and active proposals count if successful.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§