diff --git a/runtime/altair/src/lib.rs b/runtime/altair/src/lib.rs index a7bc2b8c78..33aa7d4566 100644 --- a/runtime/altair/src/lib.rs +++ b/runtime/altair/src/lib.rs @@ -1862,7 +1862,7 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - migrations::UpgradeAltair1031, + migrations::UpgradeAltair1032, >; impl fp_self_contained::SelfContainedCall for RuntimeCall { diff --git a/runtime/altair/src/migrations.rs b/runtime/altair/src/migrations.rs index c17621f2fd..1aad7da33b 100644 --- a/runtime/altair/src/migrations.rs +++ b/runtime/altair/src/migrations.rs @@ -15,7 +15,7 @@ use frame_support::{traits::OnRuntimeUpgrade, weights::Weight}; /// that have to be applied on that chain, which includes migrations that have /// already been executed on Algol (1028 & 1029). #[cfg(not(feature = "testnet-runtime"))] -pub type UpgradeAltair1031 = ( +pub type UpgradeAltair1032 = ( // FIXME: This migration fails to decode 4 entries against Altair // orml_tokens_migration::CurrencyIdRefactorMigration, // At minimum, bumps storage version from 1 to 2 @@ -54,27 +54,10 @@ pub type UpgradeAltair1031 = ( ); /// The Upgrade set for Algol - it excludes the migrations already executed in -/// the side releases that only landed on Algol (1028 & 1029) but not yet on +/// the side releases that only landed on Algol (1028 to 1031) but not yet on /// Altair. #[cfg(feature = "testnet-runtime")] -pub type UpgradeAltair1031 = ( - // At minimum, bumps storage version from 0 to 1 - runtime_common::migrations::nuke::Migration, - // At minimum, bump storage version from 0 to 1 - runtime_common::migrations::nuke::Migration, - runtime_common::migrations::asset_registry_xcmv3::Migration< - crate::Runtime, - asset_registry::AltairAssets, - 5, - 5, - 2, - 9, - >, - // Low weight, bumps uninitialized storage version from v0 to v1 - pallet_xcm::migration::v1::MigrateToV1, - // Sets currently unset safe XCM version to v2 - xcm_v2_to_v3::SetSafeXcmVersion, -); +pub type UpgradeAltair1032 = (); mod asset_registry { use cfg_primitives::Balance; @@ -87,8 +70,6 @@ mod asset_registry { pub const ALTAIR_ASSET_LOC_COUNT: u32 = 5; pub const ALTAIR_ASSET_METADATA_COUNT: u32 = 5; - pub const ALGOL_ASSET_LOC_COUNT: u32 = 2; - pub const ALGOL_ASSET_METADATA_COUNT: u32 = 9; pub struct AltairAssets; impl runtime_common::migrations::asset_registry_xcmv3::AssetsToMigrate for AltairAssets { @@ -105,11 +86,6 @@ mod asset_registry { { Self::get_altair_assets() } - (loc, meta) - if (loc, meta) == (ALGOL_ASSET_LOC_COUNT, ALGOL_ASSET_METADATA_COUNT) => - { - Self::get_algol_assets() - } _ => vec![], } } @@ -228,270 +204,6 @@ mod asset_registry { ), ] } - - pub fn get_algol_assets() -> Vec<( - CurrencyId, - orml_asset_registry::AssetMetadata, - )> { - // 02f3a00dd12f644daec907013b16eb6d14bf1c4cb4 - let gk_bytes: &[u8] = &[ - 2u8, 243u8, 160u8, 13u8, 209u8, 47u8, 100u8, 77u8, 174u8, 201u8, 7u8, 1u8, 59u8, - 22u8, 235u8, 109u8, 20u8, 191u8, 28u8, 76u8, 180u8, - ]; - let mut gk = [0u8; 32]; - gk[..gk_bytes.len()].copy_from_slice(gk_bytes); - - // 0x3a39cb9fb7c1b5e5b0071d8a9396fdeb - let polka_jr_bytes = &[ - 58u8, 57u8, 203u8, 159u8, 183u8, 193u8, 181u8, 229u8, 176u8, 7u8, 29u8, 138u8, - 147u8, 150u8, 253u8, 235u8, - ]; - let mut polka_jr = [0u8; 16]; - polka_jr[..polka_jr_bytes.len()].copy_from_slice(polka_jr_bytes); - - // 0xe0af7eeed9aa5e17667d617dbecd5975 - let polka_mezz_1_bytes = &[ - 224u8, 175u8, 126u8, 238u8, 217u8, 170u8, 94u8, 23u8, 102u8, 125u8, 97u8, 125u8, - 190u8, 205u8, 89u8, 117u8, - ]; - let mut polka_mezz_1 = [0u8; 16]; - polka_mezz_1[..polka_mezz_1_bytes.len()].copy_from_slice(polka_mezz_1_bytes); - - // 0xa52f72fd60c3f0a11b8c99fc35f54d9f - let polka_mezz_2_bytes = &[ - 165u8, 47u8, 114u8, 253u8, 96u8, 195u8, 240u8, 161u8, 27u8, 140u8, 153u8, 252u8, - 53u8, 245u8, 77u8, 159u8, - ]; - let mut polka_mezz_2 = [0u8; 16]; - polka_mezz_2[..polka_mezz_2_bytes.len()].copy_from_slice(polka_mezz_2_bytes); - - // 0xa7e7bdcb04b43e1ab323c9690f2bc24e - let polka_mezz_3_bytes = &[ - 167u8, 231u8, 189u8, 203u8, 4u8, 180u8, 62u8, 26u8, 179u8, 35u8, 201u8, 105u8, - 15u8, 43u8, 194u8, 78u8, - ]; - let mut polka_mezz_3 = [0u8; 16]; - polka_mezz_3[..polka_mezz_3_bytes.len()].copy_from_slice(polka_mezz_3_bytes); - - // 0x2793bae22e2db2423b056e8ec7f1cded - let polka_senior_bytes = &[ - 39u8, 147u8, 186u8, 226u8, 46u8, 45u8, 178u8, 66u8, 59u8, 5u8, 110u8, 142u8, 199u8, - 241u8, 205u8, 237u8, - ]; - let mut polka_senior = [0u8; 16]; - polka_senior[..polka_senior_bytes.len()].copy_from_slice(polka_senior_bytes); - - // 0x5b218a7ea17e848b640087adcdd7dfb2 - let just_jr_bytes = &[ - 91u8, 33u8, 138u8, 126u8, 161u8, 126u8, 132u8, 139u8, 100u8, 0u8, 135u8, 173u8, - 205u8, 215u8, 223u8, 178u8, - ]; - let mut just_jr = [0u8; 16]; - just_jr[..just_jr_bytes.len()].copy_from_slice(just_jr_bytes); - - // 0x7acea1c8880afe5e32b41b77747ad8aa - let just_sr_bytes = &[ - 122u8, 206u8, 161u8, 200u8, 136u8, 10u8, 254u8, 94u8, 50u8, 180u8, 27u8, 119u8, - 116u8, 122u8, 216u8, 170u8, - ]; - let mut just_sr = [0u8; 16]; - just_sr[..just_sr_bytes.len()].copy_from_slice(just_sr_bytes); - - // 0x07865c6e87b9f70255377e024ace6630c1eaa37f - let lp_eth_acc: [u8; 20] = [ - 7u8, 134u8, 92u8, 110u8, 135u8, 185u8, 247u8, 2u8, 85u8, 55u8, 126u8, 2u8, 74u8, - 206u8, 102u8, 48u8, 193u8, 234u8, 163u8, 127u8, - ]; - - vec![ - ( - CurrencyId::Native, - orml_asset_registry::AssetMetadata { - decimals: 18, - name: b"Algol".to_vec(), - symbol: b"ALGL".to_vec(), - existential_deposit: 1_000_000_000_000u128, - location: Some(VersionedMultiLocation::V3(MultiLocation::new( - 1, - Junctions::X2( - Parachain(crate::ParachainInfo::parachain_id().into()), - GeneralKey { - length: 2, - data: gk, - }, - ), - ))), - additional: CustomMetadata { - mintable: false, - permissioned: false, - pool_currency: false, - transferability: CrossChainTransferability::Xcm(XcmMetadata { - fee_per_second: None, - }), - }, - }, - ), - ( - CurrencyId::Tranche(3151673055, polka_jr), - orml_asset_registry::AssetMetadata { - decimals: 6, - name: b"Polka Pool Junior".to_vec(), - symbol: b"PP1J".to_vec(), - existential_deposit: 0u128, - location: None, - additional: CustomMetadata { - mintable: false, - permissioned: true, - pool_currency: false, - transferability: CrossChainTransferability::LiquidityPools, - }, - }, - ), - ( - CurrencyId::Tranche(3151673055, polka_mezz_1), - orml_asset_registry::AssetMetadata { - decimals: 6, - name: b"Polka Pool Mezz 1".to_vec(), - symbol: b"PP1M1".to_vec(), - existential_deposit: 0u128, - location: None, - additional: CustomMetadata { - mintable: false, - permissioned: true, - pool_currency: false, - transferability: CrossChainTransferability::LiquidityPools, - }, - }, - ), - ( - CurrencyId::Tranche(3151673055, polka_mezz_2), - orml_asset_registry::AssetMetadata { - decimals: 6, - name: b"Polka Pool Mezz 2".to_vec(), - symbol: b"PP1M2".to_vec(), - existential_deposit: 0u128, - location: None, - additional: CustomMetadata { - mintable: false, - permissioned: true, - pool_currency: false, - transferability: CrossChainTransferability::LiquidityPools, - }, - }, - ), - ( - CurrencyId::Tranche(3151673055, polka_mezz_3), - orml_asset_registry::AssetMetadata { - decimals: 6, - name: b"Polka Pool Mezz 3".to_vec(), - symbol: b"PP1M3".to_vec(), - existential_deposit: 0u128, - location: None, - additional: CustomMetadata { - mintable: false, - permissioned: true, - pool_currency: false, - transferability: CrossChainTransferability::LiquidityPools, - }, - }, - ), - ( - CurrencyId::Tranche(3151673055, polka_senior), - orml_asset_registry::AssetMetadata { - decimals: 6, - name: b"Polka Pool Senior".to_vec(), - symbol: b"PP1S".to_vec(), - existential_deposit: 0u128, - location: None, - additional: CustomMetadata { - mintable: false, - permissioned: true, - pool_currency: false, - transferability: CrossChainTransferability::LiquidityPools, - }, - }, - ), - ( - CurrencyId::Tranche(3581766799, just_jr), - orml_asset_registry::AssetMetadata { - decimals: 6, - name: b"Just Logistics Series 3 Junior".to_vec(), - symbol: b"JL3JR".to_vec(), - existential_deposit: 0u128, - location: None, - additional: CustomMetadata { - mintable: false, - permissioned: true, - pool_currency: false, - transferability: CrossChainTransferability::LiquidityPools, - }, - }, - ), - ( - CurrencyId::Tranche(3581766799, just_sr), - orml_asset_registry::AssetMetadata { - decimals: 6, - name: b"Just Logistics Series 3 Senior".to_vec(), - symbol: b"JL3SR".to_vec(), - existential_deposit: 0u128, - location: None, - additional: CustomMetadata { - mintable: false, - permissioned: true, - pool_currency: false, - transferability: CrossChainTransferability::LiquidityPools, - }, - }, - ), - ( - CurrencyId::ForeignAsset(1), - orml_asset_registry::AssetMetadata { - decimals: 6, - name: b"Tether USD".to_vec(), - symbol: b"USDT".to_vec(), - existential_deposit: 0u128, - location: Some(VersionedMultiLocation::V3(MultiLocation::new( - 1, - Junctions::X3(Parachain(1000), PalletInstance(50), GeneralIndex(1984)), - ))), - additional: CustomMetadata { - mintable: false, - permissioned: false, - pool_currency: true, - transferability: CrossChainTransferability::Xcm(XcmMetadata { - fee_per_second: None, - }), - }, - }, - ), - ( - CurrencyId::ForeignAsset(100001), - orml_asset_registry::AssetMetadata { - decimals: 6, - name: b"LP Ethereum Wrapped USDC".to_vec(), - symbol: b"LpEthUSDC".to_vec(), - existential_deposit: 1_000u128, - location: Some(VersionedMultiLocation::V3(MultiLocation::new( - 0, - Junctions::X3( - PalletInstance(108), - GlobalConsensus(Ethereum { chain_id: 5 }), - AccountKey20 { - network: None, - key: lp_eth_acc, - }, - ), - ))), - additional: CustomMetadata { - mintable: false, - permissioned: false, - pool_currency: true, - transferability: CrossChainTransferability::LiquidityPools, - }, - }, - ), - ] - } } } diff --git a/runtime/centrifuge/src/lib.rs b/runtime/centrifuge/src/lib.rs index 0340cd1e68..33516c606e 100644 --- a/runtime/centrifuge/src/lib.rs +++ b/runtime/centrifuge/src/lib.rs @@ -2036,7 +2036,7 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - migrations::UpgradeCentrifuge1020, + migrations::UpgradeCentrifuge1021, >; pub struct TransactionConverter; diff --git a/runtime/centrifuge/src/migrations.rs b/runtime/centrifuge/src/migrations.rs index 6c166a8126..c3c3631ff7 100644 --- a/runtime/centrifuge/src/migrations.rs +++ b/runtime/centrifuge/src/migrations.rs @@ -9,405 +9,5 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -use frame_support::{traits::OnRuntimeUpgrade, weights::Weight}; -pub type UpgradeCentrifuge1020 = ( - // Removes metadata containing xcm_v1 locations of registered assets and sets to hardcoded ones - // containing xcm_v3 locations - runtime_common::migrations::asset_registry_xcmv3::Migration< - crate::Runtime, - asset_registry::CentrifugeAssets, - 6, - 8, - 2, - 3, - >, - // At minimum, bumps storage version from 1 to 2 - runtime_common::migrations::nuke::Migration, - // At minimum, bumps storage version from 0 to 3 - runtime_common::migrations::nuke::Migration, - // At minimum, bumps storage version from 0 to 1 - runtime_common::migrations::nuke::Migration, - // At minimum, bumps storage version from 0 to 1 - runtime_common::migrations::nuke::Migration, - // Funds pallet_rewards::Instance2 account with existential deposit - pallet_rewards::migrations::new_instance::FundExistentialDeposit< - crate::Runtime, - pallet_rewards::Instance2, - crate::NativeToken, - crate::ExistentialDeposit, - >, - // Low weight, mainly bumps storage version to latest (v1 to v2) - crate::DmpQueue, - // Low weight, mainly bumps storage version to latest (v2 to v3) - crate::XcmpQueue, - // Low weight, bumps uninitialized storage version from v0 to v1 - pallet_xcm::migration::v1::MigrateToV1, - // Sets currently unset safe XCM version to v2 - xcm_v2_to_v3::SetSafeXcmVersion, -); - -mod asset_registry { - use cfg_primitives::Balance; - use cfg_types::{ - tokens::{ - lp_eth_usdc_metadata, CrossChainTransferability, CurrencyId, CustomMetadata, - ETHEREUM_MAINNET_CHAIN_ID, ETHEREUM_USDC, LP_ETH_USDC_CURRENCY_ID, - }, - xcm::XcmMetadata, - }; - use sp_std::{vec, vec::Vec}; - use xcm::{v3::prelude::*, VersionedMultiLocation}; - - use crate::ParachainInfo; - - pub const CENTRIFUGE_ASSET_LOC_COUNT: u32 = 6; - pub const CENTRIFUGE_ASSET_METADATA_COUNT: u32 = 8; - pub const CATALYST_ASSET_LOC_COUNT: u32 = 2; - pub const CATALYST_ASSET_METADATA_COUNT: u32 = 3; - - pub struct CentrifugeAssets; - impl runtime_common::migrations::asset_registry_xcmv3::AssetsToMigrate for CentrifugeAssets { - fn get_assets_to_migrate( - loc_count: u32, - meta_count: u32, - ) -> Vec<( - CurrencyId, - orml_asset_registry::AssetMetadata, - )> { - match (loc_count, meta_count) { - (loc, meta) - if (loc, meta) - == (CENTRIFUGE_ASSET_LOC_COUNT, CENTRIFUGE_ASSET_METADATA_COUNT) => - { - Self::get_centrifuge_assets() - } - (loc, meta) - if (loc, meta) == (CATALYST_ASSET_LOC_COUNT, CATALYST_ASSET_METADATA_COUNT) => - { - Self::get_catalyst_assets() - } - _ => vec![], - } - } - } - - impl CentrifugeAssets { - fn get_centrifuge_assets() -> Vec<( - CurrencyId, - orml_asset_registry::AssetMetadata, - )> { - let mut gk = [0u8; 32]; - gk[1] = 1; - - vec![ - ( - CurrencyId::Native, - orml_asset_registry::AssetMetadata { - decimals: 18, - name: b"Centrifuge".to_vec(), - symbol: b"CFG".to_vec(), - existential_deposit: 1_000_000_000_000u128, - location: Some(VersionedMultiLocation::V3(MultiLocation::new( - 1, - Junctions::X2( - Parachain(ParachainInfo::parachain_id().into()), - GeneralKey { - length: 2, - data: gk, - }, - ), - ))), - additional: CustomMetadata { - mintable: false, - permissioned: false, - pool_currency: false, - transferability: CrossChainTransferability::Xcm(XcmMetadata { - fee_per_second: None, - }), - }, - }, - ), - ( - CurrencyId::ForeignAsset(1), - orml_asset_registry::AssetMetadata { - decimals: 6, - name: b"Tether USDT".to_vec(), - symbol: b"USDT".to_vec(), - existential_deposit: 10_000u128, - location: Some(VersionedMultiLocation::V3(MultiLocation::new( - 1, - Junctions::X3(Parachain(1000), PalletInstance(50), GeneralIndex(1984)), - ))), - additional: CustomMetadata { - mintable: false, - permissioned: false, - pool_currency: true, - transferability: CrossChainTransferability::Xcm(XcmMetadata { - fee_per_second: None, - }), - }, - }, - ), - ( - CurrencyId::ForeignAsset(2), - orml_asset_registry::AssetMetadata { - decimals: 6, - name: b"Axelar USDC".to_vec(), - symbol: b"xcUSDC".to_vec(), - existential_deposit: 10_000u128, - location: None, - additional: CustomMetadata { - mintable: false, - permissioned: false, - pool_currency: true, - transferability: CrossChainTransferability::Xcm(XcmMetadata { - fee_per_second: None, - }), - }, - }, - ), - ( - CurrencyId::ForeignAsset(3), - orml_asset_registry::AssetMetadata { - decimals: 12, - name: b"Acala Dollar".to_vec(), - symbol: b"aUSD".to_vec(), - existential_deposit: 10_000_000_000u128, - location: Some(VersionedMultiLocation::V3(MultiLocation::new( - 1, - Junctions::X2( - Parachain(2000), - GeneralKey { - length: 2, - data: gk, - }, - ), - ))), - additional: CustomMetadata { - mintable: false, - permissioned: false, - pool_currency: true, - transferability: CrossChainTransferability::Xcm(XcmMetadata { - fee_per_second: None, - }), - }, - }, - ), - ( - CurrencyId::ForeignAsset(4), - orml_asset_registry::AssetMetadata { - decimals: 18, - name: b"Glimmer".to_vec(), - symbol: b"GLMR".to_vec(), - existential_deposit: 1_000_000_000_000_000u128, - location: Some(VersionedMultiLocation::V3(MultiLocation::new( - 1, - Junctions::X2(Parachain(2004), PalletInstance(10)), - ))), - additional: CustomMetadata { - mintable: false, - permissioned: false, - pool_currency: false, - transferability: CrossChainTransferability::Xcm(XcmMetadata { - fee_per_second: None, - }), - }, - }, - ), - ( - CurrencyId::ForeignAsset(5), - orml_asset_registry::AssetMetadata { - decimals: 10, - name: b"DOT".to_vec(), - symbol: b"DOT".to_vec(), - existential_deposit: 100_000u128, - location: Some(VersionedMultiLocation::V3(MultiLocation::new( - 1, - Junctions::Here, - ))), - additional: CustomMetadata { - mintable: false, - permissioned: false, - pool_currency: false, - transferability: CrossChainTransferability::Xcm(XcmMetadata { - fee_per_second: None, - }), - }, - }, - ), - ( - CurrencyId::ForeignAsset(6), - orml_asset_registry::AssetMetadata { - decimals: 6, - name: b"USD Coin".to_vec(), - symbol: b"USDC".to_vec(), - existential_deposit: 1000_u128, - location: Some(VersionedMultiLocation::V3(MultiLocation::new( - 1, - X3(Parachain(1000), PalletInstance(50), GeneralIndex(1337)), - ))), - additional: CustomMetadata { - mintable: false, - permissioned: false, - pool_currency: true, - transferability: CrossChainTransferability::Xcm(XcmMetadata { - fee_per_second: None, - }), - }, - }, - ), - // Adding LP USDC here - ( - LP_ETH_USDC_CURRENCY_ID, - lp_eth_usdc_metadata( - crate::LiquidityPoolsPalletIndex::get(), - ETHEREUM_MAINNET_CHAIN_ID, - ETHEREUM_USDC, - ), - ), - ] - } - - fn get_catalyst_assets() -> Vec<( - CurrencyId, - orml_asset_registry::AssetMetadata, - )> { - // 02f3a00dd12f644daec907013b16eb6d14bf1c4cb4 - let gk_bytes: &[u8] = &[ - 2u8, 243u8, 160u8, 13u8, 209u8, 47u8, 100u8, 77u8, 174u8, 201u8, 7u8, 1u8, 59u8, - 22u8, 235u8, 109u8, 20u8, 191u8, 28u8, 76u8, 180u8, - ]; - let mut gk = [0u8; 32]; - gk[..gk_bytes.len()].copy_from_slice(gk_bytes); - - let mut gk_native = [0u8; 32]; - gk_native[1] = 1; - - // 35fd988a3d77251b19d5d379a4775321 - let tranche_id_bytes = &[ - 53u8, 253u8, 152u8, 138u8, 61u8, 119u8, 37u8, 27u8, 25u8, 213u8, 211u8, 121u8, - 164u8, 119u8, 83u8, 33u8, - ]; - let mut tranche_id = [0u8; 16]; - tranche_id[..tranche_id_bytes.len()].copy_from_slice(tranche_id_bytes); - - vec![ - ( - CurrencyId::Native, - orml_asset_registry::AssetMetadata { - decimals: 18, - name: b"Centrifuge".to_vec(), - symbol: b"CFG".to_vec(), - existential_deposit: 1_000_000_000_000u128, - location: Some(VersionedMultiLocation::V3(MultiLocation::new( - 1, - Junctions::X2( - Parachain(ParachainInfo::parachain_id().into()), - GeneralKey { - length: 2, - data: gk_native, - }, - ), - ))), - additional: CustomMetadata { - mintable: false, - permissioned: false, - pool_currency: false, - transferability: CrossChainTransferability::Xcm(XcmMetadata { - fee_per_second: None, - }), - }, - }, - ), - ( - CurrencyId::ForeignAsset(41), - orml_asset_registry::AssetMetadata { - decimals: 6, - name: b"Wormhole USDC".to_vec(), - symbol: b"USDC".to_vec(), - existential_deposit: 10_000u128, - location: Some(VersionedMultiLocation::V3(MultiLocation::new( - 1, - Junctions::X2( - Parachain(2000), - GeneralKey { - length: 20, - data: gk, - }, - ), - ))), - additional: CustomMetadata { - mintable: false, - permissioned: false, - pool_currency: true, - transferability: CrossChainTransferability::Xcm(XcmMetadata { - fee_per_second: None, - }), - }, - }, - ), - ( - CurrencyId::ForeignAsset(1984), - orml_asset_registry::AssetMetadata { - decimals: 6, - name: b"Rococo USDT".to_vec(), - symbol: b"USDR".to_vec(), - existential_deposit: 100u128, - location: Some(VersionedMultiLocation::V3(MultiLocation::new( - 1, - Junctions::X3(Parachain(1000), PalletInstance(50), GeneralIndex(1984)), - ))), - additional: CustomMetadata { - mintable: false, - permissioned: false, - pool_currency: true, - transferability: CrossChainTransferability::Xcm(XcmMetadata { - fee_per_second: None, - }), - }, - }, - ), - ( - CurrencyId::Tranche(3041110957, tranche_id), - orml_asset_registry::AssetMetadata { - decimals: 6, - name: b"New Pool Junior".to_vec(), - symbol: b"NPJUN".to_vec(), - existential_deposit: 0u128, - location: None, - additional: CustomMetadata { - mintable: false, - permissioned: true, - pool_currency: false, - transferability: CrossChainTransferability::Xcm(XcmMetadata { - fee_per_second: None, - }), - }, - }, - ), - ] - } - } -} - -mod xcm_v2_to_v3 { - use super::*; - use crate::{PolkadotXcm, RuntimeOrigin}; - - pub struct SetSafeXcmVersion; - - impl OnRuntimeUpgrade for SetSafeXcmVersion { - fn on_runtime_upgrade() -> Weight { - // Unfortunately, SafeXcmVersion storage is not leaked to runtime, so we can't - // do any pre- or post-upgrade checks - PolkadotXcm::force_default_xcm_version( - RuntimeOrigin::root(), - Some(cfg_primitives::SAFE_XCM_VERSION), - ) - .unwrap_or_else(|_| log::error!("Failed to set safe XCM version on runtime upgrade, requires manual call via governance")); - - crate::RocksDbWeight::get().writes(1) - } - } -} +pub type UpgradeCentrifuge1021 = ();