Contracts rename v9 to v09 (#14533)

This commit is contained in:
PG Herveou
2023-07-12 10:33:22 +02:00
committed by GitHub
parent ca5970e582
commit 1818bb130e
4 changed files with 12 additions and 12 deletions
@@ -30,7 +30,7 @@ use self::{
};
use crate::{
exec::{AccountIdOf, Key},
migration::{v10, v11, v12, v9, MigrationStep},
migration::{v09, v10, v11, v12, MigrationStep},
wasm::CallFlags,
Pallet as Contracts, *,
};
@@ -216,8 +216,8 @@ benchmarks! {
#[pov_mode = Measured]
v9_migration_step {
let c in 0 .. T::MaxCodeLen::get();
v9::store_old_dummy_code::<T>(c as usize);
let mut m = v9::Migration::<T>::default();
v09::store_old_dummy_code::<T>(c as usize);
let mut m = v09::Migration::<T>::default();
}: {
m.step();
}
+4 -4
View File
@@ -325,16 +325,16 @@ pub mod pallet {
///
/// # Examples
/// ```
/// use pallet_contracts::migration::{v9, v10, v11};
/// use pallet_contracts::migration::{v10, v11};
/// # struct Runtime {};
/// type Migrations = (v9::Migration<Runtime>, v10::Migration<Runtime>, v11::Migration<Runtime>);
/// type Migrations = (v10::Migration<Runtime>, v11::Migration<Runtime>);
/// ```
///
/// If you have a single migration step, you can use a tuple with a single element:
/// ```
/// use pallet_contracts::migration::v9;
/// use pallet_contracts::migration::v10;
/// # struct Runtime {};
/// type Migrations = (v9::Migration<Runtime>,);
/// type Migrations = (v10::Migration<Runtime>,);
/// ```
type Migrations: MigrateSequence;
}
+5 -5
View File
@@ -27,13 +27,13 @@
//!
//! ## Example:
//!
//! To configure a migration to `v11` for a runtime using `v8` of pallet-contracts on the chain, you
//! would set the `Migrations` type as follows:
//! To configure a migration to `v11` for a runtime using `v10` of pallet-contracts on the chain,
//! you would set the `Migrations` type as follows:
//!
//! ```
//! use pallet_contracts::migration::{v9, v10, v11};
//! use pallet_contracts::migration::{v10, v11};
//! # pub enum Runtime {};
//! type Migrations = (v9::Migration<Runtime>, v10::Migration<Runtime>, v11::Migration<Runtime>);
//! type Migrations = (v10::Migration<Runtime>, v11::Migration<Runtime>);
//! ```
//!
//! ## Notes:
@@ -56,10 +56,10 @@
//! While the migration is in progress, all dispatchables except `migrate`, are blocked, and returns
//! a `MigrationInProgress` error.
pub mod v09;
pub mod v10;
pub mod v11;
pub mod v12;
pub mod v9;
use crate::{weights::WeightInfo, Config, Error, MigrationInProgress, Pallet, Weight, LOG_TARGET};
use codec::{Codec, Decode};