From b9cbb0f4281ba20bd50eab5256230c1586f50c5f Mon Sep 17 00:00:00 2001 From: PG Herveou Date: Wed, 12 Jul 2023 10:33:22 +0200 Subject: [PATCH] Contracts rename v9 to v09 (#14533) --- frame/contracts/src/benchmarking/mod.rs | 6 +++--- frame/contracts/src/lib.rs | 8 ++++---- frame/contracts/src/migration.rs | 10 +++++----- frame/contracts/src/migration/{v9.rs => v09.rs} | 0 4 files changed, 12 insertions(+), 12 deletions(-) rename frame/contracts/src/migration/{v9.rs => v09.rs} (100%) diff --git a/frame/contracts/src/benchmarking/mod.rs b/frame/contracts/src/benchmarking/mod.rs index 11683456f0a14..0e853b6cde357 100644 --- a/frame/contracts/src/benchmarking/mod.rs +++ b/frame/contracts/src/benchmarking/mod.rs @@ -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::(c as usize); - let mut m = v9::Migration::::default(); + v09::store_old_dummy_code::(c as usize); + let mut m = v09::Migration::::default(); }: { m.step(); } diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index d36a0f93f339b..f555c46859fcb 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -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, v10::Migration, v11::Migration); + /// type Migrations = (v10::Migration, v11::Migration); /// ``` /// /// 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,); + /// type Migrations = (v10::Migration,); /// ``` type Migrations: MigrateSequence; } diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index 827135e081223..36dc8e60cdcdc 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -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, v10::Migration, v11::Migration); +//! type Migrations = (v10::Migration, v11::Migration); //! ``` //! //! ## 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}; diff --git a/frame/contracts/src/migration/v9.rs b/frame/contracts/src/migration/v09.rs similarity index 100% rename from frame/contracts/src/migration/v9.rs rename to frame/contracts/src/migration/v09.rs