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.

Object Safety§

This trait is not object safe.

Implementors§

source§

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

§

type Success = AccountId20

source§

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

§

type Success = H160

source§

impl<OuterOrigin> EnsureAddressOrigin<OuterOrigin> for EnsureAddressTruncated
where 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 = ()