Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Make Westmint Support Bridged Assets #1895

Closed
wants to merge 37 commits into from
Closed
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
aa67a43
rustc grumbles
joepetrowski Nov 17, 2022
9ab1739
add second instance
joepetrowski Nov 17, 2022
df40d77
leave some todos
joepetrowski Nov 17, 2022
94717a4
fix AssetsToBlockAuthor
joepetrowski Nov 17, 2022
47d96e0
make it almost compile
joepetrowski Nov 18, 2022
1e0515e
make it actually compile
joepetrowski Nov 18, 2022
6de6313
fix logical error
joepetrowski Nov 18, 2022
35d1e57
cargo fmt to resolve duplicate imports on merge
joepetrowski Nov 18, 2022
362a907
fix deps to make compile
joepetrowski Nov 18, 2022
b8ed7e7
fmt
joepetrowski Nov 18, 2022
633366b
(pallet-assets/pallet-asset-tx-payment) pathched with `sv-locked-for-…
bkontur Nov 21, 2022
5f7f8c2
statemine progress
joepetrowski Nov 22, 2022
e8afde4
ForeignCreators :tada:
joepetrowski Nov 22, 2022
e569b68
fix AssetFeeAsExistentialDepositMultiplier
joepetrowski Nov 30, 2022
c487586
no default instance
joepetrowski Nov 30, 2022
4191a4d
instantiate statemint
joepetrowski Dec 1, 2022
d9d5a9d
compile tests
bkontur Dec 22, 2022
3353263
don't rename pallet in runtime
joepetrowski Jan 11, 2023
9e211b8
don't rename and fix tests
joepetrowski Jan 11, 2023
25c2fc5
fix benchmark helper
joepetrowski Jan 12, 2023
a4a581b
fix benchmark build
joepetrowski Jan 12, 2023
9cd2708
more benchmark fixes
joepetrowski Jan 12, 2023
81e9703
fix penpal and rococo
joepetrowski Jan 12, 2023
4365baa
Merge branch 'bridge-hub-base' into joe-bridge-hub-westmint-assets
bkontur Jan 15, 2023
3aae882
XCM v3 Companion (#697)
gavofyork Jan 17, 2023
0c3f3b7
update BenchmarkHelper interface
joepetrowski Jan 17, 2023
c3d2108
fmt
joepetrowski Jan 17, 2023
85de406
Instantiate All Assets Pallets (#1908)
joepetrowski Jan 18, 2023
e350102
Bump assert_cmd from 2.0.7 to 2.0.8 (#2074)
dependabot[bot] Jan 18, 2023
6d47326
adjust pallet_contracts config (#2108)
agryaznov Jan 19, 2023
b6b2c1c
Companion for paritytech/polkadot#6578 (#2112)
KiChjang Jan 19, 2023
df40e7e
[backport] version bumps from release 9370 (#2095)
EgorPopelyaev Jan 19, 2023
46d3091
Simplify the template (#2072)
bkchr Jan 19, 2023
2b9a640
Use correct runtime function name (#2116)
bkchr Jan 20, 2023
01c83d2
Bump clap from 4.0.32 to 4.1.1 (#2096)
dependabot[bot] Jan 20, 2023
b322482
Warn validators with slow hardware (#1863)
Szegoo Jan 21, 2023
0d75123
Merge remote-tracking branch 'origin/master' into joe-bridge-hub-west…
bkontur Jan 21, 2023
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
463 changes: 205 additions & 258 deletions Cargo.lock

Large diffs are not rendered by default.

356 changes: 186 additions & 170 deletions Cargo.toml

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions parachains/common/src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,18 @@ where

/// A `HandleCredit` implementation that naively transfers the fees to the block author.
/// Will drop and burn the assets in case the transfer fails.
pub struct AssetsToBlockAuthor<R>(PhantomData<R>);
impl<R> HandleCredit<AccountIdOf<R>, pallet_assets::Pallet<R>> for AssetsToBlockAuthor<R>
pub struct AssetsToBlockAuthor<R, I>(PhantomData<(R, I)>);
impl<R, I> HandleCredit<AccountIdOf<R>, pallet_assets::Pallet<R, I>> for AssetsToBlockAuthor<R, I>
where
R: pallet_authorship::Config + pallet_assets::Config,
I: 'static,
R: pallet_authorship::Config + pallet_assets::Config<I>,
AccountIdOf<R>:
From<polkadot_primitives::v2::AccountId> + Into<polkadot_primitives::v2::AccountId>,
{
fn handle_credit(credit: CreditOf<AccountIdOf<R>, pallet_assets::Pallet<R>>) {
fn handle_credit(credit: CreditOf<AccountIdOf<R>, pallet_assets::Pallet<R, I>>) {
if let Some(author) = pallet_authorship::Pallet::<R>::author() {
// In case of error: Will drop the result triggering the `OnDrop` of the imbalance.
let _ = pallet_assets::Pallet::<R>::resolve(&author, credit);
let _ = pallet_assets::Pallet::<R, I>::resolve(&author, credit);
}
}
}
Expand Down
31 changes: 19 additions & 12 deletions parachains/common/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,30 +76,37 @@ impl ShouldExecute for DenyReserveTransferToRelayChain {
/// A `ChargeFeeInFungibles` implementation that converts the output of
/// a given WeightToFee implementation an amount charged in
/// a particular assetId from pallet-assets
pub struct AssetFeeAsExistentialDepositMultiplier<Runtime, WeightToFee, BalanceConverter>(
PhantomData<(Runtime, WeightToFee, BalanceConverter)>,
);
impl<CurrencyBalance, Runtime, WeightToFee, BalanceConverter>
pub struct AssetFeeAsExistentialDepositMultiplier<
Runtime,
WeightToFee,
BalanceConverter,
AssetInstance: 'static,
>(PhantomData<(Runtime, WeightToFee, BalanceConverter, AssetInstance)>);
impl<CurrencyBalance, Runtime, WeightToFee, BalanceConverter, AssetInstance>
cumulus_primitives_utility::ChargeWeightInFungibles<
AccountIdOf<Runtime>,
pallet_assets::Pallet<Runtime>,
> for AssetFeeAsExistentialDepositMultiplier<Runtime, WeightToFee, BalanceConverter>
pallet_assets::Pallet<Runtime, AssetInstance>,
> for AssetFeeAsExistentialDepositMultiplier<Runtime, WeightToFee, BalanceConverter, AssetInstance>
where
Runtime: pallet_assets::Config,
Runtime: pallet_assets::Config<AssetInstance>,
WeightToFee: WeightToFeePolynomial<Balance = CurrencyBalance>,
BalanceConverter: BalanceConversion<
CurrencyBalance,
<Runtime as pallet_assets::Config>::AssetId,
<Runtime as pallet_assets::Config>::Balance,
<Runtime as pallet_assets::Config<AssetInstance>>::AssetId,
<Runtime as pallet_assets::Config<AssetInstance>>::Balance,
>,
AccountIdOf<Runtime>:
From<polkadot_primitives::v2::AccountId> + Into<polkadot_primitives::v2::AccountId>,
{
fn charge_weight_in_fungibles(
asset_id: <pallet_assets::Pallet<Runtime> as Inspect<AccountIdOf<Runtime>>>::AssetId,
asset_id: <pallet_assets::Pallet<Runtime, AssetInstance> as Inspect<
AccountIdOf<Runtime>,
>>::AssetId,
weight: Weight,
) -> Result<<pallet_assets::Pallet<Runtime> as Inspect<AccountIdOf<Runtime>>>::Balance, XcmError>
{
) -> Result<
<pallet_assets::Pallet<Runtime, AssetInstance> as Inspect<AccountIdOf<Runtime>>>::Balance,
XcmError,
> {
let amount = WeightToFee::weight_to_fee(&weight);
// If the amount gotten is not at least the ED, then make it be the ED of the asset
// This is to avoid burning assets and decreasing the supply
Expand Down
52 changes: 34 additions & 18 deletions parachains/runtimes/assets/statemine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,13 @@ parameter_types! {
pub type AssetsForceOrigin =
EitherOfDiverse<EnsureRoot<AccountId>, EnsureXcm<IsMajorityOfBody<KsmLocation, ExecutiveBody>>>;

impl pallet_assets::Config for Runtime {
pub type TrustBackedAssetsInstance = pallet_assets::Instance1;
impl pallet_assets::Config<TrustBackedAssetsInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type Balance = Balance;
type AssetId = AssetId;
type Currency = Balances;
type CreateOrigin = AsEnsureOriginWithArg<EnsureSigned<AccountId>>;
type ForceOrigin = AssetsForceOrigin;
type AssetDeposit = AssetDeposit;
type MetadataDepositBase = MetadataDepositBase;
Expand All @@ -243,6 +245,8 @@ impl pallet_assets::Config for Runtime {
type Extra = ();
type WeightInfo = weights::pallet_assets::WeightInfo<Runtime>;
type AssetAccountDeposit = AssetAccountDeposit;
#[cfg(feature = "runtime-benchmarks")]
type Helper = ();
}

parameter_types! {
Expand Down Expand Up @@ -317,6 +321,7 @@ impl Default for ProxyType {
Self::Any
}
}
type TrustBackedAssetsCall = pallet_assets::Call<Runtime, TrustBackedAssetsInstance>;
impl InstanceFilter<RuntimeCall> for ProxyType {
fn filter(&self, c: &RuntimeCall) -> bool {
match self {
Expand Down Expand Up @@ -344,12 +349,12 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
},
ProxyType::AssetOwner => matches!(
c,
RuntimeCall::Assets(pallet_assets::Call::create { .. }) |
RuntimeCall::Assets(pallet_assets::Call::destroy { .. }) |
RuntimeCall::Assets(pallet_assets::Call::transfer_ownership { .. }) |
RuntimeCall::Assets(pallet_assets::Call::set_team { .. }) |
RuntimeCall::Assets(pallet_assets::Call::set_metadata { .. }) |
RuntimeCall::Assets(pallet_assets::Call::clear_metadata { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::create { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::destroy { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::transfer_ownership { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::set_team { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::set_metadata { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::clear_metadata { .. }) |
RuntimeCall::Uniques(pallet_uniques::Call::create { .. }) |
RuntimeCall::Uniques(pallet_uniques::Call::destroy { .. }) |
RuntimeCall::Uniques(pallet_uniques::Call::transfer_ownership { .. }) |
Expand All @@ -366,12 +371,12 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
),
ProxyType::AssetManager => matches!(
c,
RuntimeCall::Assets(pallet_assets::Call::mint { .. }) |
RuntimeCall::Assets(pallet_assets::Call::burn { .. }) |
RuntimeCall::Assets(pallet_assets::Call::freeze { .. }) |
RuntimeCall::Assets(pallet_assets::Call::thaw { .. }) |
RuntimeCall::Assets(pallet_assets::Call::freeze_asset { .. }) |
RuntimeCall::Assets(pallet_assets::Call::thaw_asset { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::mint { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::burn { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::freeze { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::thaw { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::freeze_asset { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::thaw_asset { .. }) |
RuntimeCall::Uniques(pallet_uniques::Call::mint { .. }) |
RuntimeCall::Uniques(pallet_uniques::Call::burn { .. }) |
RuntimeCall::Uniques(pallet_uniques::Call::freeze { .. }) |
Expand Down Expand Up @@ -516,10 +521,18 @@ impl pallet_collator_selection::Config for Runtime {

impl pallet_asset_tx_payment::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
// TODO https://github.com/paritytech/substrate/issues/12724
// This should be able to take assets from any pallet instance. For now we only allow
// sufficient, trust backed assets to pay for transaction fees.
type Fungibles = Assets;
type OnChargeAssetTransaction = pallet_asset_tx_payment::FungiblesAdapter<
pallet_assets::BalanceToAssetBalance<Balances, Runtime, ConvertInto>,
AssetsToBlockAuthor<Runtime>,
pallet_assets::BalanceToAssetBalance<
Balances,
Runtime,
ConvertInto,
TrustBackedAssetsInstance,
>,
AssetsToBlockAuthor<Runtime, TrustBackedAssetsInstance>,
>;
}

Expand Down Expand Up @@ -595,7 +608,7 @@ construct_runtime!(
Proxy: pallet_proxy::{Pallet, Call, Storage, Event<T>} = 42,

// The main stage.
Assets: pallet_assets::{Pallet, Call, Storage, Event<T>} = 50,
Assets: pallet_assets::<Instance1>::{Pallet, Call, Storage, Event<T>} = 50,
Uniques: pallet_uniques::{Pallet, Call, Storage, Event<T>} = 51,
}
);
Expand Down Expand Up @@ -624,14 +637,16 @@ pub type UncheckedExtrinsic =
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
/// Extrinsic type that has already been checked.
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra>;
/// Migrations to apply on runtime upgrade.
pub type Migrations = ();
/// Executive: handles dispatch to the various modules.
pub type Executive = frame_executive::Executive<
Runtime,
Block,
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
(),
Migrations,
>;

#[cfg(feature = "runtime-benchmarks")]
Expand Down Expand Up @@ -840,6 +855,7 @@ impl_runtime_apis! {
impl cumulus_pallet_session_benchmarking::Config for Runtime {}

use xcm::latest::prelude::*;
use xcm_builder::MintLocation;
use xcm_config::KsmLocation;
use pallet_xcm_benchmarks::asset_instance_from;

Expand Down Expand Up @@ -882,7 +898,7 @@ impl_runtime_apis! {
KsmLocation::get(),
MultiAsset { fun: Fungible(1 * UNITS), id: Concrete(KsmLocation::get()) },
));
pub const CheckedAccount: Option<AccountId> = None;
pub const CheckedAccount: Option<(AccountId, MintLocation)> = None;

}

Expand Down
18 changes: 12 additions & 6 deletions parachains/runtimes/assets/statemine/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

use super::{
AccountId, AllPalletsWithSystem, AssetId, Assets, Authorship, Balance, Balances, ParachainInfo,
ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee,
XcmpQueue,
ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin,
TrustBackedAssetsInstance, WeightToFee, XcmpQueue,
};
use frame_support::{
match_types, parameter_types,
Expand Down Expand Up @@ -48,7 +48,7 @@ parameter_types! {
pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into();
pub UniversalLocation: InteriorMultiLocation = X1(Parachain(ParachainInfo::parachain_id().into()));
pub const Local: MultiLocation = Here.into_location();
pub AssetsPalletLocation: MultiLocation =
pub TrustBackedAssetsPalletLocation: MultiLocation =
PalletInstance(<Assets as PalletInfoAccess>::index() as u8).into();
pub CheckingAccount: AccountId = PolkadotXcm::check_account();
}
Expand Down Expand Up @@ -87,7 +87,7 @@ pub type FungiblesTransactor = FungiblesAdapter<
ConvertedConcreteId<
AssetId,
Balance,
AsPrefixedGeneralIndex<AssetsPalletLocation, AssetId, JustTry>,
AsPrefixedGeneralIndex<TrustBackedAssetsPalletLocation, AssetId, JustTry>,
JustTry,
>,
// Convert an XCM MultiLocation into a local account id:
Expand Down Expand Up @@ -183,12 +183,18 @@ impl xcm_executor::Config for XcmConfig {
AssetFeeAsExistentialDepositMultiplier<
Runtime,
WeightToFee,
pallet_assets::BalanceToAssetBalance<Balances, Runtime, ConvertInto>,
pallet_assets::BalanceToAssetBalance<
Balances,
Runtime,
ConvertInto,
TrustBackedAssetsInstance,
>,
TrustBackedAssetsInstance,
>,
ConvertedConcreteId<
AssetId,
Balance,
AsPrefixedGeneralIndex<AssetsPalletLocation, AssetId, JustTry>,
AsPrefixedGeneralIndex<TrustBackedAssetsPalletLocation, AssetId, JustTry>,
JustTry,
>,
Assets,
Expand Down
48 changes: 31 additions & 17 deletions parachains/runtimes/assets/statemint/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,14 @@ parameter_types! {
pub type AssetsForceOrigin =
EitherOfDiverse<EnsureRoot<AccountId>, EnsureXcm<IsMajorityOfBody<DotLocation, ExecutiveBody>>>;

impl pallet_assets::Config for Runtime {
pub type TrustBackedAssetsInstance = pallet_assets::Instance1;
type TrustBackedAssetsCall = pallet_assets::Call<Runtime, TrustBackedAssetsInstance>;
impl pallet_assets::Config<TrustBackedAssetsInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type Balance = Balance;
type AssetId = AssetId;
type Currency = Balances;
type CreateOrigin = AsEnsureOriginWithArg<EnsureSigned<AccountId>>;
type ForceOrigin = AssetsForceOrigin;
type AssetDeposit = AssetDeposit;
type MetadataDepositBase = MetadataDepositBase;
Expand All @@ -273,6 +276,8 @@ impl pallet_assets::Config for Runtime {
type Extra = ();
type WeightInfo = weights::pallet_assets::WeightInfo<Runtime>;
type AssetAccountDeposit = AssetAccountDeposit;
#[cfg(feature = "runtime-benchmarks")]
type Helper = ();
}

parameter_types! {
Expand Down Expand Up @@ -374,12 +379,12 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
},
ProxyType::AssetOwner => matches!(
c,
RuntimeCall::Assets(pallet_assets::Call::create { .. }) |
RuntimeCall::Assets(pallet_assets::Call::destroy { .. }) |
RuntimeCall::Assets(pallet_assets::Call::transfer_ownership { .. }) |
RuntimeCall::Assets(pallet_assets::Call::set_team { .. }) |
RuntimeCall::Assets(pallet_assets::Call::set_metadata { .. }) |
RuntimeCall::Assets(pallet_assets::Call::clear_metadata { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::create { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::destroy { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::transfer_ownership { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::set_team { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::set_metadata { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::clear_metadata { .. }) |
RuntimeCall::Uniques(pallet_uniques::Call::create { .. }) |
RuntimeCall::Uniques(pallet_uniques::Call::destroy { .. }) |
RuntimeCall::Uniques(pallet_uniques::Call::transfer_ownership { .. }) |
Expand All @@ -396,12 +401,12 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
),
ProxyType::AssetManager => matches!(
c,
RuntimeCall::Assets(pallet_assets::Call::mint { .. }) |
RuntimeCall::Assets(pallet_assets::Call::burn { .. }) |
RuntimeCall::Assets(pallet_assets::Call::freeze { .. }) |
RuntimeCall::Assets(pallet_assets::Call::thaw { .. }) |
RuntimeCall::Assets(pallet_assets::Call::freeze_asset { .. }) |
RuntimeCall::Assets(pallet_assets::Call::thaw_asset { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::mint { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::burn { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::freeze { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::thaw { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::freeze_asset { .. }) |
RuntimeCall::Assets(TrustBackedAssetsCall::thaw_asset { .. }) |
RuntimeCall::Uniques(pallet_uniques::Call::mint { .. }) |
RuntimeCall::Uniques(pallet_uniques::Call::burn { .. }) |
RuntimeCall::Uniques(pallet_uniques::Call::freeze { .. }) |
Expand Down Expand Up @@ -548,8 +553,13 @@ impl pallet_asset_tx_payment::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Fungibles = Assets;
type OnChargeAssetTransaction = pallet_asset_tx_payment::FungiblesAdapter<
pallet_assets::BalanceToAssetBalance<Balances, Runtime, ConvertInto>,
AssetsToBlockAuthor<Runtime>,
pallet_assets::BalanceToAssetBalance<
Balances,
Runtime,
ConvertInto,
TrustBackedAssetsInstance,
>,
AssetsToBlockAuthor<Runtime, TrustBackedAssetsInstance>,
>;
}

Expand Down Expand Up @@ -625,7 +635,7 @@ construct_runtime!(
Proxy: pallet_proxy::{Pallet, Call, Storage, Event<T>} = 42,

// The main stage.
Assets: pallet_assets::{Pallet, Call, Storage, Event<T>} = 50,
Assets: pallet_assets::<Instance1>::{Pallet, Call, Storage, Event<T>} = 50,
Uniques: pallet_uniques::{Pallet, Call, Storage, Event<T>} = 51,
}
);
Expand Down Expand Up @@ -654,13 +664,16 @@ pub type UncheckedExtrinsic =
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
/// Extrinsic type that has already been checked.
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra>;
/// Migrations to apply on runtime upgrade.
pub type Migrations = ();
/// Executive: handles dispatch to the various modules.
pub type Executive = frame_executive::Executive<
Runtime,
Block,
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
Migrations,
>;

#[cfg(feature = "runtime-benchmarks")]
Expand Down Expand Up @@ -869,6 +882,7 @@ impl_runtime_apis! {
impl cumulus_pallet_session_benchmarking::Config for Runtime {}

use xcm::latest::prelude::*;
use xcm_builder::MintLocation;
use xcm_config::DotLocation;
use pallet_xcm_benchmarks::asset_instance_from;

Expand Down Expand Up @@ -911,7 +925,7 @@ impl_runtime_apis! {
DotLocation::get(),
MultiAsset { fun: Fungible(1 * UNITS), id: Concrete(DotLocation::get()) },
));
pub const CheckedAccount: Option<AccountId> = None;
pub const CheckedAccount: Option<(AccountId, MintLocation)> = None;
}

impl pallet_xcm_benchmarks::fungible::Config for Runtime {
Expand Down
4 changes: 2 additions & 2 deletions parachains/runtimes/assets/statemint/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ parameter_types! {
pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into();
pub UniversalLocation: InteriorMultiLocation = Parachain(ParachainInfo::parachain_id().into()).into();
pub const Local: MultiLocation = MultiLocation::here();
pub AssetsPalletLocation: MultiLocation =
pub TrustBackedAssetsPalletLocation: MultiLocation =
PalletInstance(<Assets as PalletInfoAccess>::index() as u8).into();
pub CheckingAccount: AccountId = PolkadotXcm::check_account();
}
Expand Down Expand Up @@ -84,7 +84,7 @@ pub type FungiblesTransactor = FungiblesAdapter<
ConvertedConcreteId<
AssetId,
Balance,
AsPrefixedGeneralIndex<AssetsPalletLocation, AssetId, JustTry>,
AsPrefixedGeneralIndex<TrustBackedAssetsPalletLocation, AssetId, JustTry>,
JustTry,
>,
// Convert an XCM MultiLocation into a local account id:
Expand Down
Loading