mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 09:21:04 +00:00
Deny using relay chain for reserve transfers (#1169)
* Deny using relay chain for reserve transfers * match on junction as well. * Update polkadot-parachains/parachains-common/src/xcm_config.rs * Use Err to signal deny * Deny depisiting reserved assets + fmt * Allow DepositReserveAssets from relay chain Deny InitiateReserveWithdrawal * Rather than allow DepositReserveAsset, it was ReservAssetDeposited that should be allowed but logged. * don't reference common parachains. * Update parachain-template/runtime/src/xcm_config.rs * Warn if reserve asset deposited msg detected. Co-authored-by: Keith Yeung <kungfukeith11@gmail.com> Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
This commit is contained in:
@@ -23,7 +23,10 @@ use frame_support::{
|
||||
weights::Weight,
|
||||
};
|
||||
use pallet_xcm::XcmPassthrough;
|
||||
use parachains_common::impls::ToStakingPot;
|
||||
use parachains_common::{
|
||||
impls::ToStakingPot,
|
||||
xcm_config::{DenyReserveTransferToRelayChain, DenyThenTry},
|
||||
};
|
||||
use polkadot_parachain::primitives::Sibling;
|
||||
use xcm::latest::prelude::*;
|
||||
use xcm_builder::{
|
||||
@@ -135,16 +138,19 @@ match_types! {
|
||||
};
|
||||
}
|
||||
|
||||
pub type Barrier = (
|
||||
TakeWeightCredit,
|
||||
AllowTopLevelPaidExecutionFrom<Everything>,
|
||||
// Parent and its plurality get free execution
|
||||
AllowUnpaidExecutionFrom<ParentOrParentsPlurality>,
|
||||
// Expected responses are OK.
|
||||
AllowKnownQueryResponses<PolkadotXcm>,
|
||||
// Subscriptions for version tracking are OK.
|
||||
AllowSubscriptionsFrom<Everything>,
|
||||
);
|
||||
pub type Barrier = DenyThenTry<
|
||||
DenyReserveTransferToRelayChain,
|
||||
(
|
||||
TakeWeightCredit,
|
||||
AllowTopLevelPaidExecutionFrom<Everything>,
|
||||
// Parent and its plurality get free execution
|
||||
AllowUnpaidExecutionFrom<ParentOrParentsPlurality>,
|
||||
// Expected responses are OK.
|
||||
AllowKnownQueryResponses<PolkadotXcm>,
|
||||
// Subscriptions for version tracking are OK.
|
||||
AllowSubscriptionsFrom<Everything>,
|
||||
),
|
||||
>;
|
||||
|
||||
pub struct XcmConfig;
|
||||
impl xcm_executor::Config for XcmConfig {
|
||||
|
||||
Reference in New Issue
Block a user