mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +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:
@@ -89,6 +89,7 @@ pallet-elections-phragmen = { path = "../../../frame/elections-phragmen", defaul
|
||||
pallet-example-tasks = { path = "../../../frame/examples/tasks", default-features = false }
|
||||
pallet-fast-unstake = { path = "../../../frame/fast-unstake", default-features = false }
|
||||
pallet-migrations = { path = "../../../frame/migrations", default-features = false }
|
||||
pallet-example-mbm = { path = "../../../frame/examples/multi-block-migrations", default-features = false }
|
||||
pallet-nis = { path = "../../../frame/nis", default-features = false }
|
||||
pallet-grandpa = { path = "../../../frame/grandpa", default-features = false }
|
||||
pallet-im-online = { path = "../../../frame/im-online", default-features = false }
|
||||
@@ -188,6 +189,7 @@ std = [
|
||||
"pallet-election-provider-multi-phase/std",
|
||||
"pallet-election-provider-support-benchmarking?/std",
|
||||
"pallet-elections-phragmen/std",
|
||||
"pallet-example-mbm/std",
|
||||
"pallet-example-tasks/std",
|
||||
"pallet-fast-unstake/std",
|
||||
"pallet-glutton/std",
|
||||
@@ -294,6 +296,7 @@ runtime-benchmarks = [
|
||||
"pallet-election-provider-multi-phase/runtime-benchmarks",
|
||||
"pallet-election-provider-support-benchmarking/runtime-benchmarks",
|
||||
"pallet-elections-phragmen/runtime-benchmarks",
|
||||
"pallet-example-mbm/runtime-benchmarks",
|
||||
"pallet-example-tasks/runtime-benchmarks",
|
||||
"pallet-fast-unstake/runtime-benchmarks",
|
||||
"pallet-glutton/runtime-benchmarks",
|
||||
@@ -373,6 +376,7 @@ try-runtime = [
|
||||
"pallet-democracy/try-runtime",
|
||||
"pallet-election-provider-multi-phase/try-runtime",
|
||||
"pallet-elections-phragmen/try-runtime",
|
||||
"pallet-example-mbm/try-runtime",
|
||||
"pallet-example-tasks/try-runtime",
|
||||
"pallet-fast-unstake/try-runtime",
|
||||
"pallet-glutton/try-runtime",
|
||||
|
||||
@@ -320,6 +320,8 @@ impl pallet_example_tasks::Config for Runtime {
|
||||
type WeightInfo = pallet_example_tasks::weights::SubstrateWeight<Runtime>;
|
||||
}
|
||||
|
||||
impl pallet_example_mbm::Config for Runtime {}
|
||||
|
||||
impl pallet_utility::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
@@ -2439,6 +2441,9 @@ mod runtime {
|
||||
|
||||
#[runtime::pallet_index(77)]
|
||||
pub type SkipFeelessPayment = pallet_skip_feeless_payment;
|
||||
|
||||
#[runtime::pallet_index(78)]
|
||||
pub type PalletExampleMbms = pallet_example_mbm;
|
||||
}
|
||||
|
||||
/// The address format for describing accounts.
|
||||
@@ -2597,6 +2602,7 @@ mod benches {
|
||||
[pallet_whitelist, Whitelist]
|
||||
[pallet_tx_pause, TxPause]
|
||||
[pallet_safe_mode, SafeMode]
|
||||
[pallet_example_mbm, PalletExampleMbms]
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user