Trait darwinia_evm::EnsureAddressOrigin
source · [−]pub trait EnsureAddressOrigin<OuterOrigin> {
type Success;
fn try_address_origin(
address: &H160,
origin: OuterOrigin
) -> Result<Self::Success, OuterOrigin>;
fn ensure_address_origin(
address: &H160,
origin: OuterOrigin
) -> Result<Self::Success, BadOrigin> { ... }
}
Expand description
A trait to perform origin check.
Required Associated Types
Required Methods
fn try_address_origin(
address: &H160,
origin: OuterOrigin
) -> Result<Self::Success, OuterOrigin>
fn try_address_origin(
address: &H160,
origin: OuterOrigin
) -> Result<Self::Success, OuterOrigin>
Try with origin.
Provided Methods
fn ensure_address_origin(
address: &H160,
origin: OuterOrigin
) -> Result<Self::Success, BadOrigin>
fn ensure_address_origin(
address: &H160,
origin: OuterOrigin
) -> Result<Self::Success, BadOrigin>
Perform the origin check.