referrerpolicy=no-referrer-when-downgrade
collectives_westend_runtime::ambassador

Type Alias PromoteOrigin

Source
pub type PromoteOrigin = EitherOf<DemoteOrigin, TryMapSuccess<EnsureMember<Runtime, AmbassadorCollectiveInstance, { ranks::HEAD_AMBASSADOR_TIER_5 }>, Replace<ConstU16<0>>>>;
Expand description

Promotion and approval (rank-retention) is by any of:

  • Root can promote arbitrarily.
  • the FellowshipAdmin origin (i.e. token holder referendum);
  • a senior members vote by the rank two above the new/current rank.
  • a member of rank 5 or above can add a candidate (rank 0).

Aliased Type§

struct PromoteOrigin(/* private fields */);

Trait Implementations

Source§

impl<OuterOrigin, L, R> EnsureOrigin<OuterOrigin> for EitherOf<L, R>
where L: EnsureOrigin<OuterOrigin>, R: EnsureOrigin<OuterOrigin, Success = <L as EnsureOrigin<OuterOrigin>>::Success>,

Source§

type Success = <L as EnsureOrigin<OuterOrigin>>::Success

A return type.
Source§

fn try_origin( o: OuterOrigin, ) -> Result<<EitherOf<L, R> as EnsureOrigin<OuterOrigin>>::Success, OuterOrigin>

Perform the origin check.
Source§

fn try_successful_origin() -> Result<OuterOrigin, ()>

Attempt to get an outer origin capable of passing try_origin check. May return Err if it is impossible. Read more
Source§

fn ensure_origin(o: OuterOrigin) -> Result<Self::Success, BadOrigin>

Perform the origin check.
Source§

fn ensure_origin_or_root( o: OuterOrigin, ) -> Result<Option<Self::Success>, BadOrigin>
where OuterOrigin: OriginTrait,

The same as ensure_origin except that Root origin will always pass. This can only be used if Success has a sensible impl of Default since that will be used in the result.
Source§

fn try_origin_or_root( o: OuterOrigin, ) -> Result<Option<Self::Success>, OuterOrigin>
where OuterOrigin: OriginTrait,

The same as try_origin except that Root origin will always pass. This can only be used if Success has a sensible impl of Default since that will be used in the result.
Source§

impl<OuterOrigin, L, R, Argument> EnsureOriginWithArg<OuterOrigin, Argument> for EitherOf<L, R>
where L: EnsureOriginWithArg<OuterOrigin, Argument>, R: EnsureOriginWithArg<OuterOrigin, Argument, Success = <L as EnsureOriginWithArg<OuterOrigin, Argument>>::Success>,

Source§

type Success = <L as EnsureOriginWithArg<OuterOrigin, Argument>>::Success

A return type.
Source§

fn try_origin( o: OuterOrigin, a: &Argument, ) -> Result<<EitherOf<L, R> as EnsureOriginWithArg<OuterOrigin, Argument>>::Success, OuterOrigin>

Perform the origin check, returning the origin value if unsuccessful. This allows chaining.
Source§

fn try_successful_origin(a: &Argument) -> Result<OuterOrigin, ()>

Attempt to get an outer origin capable of passing try_origin check. May return Err if it is impossible. Read more
Source§

fn ensure_origin( o: OuterOrigin, a: &Argument, ) -> Result<Self::Success, BadOrigin>

Perform the origin check.