mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-16 14:21:10 +00:00
[doc] Example MBM pallet (#2119)
## Basic example showcasing a migration using the MBM framework This PR has been built on top of https://github.com/paritytech/polkadot-sdk/pull/1781 and adds two new example crates to the `examples` pallet ### Changes Made: Added the `pallet-example-mbm` crate: This crate provides a minimal example of a pallet that uses MBM. It showcases a storage migration where values are migrated from a `u32` to a `u64`. --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>
This commit is contained in:
@@ -28,7 +28,7 @@ use frame_support::{
|
||||
weights::Weight,
|
||||
};
|
||||
use frame_system::EventRecord;
|
||||
use sp_core::{ConstU32, H256};
|
||||
use sp_core::H256;
|
||||
|
||||
type Block = frame_system::mocking::MockBlock<Test>;
|
||||
|
||||
@@ -51,15 +51,14 @@ frame_support::parameter_types! {
|
||||
pub const MaxServiceWeight: Weight = Weight::MAX.div(10);
|
||||
}
|
||||
|
||||
#[derive_impl(crate::config_preludes::TestDefaultConfig)]
|
||||
impl crate::Config for Test {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
type Migrations = crate::mock_helpers::MockedMigrations;
|
||||
#[cfg(not(feature = "runtime-benchmarks"))]
|
||||
type Migrations = MockedMigrations;
|
||||
type CursorMaxLen = ConstU32<65_536>;
|
||||
type IdentifierMaxLen = ConstU32<256>;
|
||||
type MigrationStatusHandler = MockedMigrationStatusHandler;
|
||||
type FailedMigrationHandler = MockedFailedMigrationHandler;
|
||||
type MaxServiceWeight = MaxServiceWeight;
|
||||
type WeightInfo = ();
|
||||
}
|
||||
|
||||
frame_support::parameter_types! {
|
||||
|
||||
Reference in New Issue
Block a user