mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 15:51:12 +00:00
Rename ModuleToIndex to PalletRuntimeSetup (#7148)
* Rename `ModuleToIndex` to `PalletRuntimeSetup` Besides the renaming it also adds support getting the name of a pallet as configured in the runtime. * Rename it to `PalletInfo` * Remove accidentally added files
This commit is contained in:
@@ -117,7 +117,7 @@ use frame_support::{
|
||||
decl_module, decl_event, decl_storage, decl_error, Parameter, ensure, debug,
|
||||
storage,
|
||||
traits::{
|
||||
Contains, Get, ModuleToIndex, OnNewAccount, OnKilledAccount, IsDeadAccount, Happened,
|
||||
Contains, Get, PalletInfo, OnNewAccount, OnKilledAccount, IsDeadAccount, Happened,
|
||||
StoredMap, EnsureOrigin, OriginTrait, Filter,
|
||||
},
|
||||
weights::{
|
||||
@@ -256,11 +256,13 @@ pub trait Trait: 'static + Eq + Clone {
|
||||
/// Get the chain's current version.
|
||||
type Version: Get<RuntimeVersion>;
|
||||
|
||||
/// Convert a module to its index in the runtime.
|
||||
/// Provides information about the pallet setup in the runtime.
|
||||
///
|
||||
/// Expects the `ModuleToIndex` type that is being generated by `construct_runtime!` in the
|
||||
/// runtime. For tests it is okay to use `()` as type (returns `0` for each input).
|
||||
type ModuleToIndex: ModuleToIndex;
|
||||
/// Expects the `PalletInfo` type that is being generated by `construct_runtime!` in the
|
||||
/// runtime.
|
||||
///
|
||||
/// For tests it is okay to use `()` as type, however it will provide "useless" data.
|
||||
type PalletInfo: PalletInfo;
|
||||
|
||||
/// Data to be associated with an account (other than nonce/transaction counter, which this
|
||||
/// module does regardless).
|
||||
|
||||
@@ -101,7 +101,7 @@ impl Trait for Test {
|
||||
type AvailableBlockRatio = AvailableBlockRatio;
|
||||
type MaximumBlockLength = MaximumBlockLength;
|
||||
type Version = Version;
|
||||
type ModuleToIndex = ();
|
||||
type PalletInfo = ();
|
||||
type AccountData = u32;
|
||||
type OnNewAccount = ();
|
||||
type OnKilledAccount = RecordKilled;
|
||||
|
||||
Reference in New Issue
Block a user