Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transactional processing for XCM #1222

Merged
merged 61 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
775488a
transactional processing for xcm
vstam1 Aug 28, 2023
a77608a
cumulus changes
vstam1 Aug 29, 2023
24ffca1
fix error
vstam1 Aug 29, 2023
900b093
fix error
vstam1 Aug 29, 2023
7f691a2
fmt
vstam1 Aug 30, 2023
04c9712
Merge branch 'master' into vstam1/xcm-transactional-processing
vstam1 Aug 30, 2023
09a41c8
remove transactional processing for UnlockAsset and RequestUnlock
vstam1 Aug 30, 2023
b2f75ee
address feedback
vstam1 Aug 31, 2023
c9286fb
add proof to defensive
vstam1 Aug 31, 2023
3a49382
Merge branch 'master' into vstam1/xcm-transactional-processing
KiChjang Sep 5, 2023
445c3e5
address feedback
vstam1 Sep 7, 2023
f8eaa39
Merge branch 'master' into vstam1/xcm-transactional-processing
vstam1 Sep 7, 2023
aacd739
fix Dispatch Error
vstam1 Sep 7, 2023
b897f2e
Simplify transactional processing implementation
KiChjang Sep 26, 2023
8337e76
Merge branch 'master' into vstam1/xcm-transactional-processing
KiChjang Sep 26, 2023
2dd4856
Merge remote-tracking branch 'origin/master' into vstam1/xcm-transact…
KiChjang Oct 5, 2023
47b914f
Add transactionality to InitiateReserveWithdraw
KiChjang Oct 24, 2023
1ba093c
Add transactionality to instructions that call `take_fee`
KiChjang Oct 25, 2023
3f547a5
Optimize transactional processing for instructions that call `subsume…
KiChjang Oct 25, 2023
efbca2d
Merge remote-tracking branch 'origin/master' into vstam1/xcm-transact…
KiChjang Oct 25, 2023
0161deb
Optimize transactional processing for BuyExecution
KiChjang Oct 25, 2023
733bb4f
Fixes
KiChjang Oct 25, 2023
de7a073
Remove Clone bound on WeightTrader
KiChjang Oct 25, 2023
c4c3bf9
Implement transactionality on ExchangeAsset instruction
KiChjang Oct 27, 2023
8e82ce0
Fixes
KiChjang Oct 27, 2023
3f13f40
Create IIFE during the processing of InitiateTeleport
KiChjang Oct 27, 2023
5be1d14
Ensure holding register can subsume assets before refunding surplus
KiChjang Oct 30, 2023
40cba39
Merge remote-tracking branch 'origin/master' into vstam1/xcm-transact…
KiChjang Nov 14, 2023
1b714f5
Merge branch 'master' into vstam1/xcm-transactional-processing
KiChjang Nov 14, 2023
b1b2446
Merge branch 'master' into vstam1/xcm-transactional-processing
KiChjang Nov 16, 2023
0404308
Fixes
KiChjang Nov 16, 2023
d106fe0
cargo fmt
KiChjang Nov 16, 2023
8a33f99
Fixes
KiChjang Nov 16, 2023
29dfca1
Merge branch 'master' into vstam1/xcm-transactional-processing
KiChjang Jan 1, 2024
40c4aa2
Fixes
KiChjang Jan 1, 2024
e7b0456
Add PR doc
KiChjang Jan 1, 2024
6d24656
Reword docs
KiChjang Jan 1, 2024
647dce1
Reword docs
KiChjang Jan 1, 2024
5a19417
Merge remote-tracking branch 'origin/master' into vstam1/xcm-transact…
KiChjang Jan 3, 2024
7e2f51e
Fix RefundSurplus benchmark
KiChjang Jan 3, 2024
d27171c
Merge remote-tracking branch 'origin/master' into vstam1/xcm-transact…
KiChjang Jan 4, 2024
5ac935e
Merge remote-tracking branch 'origin/master' into vstam1/xcm-transact…
KiChjang Jan 11, 2024
b397a0c
Try disabling transactional processing in benchmarks
KiChjang Jan 11, 2024
ece0123
Fixes
KiChjang Jan 11, 2024
b81fad6
Merge branch 'master' into vstam1/xcm-transactional-processing
franciscoaguirre Jan 15, 2024
90d54df
Re-add transactional processing for benchmarks
KiChjang Jan 15, 2024
06f47bb
Add some logs to RefundSurplus
franciscoaguirre Jan 15, 2024
195d576
Fix refund_surplus benchmark
franciscoaguirre Jan 15, 2024
0f0964c
Specify asset used for fees in all benchmarks
franciscoaguirre Jan 15, 2024
37ff1ca
Merge branch 'master' into vstam1/xcm-transactional-processing
franciscoaguirre Jan 15, 2024
6c46d2b
Add missing item in pallet_xcm_benchmarks::generic mock
franciscoaguirre Jan 15, 2024
845af9b
Fix return type
franciscoaguirre Jan 15, 2024
68525fc
Merge branch 'master' into vstam1/xcm-transactional-processing
franciscoaguirre Jan 15, 2024
6ea7ad6
".git/.scripts/commands/fmt/fmt.sh"
Jan 15, 2024
7ea3675
Add missing config item in westend runtime
franciscoaguirre Jan 15, 2024
4d1e6bb
Merge remote-tracking branch 'origin/master' into vstam1/xcm-transact…
KiChjang Jan 16, 2024
afdc4b9
Merge remote-tracking branch 'origin/master' into vstam1/xcm-transact…
KiChjang Jan 23, 2024
f9e342f
Fixes
KiChjang Jan 24, 2024
75403af
Fixes
KiChjang Jan 24, 2024
311968b
Fixes
KiChjang Jan 24, 2024
6020a71
Fixes
KiChjang Jan 24, 2024
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
6 changes: 5 additions & 1 deletion cumulus/pallets/xcmp-queue/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ use sp_runtime::{
BuildStorage,
};
use xcm::prelude::*;
use xcm_builder::{CurrencyAdapter, FixedWeightBounds, IsConcrete, NativeAsset, ParentIsPreset};
use xcm_builder::{
CurrencyAdapter, FixedWeightBounds, FrameTransactionalProcessor, IsConcrete, NativeAsset,
ParentIsPreset,
};
use xcm_executor::traits::ConvertOrigin;

type Block = frame_system::mocking::MockBlock<Test>;
Expand Down Expand Up @@ -165,6 +168,7 @@ impl xcm_executor::Config for XcmConfig {
type CallDispatcher = RuntimeCall;
type SafeCallFilter = Everything;
type Aliasers = Nothing;
type TransactionalProcessor = FrameTransactionalProcessor;
}

pub type XcmRouter = (
Expand Down
9 changes: 5 additions & 4 deletions cumulus/parachain-template/runtime/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ use xcm::latest::prelude::*;
use xcm_builder::{
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowTopLevelPaidExecutionFrom,
CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin,
FixedWeightBounds, IsConcrete, NativeAsset, ParentIsPreset, RelayChainAsNative,
SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative,
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId,
UsingComponents, WithComputedOrigin, WithUniqueTopic,
FixedWeightBounds, FrameTransactionalProcessor, IsConcrete, NativeAsset, ParentIsPreset,
RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
TrailingSetTopicAsId, UsingComponents, WithComputedOrigin, WithUniqueTopic,
};
use xcm_executor::XcmExecutor;

Expand Down Expand Up @@ -136,6 +136,7 @@ impl xcm_executor::Config for XcmConfig {
type CallDispatcher = RuntimeCall;
type SafeCallFilter = Everything;
type Aliasers = Nothing;
type TransactionalProcessor = FrameTransactionalProcessor;
}

/// No local origins on this chain are allowed to dispatch XCM sends/executions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ use xcm_builder::{
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter,
DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily,
EnsureXcmOrigin, FungiblesAdapter, HashedDescription, IsConcrete, LocalMint, NativeAsset,
NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative,
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents,
WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
EnsureXcmOrigin, FrameTransactionalProcessor, FungiblesAdapter, HashedDescription, IsConcrete,
LocalMint, NativeAsset, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative,
SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative,
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId,
UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
};
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};

Expand Down Expand Up @@ -522,6 +522,7 @@ impl xcm_executor::Config for XcmConfig {
type CallDispatcher = WithOriginFilter<SafeCallFilter>;
type SafeCallFilter = SafeCallFilter;
type Aliasers = Nothing;
type TransactionalProcessor = FrameTransactionalProcessor;
}

/// Converts a local signed origin into an XCM multilocation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ use xcm_builder::{
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter,
DenyReserveTransferToRelayChain, DenyThenTry, DescribeFamily, DescribePalletTerminal,
EnsureXcmOrigin, FungiblesAdapter, HashedDescription, IsConcrete, LocalMint, NativeAsset,
NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative,
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents,
WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
EnsureXcmOrigin, FrameTransactionalProcessor, FungiblesAdapter, HashedDescription, IsConcrete,
LocalMint, NativeAsset, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative,
SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative,
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId,
UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
};
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};

Expand Down Expand Up @@ -442,6 +442,7 @@ impl xcm_executor::Config for XcmConfig {
type CallDispatcher = WithOriginFilter<SafeCallFilter>;
type SafeCallFilter = SafeCallFilter;
type Aliasers = Nothing;
type TransactionalProcessor = FrameTransactionalProcessor;
}

/// Converts a local signed origin into an XCM multilocation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ use xcm::latest::prelude::*;
use xcm_builder::{
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter,
DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, FungiblesAdapter, IsConcrete,
LocalMint, NativeAsset, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative,
SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative,
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId,
UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, FrameTransactionalProcessor,
FungiblesAdapter, IsConcrete, LocalMint, NativeAsset, NoChecking, ParentAsSuperuser,
ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
};
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};

Expand Down Expand Up @@ -525,6 +525,7 @@ impl xcm_executor::Config for XcmConfig {
type CallDispatcher = WithOriginFilter<SafeCallFilter>;
type SafeCallFilter = SafeCallFilter;
type Aliasers = Nothing;
type TransactionalProcessor = FrameTransactionalProcessor;
}

/// Local origins on this chain are allowed to dispatch XCM sends/executions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ use xcm::latest::prelude::*;
use xcm_builder::{
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter,
DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, IsConcrete, ParentAsSuperuser,
ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, FrameTransactionalProcessor,
IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative,
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents,
WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
};
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};

Expand Down Expand Up @@ -211,6 +212,7 @@ impl xcm_executor::Config for XcmConfig {
type CallDispatcher = WithOriginFilter<SafeCallFilter>;
type SafeCallFilter = SafeCallFilter;
type Aliasers = Nothing;
type TransactionalProcessor = FrameTransactionalProcessor;
}

/// Converts a local signed origin into an XCM multilocation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ use xcm::latest::prelude::*;
use xcm_builder::{
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter,
DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, IsConcrete, ParentAsSuperuser,
ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, FrameTransactionalProcessor,
IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative,
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents,
WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
};
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};

Expand Down Expand Up @@ -215,6 +216,7 @@ impl xcm_executor::Config for XcmConfig {
type CallDispatcher = WithOriginFilter<SafeCallFilter>;
type SafeCallFilter = SafeCallFilter;
type Aliasers = Nothing;
type TransactionalProcessor = FrameTransactionalProcessor;
}

/// Converts a local signed origin into an XCM multilocation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ use xcm::latest::prelude::*;
use xcm_builder::{
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom,
CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, IsConcrete,
ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative,
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents,
WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin,
FrameTransactionalProcessor, IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative,
SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative,
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId,
UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
};
use xcm_executor::{
traits::{ExportXcm, WithOriginFilter},
Expand Down Expand Up @@ -258,6 +258,7 @@ impl xcm_executor::Config for XcmConfig {
type CallDispatcher = WithOriginFilter<SafeCallFilter>;
type SafeCallFilter = SafeCallFilter;
type Aliasers = Nothing;
type TransactionalProcessor = FrameTransactionalProcessor;
}

/// Converts a local signed origin into an XCM multilocation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ use xcm::latest::prelude::*;
use xcm_builder::{
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter,
DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, FixedWeightBounds, IsConcrete,
OriginToPluralityVoice, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative,
SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative,
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId,
UsingComponents, WithComputedOrigin, WithUniqueTopic,
DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, FixedWeightBounds,
FrameTransactionalProcessor, IsConcrete, OriginToPluralityVoice, ParentAsSuperuser,
ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
TrailingSetTopicAsId, UsingComponents, WithComputedOrigin, WithUniqueTopic,
};
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};

Expand Down Expand Up @@ -257,6 +257,7 @@ impl xcm_executor::Config for XcmConfig {
type CallDispatcher = WithOriginFilter<SafeCallFilter>;
type SafeCallFilter = SafeCallFilter;
type Aliasers = Nothing;
type TransactionalProcessor = FrameTransactionalProcessor;
}

/// Converts a local signed origin into an XCM multilocation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ use xcm::latest::prelude::*;
use xcm_builder::{
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter,
DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, FixedWeightBounds, IsConcrete,
NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative,
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents,
WithComputedOrigin, WithUniqueTopic,
DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, FixedWeightBounds,
FrameTransactionalProcessor, IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset,
RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
TrailingSetTopicAsId, UsingComponents, WithComputedOrigin, WithUniqueTopic,
};
use xcm_executor::XcmExecutor;

Expand Down Expand Up @@ -170,6 +170,7 @@ impl xcm_executor::Config for XcmConfig {
type CallDispatcher = RuntimeCall;
type SafeCallFilter = Everything;
type Aliasers = Nothing;
type TransactionalProcessor = FrameTransactionalProcessor;
}

/// Converts a local signed origin into an XCM multilocation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ use frame_support::{
};
use xcm::latest::prelude::*;
use xcm_builder::{
AllowExplicitUnpaidExecutionFrom, FixedWeightBounds, ParentAsSuperuser, ParentIsPreset,
SovereignSignedViaLocation,
AllowExplicitUnpaidExecutionFrom, FixedWeightBounds, FrameTransactionalProcessor,
ParentAsSuperuser, ParentIsPreset, SovereignSignedViaLocation,
};

parameter_types! {
Expand Down Expand Up @@ -84,6 +84,7 @@ impl xcm_executor::Config for XcmConfig {
type CallDispatcher = RuntimeCall;
type SafeCallFilter = Everything;
type Aliasers = Nothing;
type TransactionalProcessor = FrameTransactionalProcessor;
}

impl cumulus_pallet_xcm::Config for Runtime {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ impl xcm_executor::Config for XcmConfig {
type CallDispatcher = RuntimeCall;
type SafeCallFilter = Everything;
type Aliasers = Nothing;
type TransactionalProcessor = ();
}

impl cumulus_pallet_xcm::Config for Runtime {
Expand Down
10 changes: 6 additions & 4 deletions cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ use xcm_builder::{
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AsPrefixedGeneralIndex,
ConvertedConcreteId, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry,
EnsureXcmOrigin, FixedWeightBounds, FungiblesAdapter, IsConcrete, LocalMint, NativeAsset,
ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
TrailingSetTopicAsId, UsingComponents, WithComputedOrigin, WithUniqueTopic,
EnsureXcmOrigin, FixedWeightBounds, FrameTransactionalProcessor, FungiblesAdapter, IsConcrete,
LocalMint, NativeAsset, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative,
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents,
WithComputedOrigin, WithUniqueTopic,
};
use xcm_executor::{traits::JustTry, XcmExecutor};

Expand Down Expand Up @@ -298,6 +299,7 @@ impl xcm_executor::Config for XcmConfig {
type CallDispatcher = RuntimeCall;
type SafeCallFilter = Everything;
type Aliasers = Nothing;
type TransactionalProcessor = FrameTransactionalProcessor;
}

/// No local origins on this chain are allowed to dispatch XCM sends/executions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ use parachains_common::{
};
use xcm_builder::{
AllowKnownQueryResponses, AllowSubscriptionsFrom, AsPrefixedGeneralIndex, ConvertedConcreteId,
FungiblesAdapter, LocalMint, TrailingSetTopicAsId, WithUniqueTopic,
FrameTransactionalProcessor, FungiblesAdapter, LocalMint, TrailingSetTopicAsId,
WithUniqueTopic,
};
use xcm_executor::traits::JustTry;

Expand Down Expand Up @@ -449,6 +450,7 @@ impl xcm_executor::Config for XcmConfig {
type CallDispatcher = RuntimeCall;
type SafeCallFilter = Everything;
type Aliasers = Nothing;
type TransactionalProcessor = FrameTransactionalProcessor;
}

/// Local origins on this chain are allowed to dispatch XCM sends/executions.
Expand Down
13 changes: 13 additions & 0 deletions cumulus/primitives/utility/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,19 @@ impl<
}
}

impl<
AccountId,
FeeCharger: ChargeWeightInFungibles<AccountId, ConcreteAssets>,
Matcher: MatchesFungibles<ConcreteAssets::AssetId, ConcreteAssets::Balance>,
ConcreteAssets: fungibles::Mutate<AccountId> + fungibles::Balanced<AccountId>,
HandleRefund: TakeRevenue,
> Clone for TakeFirstAssetTrader<AccountId, FeeCharger, Matcher, ConcreteAssets, HandleRefund>
{
fn clone(&self) -> Self {
Self(self.0.clone(), PhantomData)
}
}

/// XCM fee depositor to which we implement the TakeRevenue trait
/// It receives a Transact implemented argument, a 32 byte convertible acocuntId, and the fee
/// receiver account FungiblesMutateAdapter should be identical to that implemented by WithdrawAsset
Expand Down
9 changes: 5 additions & 4 deletions polkadot/runtime/kusama/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ use xcm_builder::{
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative,
ChildParachainConvertsVia, ChildSystemParachainAsSuperuser,
CurrencyAdapter as XcmCurrencyAdapter, IsChildSystemParachain, IsConcrete, MintLocation,
OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32,
SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents,
WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
CurrencyAdapter as XcmCurrencyAdapter, FrameTransactionalProcessor, IsChildSystemParachain,
IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative,
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId,
UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
};
use xcm_executor::traits::WithOriginFilter;

Expand Down Expand Up @@ -346,6 +346,7 @@ impl xcm_executor::Config for XcmConfig {
type CallDispatcher = WithOriginFilter<SafeCallFilter>;
type SafeCallFilter = SafeCallFilter;
type Aliasers = Nothing;
type TransactionalProcessor = FrameTransactionalProcessor;
}

parameter_types! {
Expand Down
9 changes: 5 additions & 4 deletions polkadot/runtime/polkadot/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ use xcm::latest::prelude::*;
use xcm_builder::{
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative,
ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, IsConcrete, MintLocation,
OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32,
SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents,
WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, FrameTransactionalProcessor,
IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative,
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId,
UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
};
use xcm_executor::traits::WithOriginFilter;

Expand Down Expand Up @@ -347,6 +347,7 @@ impl xcm_executor::Config for XcmConfig {
type CallDispatcher = WithOriginFilter<SafeCallFilter>;
type SafeCallFilter = SafeCallFilter;
type Aliasers = Nothing;
type TransactionalProcessor = FrameTransactionalProcessor;
}

parameter_types! {
Expand Down
Loading