Trait MaybeUtilityCall

Source
pub trait MaybeUtilityCall<Runtime>
where Runtime: Config, for<'call> &'call RuntimeCallFor<Runtime>: From<&'call <Runtime as Config>::RuntimeCall>,
{ // Required method fn maybe_utility_call(&self) -> Option<&Call<Runtime>>; // Provided method fn maybe_nested_utility_calls( &self, ) -> Option<Vec<&RuntimeCallFor<Runtime>>> { ... } }
Expand description

Trait used to convert from a generated RuntimeCall type to pallet_utility::Call<Runtime>.

Required Methods§

Source

fn maybe_utility_call(&self) -> Option<&Call<Runtime>>

If this call is a pallet_utility::Call<Runtime> call, returns the inner pallet_utility::Call.

Provided Methods§

Source

fn maybe_nested_utility_calls(&self) -> Option<Vec<&RuntimeCallFor<Runtime>>>

If this call is a pallet_utility::Call<Runtime> call, returns the inner RuntimeCall.

Runtimes can override this default implementation if they want to ignore (or not ignore) certain utility calls. For example, a stack limit check shouldn’t ignore Call::__Ignore.

Implementors§