Skip to content
Open
Show file tree
Hide file tree
Changes from 5 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
20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -248,16 +248,16 @@ cumulus-client-collator = { git = "https://github.com/paritytech//cumulus", bra
cumulus-relay-chain-minimal-node = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.42" }

[patch."https://github.com/open-web3-stack/open-runtime-module-library"]
orml-asset-registry = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca05423f4f32be1d30765caacdc7d90130f5554a" }
orml-oracle = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca05423f4f32be1d30765caacdc7d90130f5554a" }
orml-tokens = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca05423f4f32be1d30765caacdc7d90130f5554a" }
orml-traits = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca05423f4f32be1d30765caacdc7d90130f5554a" }
orml-unknown-tokens = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca05423f4f32be1d30765caacdc7d90130f5554a" }
orml-utilities = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca05423f4f32be1d30765caacdc7d90130f5554a" }
orml-vesting = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca05423f4f32be1d30765caacdc7d90130f5554a" }
orml-xcm-support = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca05423f4f32be1d30765caacdc7d90130f5554a" }
orml-xcm = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca05423f4f32be1d30765caacdc7d90130f5554a" }
orml-xtokens = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca05423f4f32be1d30765caacdc7d90130f5554a" }
orml-asset-registry = { git = "https://github.com/r0gue-io//open-runtime-module-library", branch = "master" }
orml-oracle = { git = "https://github.com/r0gue-io//open-runtime-module-library", branch = "master" }
orml-tokens = { git = "https://github.com/r0gue-io//open-runtime-module-library", branch = "master" }
orml-traits = { git = "https://github.com/r0gue-io//open-runtime-module-library", branch = "master" }
orml-unknown-tokens = { git = "https://github.com/r0gue-io//open-runtime-module-library", branch = "master" }
orml-utilities = { git = "https://github.com/r0gue-io//open-runtime-module-library", branch = "master" }
orml-vesting = { git = "https://github.com/r0gue-io//open-runtime-module-library", branch = "master" }
orml-xcm-support = { git = "https://github.com/r0gue-io//open-runtime-module-library", branch = "master" }
orml-xcm = { git = "https://github.com/r0gue-io//open-runtime-module-library", branch = "master" }
orml-xtokens = { git = "https://github.com/r0gue-io//open-runtime-module-library", branch = "master" }

[patch."https://github.com/paritytech/frontier"]
fc-consensus = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v0.9.42" }
Expand Down
10 changes: 5 additions & 5 deletions parachain/runtime/interlay/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ use frame_support::{
traits::{Everything, Get, Nothing},
};
use orml_asset_registry::{AssetRegistryTrader, FixedRateAssetRegistryTrader};
use orml_traits::{
location::AbsoluteReserveProvider, parameter_type_with_key, FixedConversionRateProvider, MultiCurrency,
};
use orml_traits::{parameter_type_with_key, FixedConversionRateProvider, MultiCurrency};
use orml_xcm_support::{DepositToAlternative, IsNativeConcrete, MultiCurrencyAdapter, MultiNativeAsset};
use orml_xtokens::AbsoluteReserveProviderMigrationPhase;
use pallet_xcm::XcmPassthrough;
use polkadot_parachain::primitives::Sibling;
use runtime_common::Transactless;
Expand Down Expand Up @@ -198,7 +197,7 @@ impl xcm_executor::Config for XcmConfig {
#[cfg(not(feature = "runtime-benchmarks"))]
type AssetTransactor = LocalAssetTransactor;
type OriginConverter = XcmOriginToTransactDispatchOrigin;
type IsReserve = MultiNativeAsset<AbsoluteReserveProvider>;
type IsReserve = MultiNativeAsset<AbsoluteReserveProviderMigrationPhase<Runtime>>;
type IsTeleporter = Nothing; // no teleportation allowed
type Barrier = Barrier;
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
Expand Down Expand Up @@ -432,8 +431,9 @@ impl orml_xtokens::Config for Runtime {
type MaxAssetsForTransfer = MaxAssetsForTransfer;
type MinXcmFee = ParachainMinFee;
type MultiLocationsFilter = Everything;
type ReserveProvider = AbsoluteReserveProvider;
type ReserveProvider = AbsoluteReserveProviderMigrationPhase<Runtime>;
type UniversalLocation = UniversalLocation;
type MigrationPhaseUpdateOrigin = EnsureRoot<AccountId>;
}

#[cfg(feature = "runtime-benchmarks")]
Expand Down
2 changes: 1 addition & 1 deletion parachain/runtime/kintsugi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("kintsugi-parachain"),
impl_name: create_runtime_str!("kintsugi-parachain"),
authoring_version: 1,
spec_version: 1025006,
spec_version: 1025007,
impl_version: 1,
transaction_version: 4,
apis: RUNTIME_API_VERSIONS,
Expand Down
37 changes: 31 additions & 6 deletions parachain/runtime/kintsugi/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ use frame_support::{
traits::{Everything, Get, Nothing},
};
use orml_asset_registry::{AssetRegistryTrader, FixedRateAssetRegistryTrader};
use orml_traits::{
location::AbsoluteReserveProvider, parameter_type_with_key, FixedConversionRateProvider, MultiCurrency,
};
use orml_traits::{parameter_type_with_key, FixedConversionRateProvider, MultiCurrency};
use orml_xcm_support::{DepositToAlternative, IsNativeConcrete, MultiCurrencyAdapter, MultiNativeAsset};
use orml_xtokens::{AbsoluteReserveProviderMigrationPhase, MigrationPhase};
use pallet_xcm::XcmPassthrough;
use polkadot_parachain::primitives::Sibling;
use runtime_common::Transactless;
Expand Down Expand Up @@ -192,7 +191,7 @@ impl xcm_executor::Config for XcmConfig {
#[cfg(not(feature = "runtime-benchmarks"))]
type AssetTransactor = LocalAssetTransactor;
type OriginConverter = XcmOriginToTransactDispatchOrigin;
type IsReserve = MultiNativeAsset<AbsoluteReserveProvider>;
type IsReserve = MultiNativeAsset<AbsoluteReserveProviderMigrationPhase<Runtime>>;
type IsTeleporter = Nothing; // no teleportation allowed
type Barrier = Barrier;
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
Expand Down Expand Up @@ -231,6 +230,31 @@ parameter_types! {
pub const ReachableDest: MultiLocation = MultiLocation::parent();
}

// A reserve filter to disable pallet xcm reserve transfers during AHM. The reserve provider used
// in the XcmExecutor isn't catching it for some reason (probably the super outdated xcm version)
pub struct PalletXcmReserveTransferFilterMigrationPhase;
impl frame_support::traits::Contains<(MultiLocation, Vec<MultiAsset>)>
for PalletXcmReserveTransferFilterMigrationPhase
{
fn contains((_, assets): &(MultiLocation, Vec<MultiAsset>)) -> bool {
let migration_phase = orml_xtokens::MigrationStatus::<Runtime>::get();
match migration_phase {
MigrationPhase::InProgress | MigrationPhase::Completed => assets.iter().any(|asset| {
if let AssetId::Concrete(MultiLocation {
parents: 1,
interior: Junctions::Here,
}) = &asset.id
{
false
} else {
true
}
}),
_ => true,
}
}
}

impl pallet_xcm::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type RuntimeCall = RuntimeCall;
Expand All @@ -241,7 +265,7 @@ impl pallet_xcm::Config for Runtime {
type XcmExecuteFilter = Nothing;
type XcmExecutor = XcmExecutor<XcmConfig>;
type XcmTeleportFilter = Everything;
type XcmReserveTransferFilter = Everything;
type XcmReserveTransferFilter = PalletXcmReserveTransferFilterMigrationPhase;
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
Expand Down Expand Up @@ -426,8 +450,9 @@ impl orml_xtokens::Config for Runtime {
type MaxAssetsForTransfer = MaxAssetsForTransfer;
type MinXcmFee = ParachainMinFee;
type MultiLocationsFilter = Everything;
type ReserveProvider = AbsoluteReserveProvider;
type ReserveProvider = AbsoluteReserveProviderMigrationPhase<Runtime>;
type UniversalLocation = UniversalLocation;
type MigrationPhaseUpdateOrigin = EnsureRoot<AccountId>;
}

#[cfg(feature = "runtime-benchmarks")]
Expand Down
Loading