pub trait EnsureAddressOrigin<OuterOrigin> {
    type Success;

    // Required method
    fn try_address_origin(
        address: &H160,
        origin: OuterOrigin
    ) -> Result<Self::Success, OuterOrigin>;

    // Provided method
    fn ensure_address_origin(
        address: &H160,
        origin: OuterOrigin
    ) -> Result<Self::Success, BadOrigin> { ... }
}

Required Associated Types§

source

type Success

Success return type.

Required Methods§

source

fn try_address_origin( address: &H160, origin: OuterOrigin ) -> Result<Self::Success, OuterOrigin>

Try with origin.

Provided Methods§

source

fn ensure_address_origin( address: &H160, origin: OuterOrigin ) -> Result<Self::Success, BadOrigin>

Perform the origin check.

Implementors§

source§

impl<OuterOrigin> EnsureAddressOrigin<OuterOrigin> for EnsureAccountId20where OuterOrigin: Into<Result<RawOrigin<AccountId20>, OuterOrigin>> + From<RawOrigin<AccountId20>>,

source§

impl<OuterOrigin> EnsureAddressOrigin<OuterOrigin> for EnsureAddressSamewhere OuterOrigin: Into<Result<RawOrigin<H160>, OuterOrigin>> + From<RawOrigin<H160>>,

§

type Success = H160

source§

impl<OuterOrigin> EnsureAddressOrigin<OuterOrigin> for EnsureAddressTruncatedwhere OuterOrigin: Into<Result<RawOrigin<AccountId32>, OuterOrigin>> + From<RawOrigin<AccountId32>>,

§

type Success = AccountId32

source§

impl<OuterOrigin, AccountId> EnsureAddressOrigin<OuterOrigin> for EnsureAddressNever<AccountId>

§

type Success = AccountId

source§

impl<OuterOrigin, AccountId> EnsureAddressOrigin<OuterOrigin> for EnsureAddressRoot<AccountId>where OuterOrigin: Into<Result<RawOrigin<AccountId>, OuterOrigin>> + From<RawOrigin<AccountId>>,

§

type Success = ()