pub trait ProposalProvider<AccountId, Hash, Proposal> {
    fn propose_proposal(
        who: AccountId,
        threshold: u32,
        proposal: Box<Proposal>,
        length_bound: u32
    ) -> Result<(u32, u32), DispatchError>; fn vote_proposal(
        who: AccountId,
        proposal: Hash,
        index: ProposalIndex,
        approve: bool
    ) -> Result<bool, DispatchError>; fn close_proposal(
        proposal_hash: Hash,
        index: ProposalIndex,
        proposal_weight_bound: Weight,
        length_bound: u32
    ) -> DispatchResultWithPostInfo; fn proposal_of(proposal_hash: Hash) -> Option<Proposal>; }
Expand description

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

Required Methods

Add a new proposal. Returns a proposal length and active proposals count if successful.

Add an aye or nay vote for the sender to the given proposal. Returns true if the sender votes first time if successful.

Close a proposal that is either approved, disapproved, or whose voting period has ended.

Return a proposal of the given hash.

Implementors