mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 21:11:07 +00:00
Restructure dispatch macro related exports (#1162)
* restructure dispatch macro related exports * moved Dispatchable to lib.rs * fix .gitignore final newline * ".git/.scripts/commands/fmt/fmt.sh" * fix rustdocs * wip --------- Co-authored-by: Liam Aharon <liam.aharon@hotmail.com> Co-authored-by: command-bot <> Co-authored-by: ordian <write@reusable.software>
This commit is contained in:
@@ -124,16 +124,16 @@ pub fn expand_outer_dispatch(
|
||||
}
|
||||
}
|
||||
|
||||
impl #scrate::dispatch::GetCallMetadata for RuntimeCall {
|
||||
fn get_call_metadata(&self) -> #scrate::dispatch::CallMetadata {
|
||||
use #scrate::dispatch::GetCallName;
|
||||
impl #scrate::traits::GetCallMetadata for RuntimeCall {
|
||||
fn get_call_metadata(&self) -> #scrate::traits::CallMetadata {
|
||||
use #scrate::traits::GetCallName;
|
||||
match self {
|
||||
#(
|
||||
#pallet_attrs
|
||||
#variant_patterns => {
|
||||
let function_name = call.get_call_name();
|
||||
let pallet_name = stringify!(#pallet_names);
|
||||
#scrate::dispatch::CallMetadata { function_name, pallet_name }
|
||||
#scrate::traits::CallMetadata { function_name, pallet_name }
|
||||
}
|
||||
)*
|
||||
}
|
||||
@@ -147,7 +147,7 @@ pub fn expand_outer_dispatch(
|
||||
}
|
||||
|
||||
fn get_call_names(module: &str) -> &'static [&'static str] {
|
||||
use #scrate::dispatch::{Callable, GetCallName};
|
||||
use #scrate::{dispatch::Callable, traits::GetCallName};
|
||||
match module {
|
||||
#(
|
||||
#pallet_attrs
|
||||
@@ -159,7 +159,7 @@ pub fn expand_outer_dispatch(
|
||||
}
|
||||
}
|
||||
}
|
||||
impl #scrate::dispatch::Dispatchable for RuntimeCall {
|
||||
impl #scrate::__private::Dispatchable for RuntimeCall {
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Config = RuntimeCall;
|
||||
type Info = #scrate::dispatch::DispatchInfo;
|
||||
|
||||
Reference in New Issue
Block a user