From 4c1b691c8b347f92100519b76fd4a2102f25abd5 Mon Sep 17 00:00:00 2001 From: Dmitry Markin Date: Wed, 2 Aug 2023 18:09:19 +0300 Subject: [PATCH] Companion for paritytech/substrate#14020 --- .../contracts/contracts-rococo/src/contracts.rs | 14 ++++++++++---- .../runtimes/contracts/contracts-rococo/src/lib.rs | 4 ++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/parachains/runtimes/contracts/contracts-rococo/src/contracts.rs b/parachains/runtimes/contracts/contracts-rococo/src/contracts.rs index b7df0918a24..a1d691560ff 100644 --- a/parachains/runtimes/contracts/contracts-rococo/src/contracts.rs +++ b/parachains/runtimes/contracts/contracts-rococo/src/contracts.rs @@ -1,14 +1,15 @@ use crate::{ constants::currency::deposit, Balance, Balances, RandomnessCollectiveFlip, Runtime, - RuntimeCall, RuntimeEvent, Timestamp, + RuntimeCall, RuntimeEvent, RuntimeHoldReason, Timestamp, }; use frame_support::{ parameter_types, traits::{ConstBool, ConstU32, Nothing}, }; use pallet_contracts::{ - migration::v12, weights::SubstrateWeight, Config, DebugInfo, DefaultAddressGenerator, Frame, - Schedule, + migration::{v12, v13, v14}, + weights::SubstrateWeight, + Config, DebugInfo, DefaultAddressGenerator, Frame, Schedule, }; use sp_runtime::Perbill; @@ -54,5 +55,10 @@ impl Config for Runtime { type MaxDebugBufferLen = ConstU32<{ 2 * 1024 * 1024 }>; type MaxDelegateDependencies = ConstU32<32>; type CodeHashLockupDepositPercent = CodeHashLockupDepositPercent; - type Migrations = (v12::Migration,); + type Migrations = ( + v12::Migration, + v13::Migration, + v14::Migration, + ); + type RuntimeHoldReason = RuntimeHoldReason; } diff --git a/parachains/runtimes/contracts/contracts-rococo/src/lib.rs b/parachains/runtimes/contracts/contracts-rococo/src/lib.rs index 1923c651156..3491ec19671 100644 --- a/parachains/runtimes/contracts/contracts-rococo/src/lib.rs +++ b/parachains/runtimes/contracts/contracts-rococo/src/lib.rs @@ -220,7 +220,7 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = [u8; 8]; type RuntimeHoldReason = RuntimeHoldReason; type FreezeIdentifier = (); - type MaxHolds = ConstU32<0>; + type MaxHolds = ConstU32<1>; type MaxFreezes = ConstU32<0>; } @@ -365,7 +365,7 @@ construct_runtime!( DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event} = 33, // Smart Contracts. - Contracts: pallet_contracts::{Pallet, Call, Storage, Event} = 40, + Contracts: pallet_contracts::{Pallet, Call, Storage, Event, HoldReason} = 40, // Handy utilities. Utility: pallet_utility::{Pallet, Call, Event} = 50,