mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 01:41:09 +00:00
Move type Migrations to Config (#14309)
* move migrate sequence to config * remove commented out code * Update frame/contracts/src/lib.rs Co-authored-by: PG Herveou <pgherveou@gmail.com> * remove Migrations generic * make runtime use noop migrations * restrict is_upgrade_supported * undo is_upgrade_supported change * Update bin/node/runtime/src/lib.rs Co-authored-by: PG Herveou <pgherveou@gmail.com> * add rust doc example for `Migrations` * feature gate NoopMigration * fix example code * improve example --------- Co-authored-by: PG Herveou <pgherveou@gmail.com>
This commit is contained in:
@@ -87,12 +87,12 @@ mod address;
|
||||
mod benchmarking;
|
||||
mod exec;
|
||||
mod gas;
|
||||
mod migration;
|
||||
mod schedule;
|
||||
mod storage;
|
||||
mod wasm;
|
||||
|
||||
pub mod chain_extension;
|
||||
pub mod migration;
|
||||
pub mod weights;
|
||||
|
||||
#[cfg(test)]
|
||||
@@ -319,6 +319,16 @@ pub mod pallet {
|
||||
/// The maximum length of the debug buffer in bytes.
|
||||
#[pallet::constant]
|
||||
type MaxDebugBufferLen: Get<u32>;
|
||||
|
||||
/// The sequence of migration steps that will be applied during a migration.
|
||||
///
|
||||
/// # Examples
|
||||
/// ```
|
||||
/// use pallet_contracts::migration::{v9, v10, v11};
|
||||
/// # struct Runtime {};
|
||||
/// type Migrations = (v9::Migration<Runtime>, v10::Migration<Runtime>, v11::Migration<Runtime>);
|
||||
/// ```
|
||||
type Migrations: MigrateSequence;
|
||||
}
|
||||
|
||||
#[pallet::hooks]
|
||||
|
||||
Reference in New Issue
Block a user