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

Type Alias DemoteOrigin

Source
pub type DemoteOrigin = EitherOf<EnsureRootWithSuccess<AccountId, ConstU16<65535>>, EitherOf<MapSuccess<EnsureXcm<IsVoiceOfBody<GovernanceLocation, FellowshipAdminBodyId>>, Replace<ConstU16<{ ranks::MASTER_AMBASSADOR_TIER_9 }>>>, TryMapSuccess<EnsureAmbassadorsVoiceFrom<ConstU16<{ ranks::SENIOR_AMBASSADOR_TIER_3 }>>, CheckedReduceBy<ConstU16<2>>>>>;
Expand description

Demotion is by any of:

  • Root can demote arbitrarily.
  • the FellowshipAdmin origin (i.e. token holder referendum);
  • a senior members vote by the rank two above the current rank.

Aliased Type§

struct DemoteOrigin(/* 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.