diff --git a/cumulus/polkadot-parachains/canvas-kusama/src/contracts.rs b/cumulus/polkadot-parachains/canvas-kusama/src/contracts.rs index 5f43383555110d57131a21f7236375b382e01fed..d5c368fa7c642b3ae616c84a10855e84433b3ae1 100644 --- a/cumulus/polkadot-parachains/canvas-kusama/src/contracts.rs +++ b/cumulus/polkadot-parachains/canvas-kusama/src/contracts.rs @@ -2,7 +2,11 @@ use crate::{ constants::currency::deposit, Balance, Balances, Call, Event, RandomnessCollectiveFlip, Runtime, RuntimeBlockWeights, Timestamp, }; -use frame_support::{parameter_types, traits::Nothing, weights::Weight}; +use frame_support::{ + parameter_types, + traits::{Nothing, OnRuntimeUpgrade}, + weights::Weight, +}; use pallet_contracts::{ weights::{SubstrateWeight, WeightInfo}, Config, DefaultAddressGenerator, Frame, Schedule, @@ -52,3 +56,10 @@ impl Config for Runtime { type CallStack = [Frame<Self>; 31]; type AddressGenerator = DefaultAddressGenerator; } + +pub struct Migrations; +impl OnRuntimeUpgrade for Migrations { + fn on_runtime_upgrade() -> Weight { + pallet_contracts::migration::migrate::<Runtime>() + } +} diff --git a/cumulus/polkadot-parachains/canvas-kusama/src/lib.rs b/cumulus/polkadot-parachains/canvas-kusama/src/lib.rs index e8a3b946fccddff19b3246e1c52334addc1a71b1..6f27584c4b20ba600ce9ea0cbe6b144307c5ada4 100644 --- a/cumulus/polkadot-parachains/canvas-kusama/src/lib.rs +++ b/cumulus/polkadot-parachains/canvas-kusama/src/lib.rs @@ -97,6 +97,7 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext<Runtime>, Runtime, AllPalletsWithSystem, + contracts::Migrations, >; impl_opaque_keys! {