mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-07 10:48:04 +00:00
canvas: Run migrations defined by pallet-contracts (#1011)
* Run migrations defined by pallet-contracts * cargo fmt
This commit is contained in:
committed by
GitHub
parent
8cf65b2e3c
commit
829dadceca
@@ -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>()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,6 +97,7 @@ pub type Executive = frame_executive::Executive<
|
||||
frame_system::ChainContext<Runtime>,
|
||||
Runtime,
|
||||
AllPalletsWithSystem,
|
||||
contracts::Migrations,
|
||||
>;
|
||||
|
||||
impl_opaque_keys! {
|
||||
|
||||
Reference in New Issue
Block a user