Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove old migrations and clear pallet storage #1352

Merged
merged 5 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading