[][src]Trait frame_support::traits::OriginTrait

pub trait OriginTrait: Sized {
    type Call;
    type PalletsOrigin;
    type AccountId;
    pub fn add_filter(&mut self, filter: impl Fn(&Self::Call) -> bool + 'static);
pub fn reset_filter(&mut self);
pub fn set_caller_from(&mut self, other: impl Into<Self>);
pub fn filter_call(&self, call: &Self::Call) -> bool;
pub fn caller(&self) -> &Self::PalletsOrigin;
pub fn none() -> Self;
pub fn root() -> Self;
pub fn signed(by: Self::AccountId) -> Self; }

Methods available on frame_system::Config::Origin.

Associated Types

type Call[src]

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

type PalletsOrigin[src]

The caller origin, overarching type of all pallets origins.

type AccountId[src]

The AccountId used across the system.

Loading content...

Required methods

pub fn add_filter(&mut self, filter: impl Fn(&Self::Call) -> bool + 'static)[src]

Add a filter to the origin.

pub fn reset_filter(&mut self)[src]

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

pub fn set_caller_from(&mut self, other: impl Into<Self>)[src]

Replace the caller with caller from the other origin

pub fn filter_call(&self, call: &Self::Call) -> bool[src]

Filter the call, if false then call is filtered out.

pub fn caller(&self) -> &Self::PalletsOrigin[src]

Get the caller.

pub fn none() -> Self[src]

Create with system none origin and frame-system::Config::BaseCallFilter.

pub fn root() -> Self[src]

Create with system root origin and no filter.

pub fn signed(by: Self::AccountId) -> Self[src]

Create with system signed origin and frame-system::Config::BaseCallFilter.

Loading content...

Implementors

Loading content...