Skip to content

Commit

Permalink
Contracts Add new version for marking new stable API
Browse files Browse the repository at this point in the history
  • Loading branch information
pgherveou committed Feb 21, 2024
1 parent 579ef32 commit b8b4e60
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion substrate/frame/contracts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ pub mod pallet {
use sp_runtime::Perbill;

/// The current storage version.
pub(crate) const STORAGE_VERSION: StorageVersion = StorageVersion::new(15);
pub(crate) const STORAGE_VERSION: StorageVersion = StorageVersion::new(16);

#[pallet::pallet]
#[pallet::storage_version(STORAGE_VERSION)]
Expand Down
1 change: 1 addition & 0 deletions substrate/frame/contracts/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ pub mod v12;
pub mod v13;
pub mod v14;
pub mod v15;
pub mod v16;
include!(concat!(env!("OUT_DIR"), "/migration_codegen.rs"));

use crate::{weights::WeightInfo, Config, Error, MigrationInProgress, Pallet, Weight, LOG_TARGET};
Expand Down
23 changes: 23 additions & 0 deletions substrate/frame/contracts/src/migration/v16.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// This file is part of Substrate.

// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

//! Version 16 does not have any storage update. Instead, it serves as an indicator for the
//! stabilization of the following APIs: `call_v2`, `instantiate_v2`, `lock_delegate_dependency`,
//! and `unlock_delegate_dependency`.

const VERSION: u16 = 16;
pub type Migration = crate::NoopMigration<VERSION>;

0 comments on commit b8b4e60

Please sign in to comment.