pub trait OriginTrait: Sized {
    type Call;
    type PalletsOrigin: Into<Self> + CallerTrait<Self::AccountId> + MaxEncodedLen;
    type AccountId;

    fn add_filter(&mut self, filter: impl Fn(&Self::Call) -> bool + 'static);
    fn reset_filter(&mut self);
    fn set_caller_from(&mut self, other: impl Into<Self>);
    fn filter_call(&self, call: &Self::Call) -> bool;
    fn caller(&self) -> &Self::PalletsOrigin;
    fn into_caller(self) -> Self::PalletsOrigin;
    fn try_with_caller<R>(
        f: impl FnOnce(Self::PalletsOrigin) -> Result<R, Self::PalletsOrigin>
    ) -> Result<R, Self>; fn none() -> Self; fn root() -> Self; fn signed(by: Self::AccountId) -> Self; fn as_signed(self) -> Option<Self::AccountId> { ... } fn as_system_ref(&self) -> Option<&RawOrigin<Self::AccountId>> { ... } }
Expand description

Methods available on frame_system::Config::RuntimeOrigin.

Required Associated Types

Runtime call type, as in frame_system::Config::Call

The caller origin, overarching type of all pallets origins.

The AccountId used across the system.

Required Methods

Add a filter to the origin.

Reset origin filters to default one, i.e frame_system::Config::BaseCallFilter.

Replace the caller with caller from the other origin

Filter the call if caller is not root, if false is returned then the call must be filtered out.

For root origin caller, the filters are bypassed and true is returned.

Get a reference to the caller (CallerTrait impl).

Consume self and return the caller.

Do something with the caller, consuming self but returning it if the caller was unused.

Create with system none origin and frame_system::Config::BaseCallFilter.

Create with system root origin and frame_system::Config::BaseCallFilter.

Create with system signed origin and frame_system::Config::BaseCallFilter.

Provided Methods

Extract the signer from the message if it is a Signed origin.

Extract a reference to the sytsem origin, if that’s what the caller is.