mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 14:37:57 +00:00
Allow pallet's info to be enumerated (#10053)
* Allow pallet's info to be enumerated * Fixes * Formatting * Flat tuple for getting all pallet instances * Renaming and fixing reversedness * Formatting * Fixes * Back to nesting * Back to nestingx * Revert executive lib * Reversions * Reversions * Fixes * Fixes * Formatting * Fixes * Spelling * Comments
This commit is contained in:
@@ -505,6 +505,48 @@ fn storage_expand() {
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pallet_metadata_expands() {
|
||||
use frame_support::traits::{CrateVersion, PalletInfoData, PalletsInfoAccess};
|
||||
let mut infos = AllPalletsWithSystem::infos();
|
||||
infos.sort_by_key(|x| x.index);
|
||||
assert_eq!(
|
||||
infos,
|
||||
vec![
|
||||
PalletInfoData {
|
||||
index: 0,
|
||||
name: "System",
|
||||
module_name: "frame_system",
|
||||
crate_version: CrateVersion { major: 4, minor: 0, patch: 0 },
|
||||
},
|
||||
PalletInfoData {
|
||||
index: 1,
|
||||
name: "Example",
|
||||
module_name: "pallet",
|
||||
crate_version: CrateVersion { major: 3, minor: 0, patch: 0 },
|
||||
},
|
||||
PalletInfoData {
|
||||
index: 2,
|
||||
name: "Instance1Example",
|
||||
module_name: "pallet",
|
||||
crate_version: CrateVersion { major: 3, minor: 0, patch: 0 },
|
||||
},
|
||||
PalletInfoData {
|
||||
index: 3,
|
||||
name: "Example2",
|
||||
module_name: "pallet2",
|
||||
crate_version: CrateVersion { major: 3, minor: 0, patch: 0 },
|
||||
},
|
||||
PalletInfoData {
|
||||
index: 4,
|
||||
name: "Instance1Example2",
|
||||
module_name: "pallet2",
|
||||
crate_version: CrateVersion { major: 3, minor: 0, patch: 0 },
|
||||
},
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pallet_hooks_expand() {
|
||||
TestExternalities::default().execute_with(|| {
|
||||
|
||||
Reference in New Issue
Block a user