pub trait EnsureOrigin<OuterOrigin> {
    type Success;

    fn try_origin(o: OuterOrigin) -> Result<Self::Success, OuterOrigin>;
    fn try_successful_origin() -> Result<OuterOrigin, ()>;

    fn ensure_origin(o: OuterOrigin) -> Result<Self::Success, BadOrigin> { ... }
}
Expand description

Some sort of check on the origin is performed by this object.

Required Associated Types

A return type.

Required Methods

Perform the origin check.

Attempt to get an outer origin capable of passing try_origin check. May return Err if it is impossible.

** Should be used for benchmarking only!!! **

Provided Methods

Perform the origin check.

Implementors