mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-16 17:51:10 +00:00
Transactional processing for XCM (#1222)
Moved from: https://github.com/paritytech/polkadot/pull/6951 closes https://github.com/paritytech/polkadot-sdk/issues/490 - [x] update cumulus --- This PR introduces transactional processing of certain xcm instructions. For the list of instructions checkout https://github.com/paritytech/polkadot-sdk/issues/490. The transactional processing is implemented as an xcm-executor config item. The two implementations in this PR are `FrameTransactionalProcessor` and `()`. The `()` implementation does no transactional processing. Each implementation of the `ProcessTransaction` trait has an `IS_TRANSACTIONAL` const that tells the XCVM if transactional processing is actually implemented. If Transactional processing is implemented, changes to touched registers should also be rolled back to prevent inconsistencies. Note for reviewers: Check out the following safety assumption: https://github.com/paritytech/polkadot-sdk/pull/1222/files#diff-4effad7d8c1c9de19fd27e18661cbf2128c8718f3b2420a27d2f816e0749ea53R30 --------- Co-authored-by: Keith Yeung <kungfukeith11@gmail.com> Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com> Co-authored-by: command-bot <>
This commit is contained in:
@@ -25,6 +25,7 @@ use frame_support::{
|
||||
defensive,
|
||||
traits::{tokens::fungibles, Get, OnUnbalanced as OnUnbalancedT},
|
||||
weights::{Weight, WeightToFee as WeightToFeeT},
|
||||
CloneNoBound,
|
||||
};
|
||||
use pallet_asset_conversion::SwapCredit as SwapCreditT;
|
||||
use polkadot_runtime_common::xcm_sender::PriceForMessageDelivery;
|
||||
@@ -106,6 +107,7 @@ struct AssetTraderRefunder {
|
||||
/// later refund purposes
|
||||
/// Important: Errors if the Trader is being called twice by 2 BuyExecution instructions
|
||||
/// Alternatively we could just return payment in the aforementioned case
|
||||
#[derive(CloneNoBound)]
|
||||
pub struct TakeFirstAssetTrader<
|
||||
AccountId: Eq,
|
||||
FeeCharger: ChargeWeightInFungibles<AccountId, ConcreteAssets>,
|
||||
|
||||
Reference in New Issue
Block a user