mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 15:47:58 +00:00
GetCallIndex trait (#13558)
* GetCallIndex trait * final impl * ".git/.scripts/commands/fmt/fmt.sh" * Docs Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * One more test Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Doc Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: command-bot <> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
@@ -29,7 +29,8 @@ pub use crate::{
|
||||
result,
|
||||
},
|
||||
traits::{
|
||||
CallMetadata, GetCallMetadata, GetCallName, GetStorageVersion, UnfilteredDispatchable,
|
||||
CallMetadata, GetCallIndex, GetCallMetadata, GetCallName, GetStorageVersion,
|
||||
UnfilteredDispatchable,
|
||||
},
|
||||
};
|
||||
#[cfg(feature = "std")]
|
||||
|
||||
@@ -74,8 +74,8 @@ pub use randomness::Randomness;
|
||||
|
||||
mod metadata;
|
||||
pub use metadata::{
|
||||
CallMetadata, CrateVersion, GetCallMetadata, GetCallName, GetStorageVersion, PalletInfo,
|
||||
PalletInfoAccess, PalletInfoData, PalletsInfoAccess, StorageVersion,
|
||||
CallMetadata, CrateVersion, GetCallIndex, GetCallMetadata, GetCallName, GetStorageVersion,
|
||||
PalletInfo, PalletInfoAccess, PalletInfoData, PalletsInfoAccess, StorageVersion,
|
||||
STORAGE_VERSION_STORAGE_KEY_POSTFIX,
|
||||
};
|
||||
|
||||
|
||||
@@ -101,12 +101,20 @@ pub struct CallMetadata {
|
||||
|
||||
/// Gets the function name of the Call.
|
||||
pub trait GetCallName {
|
||||
/// Return all function names.
|
||||
/// Return all function names in the same order as [`GetCallIndex`].
|
||||
fn get_call_names() -> &'static [&'static str];
|
||||
/// Return the function name of the Call.
|
||||
fn get_call_name(&self) -> &'static str;
|
||||
}
|
||||
|
||||
/// Gets the function index of the Call.
|
||||
pub trait GetCallIndex {
|
||||
/// Return all call indices in the same order as [`GetCallName`].
|
||||
fn get_call_indices() -> &'static [u8];
|
||||
/// Return the index of this Call.
|
||||
fn get_call_index(&self) -> u8;
|
||||
}
|
||||
|
||||
/// Gets the metadata for the Call - function name and pallet name.
|
||||
pub trait GetCallMetadata {
|
||||
/// Return all module names.
|
||||
|
||||
Reference in New Issue
Block a user