mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 05:51:02 +00:00
Update XCM MultiLocation prefixes for assets (#831)
This commit is contained in:
@@ -312,7 +312,7 @@ pub type FungiblesTransactor = FungiblesAdapter<
|
|||||||
ConvertedConcreteAssetId<
|
ConvertedConcreteAssetId<
|
||||||
AssetId,
|
AssetId,
|
||||||
u64,
|
u64,
|
||||||
AsPrefixedGeneralIndex<StatemintLocation, AssetId, JustTry>,
|
AsPrefixedGeneralIndex<StatemintAssetsPalletLocation, AssetId, JustTry>,
|
||||||
JustTry,
|
JustTry,
|
||||||
>,
|
>,
|
||||||
// Convert an XCM MultiLocation into a local account id:
|
// Convert an XCM MultiLocation into a local account id:
|
||||||
@@ -386,6 +386,10 @@ pub type Barrier = (
|
|||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
pub StatemintLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(1000)));
|
pub StatemintLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(1000)));
|
||||||
|
// ALWAYS ensure that the index in PalletInstance stays up-to-date with
|
||||||
|
// Statemint's Assets pallet index
|
||||||
|
pub StatemintAssetsPalletLocation: MultiLocation =
|
||||||
|
MultiLocation::new(1, X2(Parachain(1000), PalletInstance(50)));
|
||||||
}
|
}
|
||||||
|
|
||||||
pub type Reserves = (NativeAsset, AssetsFrom<StatemintLocation>);
|
pub type Reserves = (NativeAsset, AssetsFrom<StatemintLocation>);
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ use codec::{Decode, Encode, MaxEncodedLen};
|
|||||||
use constants::{currency::*, fee::WeightToFee};
|
use constants::{currency::*, fee::WeightToFee};
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
construct_runtime, match_type, parameter_types,
|
construct_runtime, match_type, parameter_types,
|
||||||
traits::{EnsureOneOf, Everything, InstanceFilter, Nothing},
|
traits::{EnsureOneOf, Everything, InstanceFilter, Nothing, PalletInfoAccess},
|
||||||
weights::{
|
weights::{
|
||||||
constants::{BlockExecutionWeight, ExtrinsicBaseWeight},
|
constants::{BlockExecutionWeight, ExtrinsicBaseWeight},
|
||||||
DispatchClass, IdentityFee, Weight,
|
DispatchClass, IdentityFee, Weight,
|
||||||
@@ -432,6 +432,8 @@ parameter_types! {
|
|||||||
pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into();
|
pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into();
|
||||||
pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into();
|
pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into();
|
||||||
pub const Local: MultiLocation = Here.into();
|
pub const Local: MultiLocation = Here.into();
|
||||||
|
pub AssetsPalletLocation: MultiLocation =
|
||||||
|
PalletInstance(<Assets as PalletInfoAccess>::index() as u8).into();
|
||||||
pub CheckingAccount: AccountId = PolkadotXcm::check_account();
|
pub CheckingAccount: AccountId = PolkadotXcm::check_account();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -469,7 +471,7 @@ pub type FungiblesTransactor = FungiblesAdapter<
|
|||||||
ConvertedConcreteAssetId<
|
ConvertedConcreteAssetId<
|
||||||
AssetId,
|
AssetId,
|
||||||
Balance,
|
Balance,
|
||||||
AsPrefixedGeneralIndex<Local, AssetId, JustTry>,
|
AsPrefixedGeneralIndex<AssetsPalletLocation, AssetId, JustTry>,
|
||||||
JustTry,
|
JustTry,
|
||||||
>,
|
>,
|
||||||
// Convert an XCM MultiLocation into a local account id:
|
// Convert an XCM MultiLocation into a local account id:
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ use codec::{Decode, Encode, MaxEncodedLen};
|
|||||||
use constants::{currency::*, fee::WeightToFee};
|
use constants::{currency::*, fee::WeightToFee};
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
construct_runtime, match_type, parameter_types,
|
construct_runtime, match_type, parameter_types,
|
||||||
traits::{Contains, EnsureOneOf, Everything, InstanceFilter, Nothing},
|
traits::{Contains, EnsureOneOf, Everything, InstanceFilter, Nothing, PalletInfoAccess},
|
||||||
weights::{
|
weights::{
|
||||||
constants::{BlockExecutionWeight, ExtrinsicBaseWeight},
|
constants::{BlockExecutionWeight, ExtrinsicBaseWeight},
|
||||||
DispatchClass, IdentityFee, Weight,
|
DispatchClass, IdentityFee, Weight,
|
||||||
@@ -444,6 +444,8 @@ parameter_types! {
|
|||||||
pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into();
|
pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into();
|
||||||
pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into();
|
pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into();
|
||||||
pub const Local: MultiLocation = Here.into();
|
pub const Local: MultiLocation = Here.into();
|
||||||
|
pub AssetsPalletLocation: MultiLocation =
|
||||||
|
PalletInstance(<Assets as PalletInfoAccess>::index() as u8).into();
|
||||||
pub CheckingAccount: AccountId = PolkadotXcm::check_account();
|
pub CheckingAccount: AccountId = PolkadotXcm::check_account();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -481,7 +483,7 @@ pub type FungiblesTransactor = FungiblesAdapter<
|
|||||||
ConvertedConcreteAssetId<
|
ConvertedConcreteAssetId<
|
||||||
AssetId,
|
AssetId,
|
||||||
Balance,
|
Balance,
|
||||||
AsPrefixedGeneralIndex<Local, AssetId, JustTry>,
|
AsPrefixedGeneralIndex<AssetsPalletLocation, AssetId, JustTry>,
|
||||||
JustTry,
|
JustTry,
|
||||||
>,
|
>,
|
||||||
// Convert an XCM MultiLocation into a local account id:
|
// Convert an XCM MultiLocation into a local account id:
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ use codec::{Decode, Encode, MaxEncodedLen};
|
|||||||
use constants::{currency::*, fee::WeightToFee};
|
use constants::{currency::*, fee::WeightToFee};
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
construct_runtime, match_type, parameter_types,
|
construct_runtime, match_type, parameter_types,
|
||||||
traits::{Everything, InstanceFilter},
|
traits::{Everything, InstanceFilter, PalletInfoAccess},
|
||||||
weights::{
|
weights::{
|
||||||
constants::{BlockExecutionWeight, ExtrinsicBaseWeight},
|
constants::{BlockExecutionWeight, ExtrinsicBaseWeight},
|
||||||
DispatchClass, IdentityFee, Weight,
|
DispatchClass, IdentityFee, Weight,
|
||||||
@@ -430,6 +430,8 @@ parameter_types! {
|
|||||||
pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into();
|
pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into();
|
||||||
pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into();
|
pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into();
|
||||||
pub const Local: MultiLocation = Here.into();
|
pub const Local: MultiLocation = Here.into();
|
||||||
|
pub AssetsPalletLocation: MultiLocation =
|
||||||
|
PalletInstance(<Assets as PalletInfoAccess>::index() as u8).into();
|
||||||
pub CheckingAccount: AccountId = PolkadotXcm::check_account();
|
pub CheckingAccount: AccountId = PolkadotXcm::check_account();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -467,7 +469,7 @@ pub type FungiblesTransactor = FungiblesAdapter<
|
|||||||
ConvertedConcreteAssetId<
|
ConvertedConcreteAssetId<
|
||||||
AssetId,
|
AssetId,
|
||||||
Balance,
|
Balance,
|
||||||
AsPrefixedGeneralIndex<Local, AssetId, JustTry>,
|
AsPrefixedGeneralIndex<AssetsPalletLocation, AssetId, JustTry>,
|
||||||
JustTry,
|
JustTry,
|
||||||
>,
|
>,
|
||||||
// Convert an XCM MultiLocation into a local account id:
|
// Convert an XCM MultiLocation into a local account id:
|
||||||
|
|||||||
Reference in New Issue
Block a user