Skip to content

Commit

Permalink
Remove old migrations and clear pallet storage (#1352)
Browse files Browse the repository at this point in the history
* Remove old migrations and clear pallet storage

* Reintroduce benchmark migration

* Fix formatting

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
maltekliemann and mergify[bot] authored Aug 27, 2024
1 parent ae0afe9 commit 16dae64
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 672 deletions.
27 changes: 24 additions & 3 deletions runtime/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,35 @@ macro_rules! decl_common_types {
generic, DispatchError, DispatchResult, RuntimeDebug, SaturatedConversion,
};
use zeitgeist_primitives::traits::{DeployPoolApi, DistributeFees, MarketCommonsPalletApi};
use zrml_market_commons::migrations::{MigrateDisputeMechanism, RemoveMarkets};

pub type Block = generic::Block<Header, UncheckedExtrinsic>;

type Address = sp_runtime::MultiAddress<AccountId, ()>;

type Migrations =
(RemoveMarkets<Runtime, RemovableMarketIds>, MigrateDisputeMechanism<Runtime>);
parameter_types! {
pub const CampaignAssetsPalletStr: &'static str = "CampaignAssets";
pub const CustomAssetsPalletStr: &'static str = "CustomAssets";
pub const MarketAssetsPalletStr: &'static str = "MarketAssets";
pub const LiquidityMiningPalletStr: &'static str = "LiquidityMining";
pub const RikiddoPalletStr: &'static str = "Rikiddo";
pub const SimpleDisputesPalletStr: &'static str = "SimpleDisputes";
}

type RemoveCustomAssets = RemovePallet<CustomAssetsPalletStr, RocksDbWeight>;
type RemoveCampaignAssets = RemovePallet<CampaignAssetsPalletStr, RocksDbWeight>;
type RemoveMarketAssets = RemovePallet<MarketAssetsPalletStr, RocksDbWeight>;
type RemoveLiquidityMining = RemovePallet<LiquidityMiningPalletStr, RocksDbWeight>;
type RemoveRikiddo = RemovePallet<RikiddoPalletStr, RocksDbWeight>;
type RemoveSimpleDisputes = RemovePallet<SimpleDisputesPalletStr, RocksDbWeight>;

type Migrations = (
RemoveCustomAssets,
RemoveCampaignAssets,
RemoveMarketAssets,
RemoveLiquidityMining,
RemoveRikiddo,
RemoveSimpleDisputes,
);

pub type Executive = frame_executive::Executive<
Runtime,
Expand Down
Loading

0 comments on commit 16dae64

Please sign in to comment.