Trait noble_democracy::Config[][src]

pub trait Config: Config + Sized {
    type Proposal: Parameter + Dispatchable<Origin = Self::Origin> + From<Call<Self>>;
    type Event: From<Event<Self>> + Into<Self::Event>;
    type Currency: ReservableCurrency<Self::AccountId> + LockableCurrency<Self::AccountId, Moment = Self::BlockNumber>;
    type EnactmentPeriod: Get<Self::BlockNumber>;
    type LaunchPeriod: Get<Self::BlockNumber>;
    type VotingPeriod: Get<Self::BlockNumber>;
    type MinimumDeposit: Get<<Self::Currency as Currency<Self::AccountId>>::Balance>;
    type ExternalOrigin: EnsureOrigin<Self::Origin>;
    type ExternalMajorityOrigin: EnsureOrigin<Self::Origin>;
    type ExternalDefaultOrigin: EnsureOrigin<Self::Origin>;
    type FastTrackOrigin: EnsureOrigin<Self::Origin>;
    type InstantOrigin: EnsureOrigin<Self::Origin>;
    type InstantAllowed: Get<bool>;
    type FastTrackVotingPeriod: Get<Self::BlockNumber>;
    type CancellationOrigin: EnsureOrigin<Self::Origin>;
    type BlacklistOrigin: EnsureOrigin<Self::Origin>;
    type CancelProposalOrigin: EnsureOrigin<Self::Origin>;
    type VetoOrigin: EnsureOrigin<Self::Origin, Success = Self::AccountId>;
    type CooloffPeriod: Get<Self::BlockNumber>;
    type PreimageByteDeposit: Get<<Self::Currency as Currency<Self::AccountId>>::Balance>;
    type OperationalPreimageOrigin: EnsureOrigin<Self::Origin, Success = Self::AccountId>;
    type Slash: OnUnbalanced<<Self::Currency as Currency<Self::AccountId>>::NegativeImbalance>;
    type Scheduler: ScheduleNamed<Self::BlockNumber, Self::Proposal, Self::NoblesOrigin>;
    type NoblesOrigin: From<RawOrigin<Self::AccountId>>;
    type MaxVotes: Get<u32>;
    type WeightInfo: WeightInfo;
    type MaxProposals: Get<u32>;
}

Associated Types

type Proposal: Parameter + Dispatchable<Origin = Self::Origin> + From<Call<Self>>[src]

type Event: From<Event<Self>> + Into<Self::Event>[src]

type Currency: ReservableCurrency<Self::AccountId> + LockableCurrency<Self::AccountId, Moment = Self::BlockNumber>[src]

Currency type for this module.

type EnactmentPeriod: Get<Self::BlockNumber>[src]

The minimum period of locking and the period between a proposal being approved and enacted.

It should generally be a little more than the unstake period to ensure that voting stakers have an opportunity to remove themselves from the system in the case where they are on the losing side of a vote.

type LaunchPeriod: Get<Self::BlockNumber>[src]

How often (in blocks) new public referenda are launched.

type VotingPeriod: Get<Self::BlockNumber>[src]

How often (in blocks) to check for new votes.

type MinimumDeposit: Get<<Self::Currency as Currency<Self::AccountId>>::Balance>[src]

The minimum amount to be used as a deposit for a public referendum proposal.

type ExternalOrigin: EnsureOrigin<Self::Origin>[src]

Origin from which the next tabled referendum may be forced. This is a normal “super-majority-required” referendum.

type ExternalMajorityOrigin: EnsureOrigin<Self::Origin>[src]

Origin from which the next tabled referendum may be forced; this allows for the tabling of a majority-carries referendum.

type ExternalDefaultOrigin: EnsureOrigin<Self::Origin>[src]

Origin from which the next tabled referendum may be forced; this allows for the tabling of a negative-turnout-bias (default-carries) referendum.

type FastTrackOrigin: EnsureOrigin<Self::Origin>[src]

Origin from which the next majority-carries (or more permissive) referendum may be tabled to vote according to the FastTrackVotingPeriod asynchronously in a similar manner to the emergency origin. It retains its threshold method.

type InstantOrigin: EnsureOrigin<Self::Origin>[src]

Origin from which the next majority-carries (or more permissive) referendum may be tabled to vote immediately and asynchronously in a similar manner to the emergency origin. It retains its threshold method.

type InstantAllowed: Get<bool>[src]

Indicator for whether an emergency origin is even allowed to happen. Some chains may want to set this permanently to false, others may want to condition it on things such as an upgrade having happened recently.

type FastTrackVotingPeriod: Get<Self::BlockNumber>[src]

Minimum voting period allowed for a fast-track referendum.

type CancellationOrigin: EnsureOrigin<Self::Origin>[src]

Origin from which any referendum may be cancelled in an emergency.

type BlacklistOrigin: EnsureOrigin<Self::Origin>[src]

Origin from which proposals may be blacklisted.

type CancelProposalOrigin: EnsureOrigin<Self::Origin>[src]

Origin from which a proposal may be cancelled and its backers slashed.

type VetoOrigin: EnsureOrigin<Self::Origin, Success = Self::AccountId>[src]

Origin for anyone able to veto proposals.

Warning

The number of Vetoers for a proposal must be small, extrinsics are weighted according to MAX_VETOERS

type CooloffPeriod: Get<Self::BlockNumber>[src]

Period in blocks where an external proposal may not be re-submitted after being vetoed.

type PreimageByteDeposit: Get<<Self::Currency as Currency<Self::AccountId>>::Balance>[src]

The amount of balance that must be deposited per byte of preimage stored.

type OperationalPreimageOrigin: EnsureOrigin<Self::Origin, Success = Self::AccountId>[src]

An origin that can provide a preimage using operational extrinsics.

type Slash: OnUnbalanced<<Self::Currency as Currency<Self::AccountId>>::NegativeImbalance>[src]

Handler for the unbalanced reduction when slashing a preimage deposit.

type Scheduler: ScheduleNamed<Self::BlockNumber, Self::Proposal, Self::NoblesOrigin>[src]

The Scheduler.

type NoblesOrigin: From<RawOrigin<Self::AccountId>>[src]

Overarching type of all nobles origins.

type MaxVotes: Get<u32>[src]

The maximum number of votes for an account.

Also used to compute weight, an overly big value can lead to extrinsic with very big weight: see delegate for instance.

type WeightInfo: WeightInfo[src]

Weight information for extrinsics in this noble.

type MaxProposals: Get<u32>[src]

The maximum number of public proposals that can exist at any time.

Loading content...

Implementors

Loading content...