Skip to content

Commit

Permalink
use limited reserve transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
xlc committed Sep 11, 2023
1 parent 46c2cb5 commit 1f0791c
Showing 4 changed files with 13 additions and 10 deletions.
3 changes: 2 additions & 1 deletion modules/relaychain/src/lib.rs
Original file line number Diff line number Diff line change
@@ -148,11 +148,12 @@ where
assets: MultiAssets,
fee_assets_item: u32,
) -> RCC {
RCC::xcm_pallet(XcmCall::ReserveTransferAssets(
RCC::xcm_pallet(XcmCall::LimitedReserveTransferAssets(
dest.into_versioned(),
beneficiary.into_versioned(),
assets.into(),
fee_assets_item,
WeightLimit::Unlimited,
))
}

14 changes: 7 additions & 7 deletions modules/support/src/relaychain.rs
Original file line number Diff line number Diff line change
@@ -41,25 +41,25 @@ pub enum UtilityCall<RCC> {
#[derive(Encode, Decode, RuntimeDebug)]
pub enum StakingCall {
#[codec(index = 1)]
BondExtra(#[codec(compact)] Balance), /* TODO: because param type in relaychain is u64, need to confirm
* Balance(u128) is working. */
BondExtra(#[codec(compact)] Balance),
#[codec(index = 2)]
Unbond(#[codec(compact)] Balance), /* TODO: because param type in relaychain is u64, need to confirm
* Balance(u128) is working. */
Unbond(#[codec(compact)] Balance),
#[codec(index = 3)]
WithdrawUnbonded(u32),
}

/// `pallet-xcm` calls.
#[derive(Encode, Decode, RuntimeDebug)]
pub enum XcmCall {
/// `reserve_transfer_assets(dest, beneficiary, assets, fee_asset_item)` call.
#[codec(index = 2)]
ReserveTransferAssets(
/// `limited_reserve_transfer_assets(dest, beneficiary, assets, fee_asset_item, weight_limit)`
/// call.
#[codec(index = 8)]
LimitedReserveTransferAssets(
VersionedMultiLocation,
VersionedMultiLocation,
VersionedMultiAssets,
u32,
WeightLimit,
),
}

Original file line number Diff line number Diff line change
@@ -79,7 +79,7 @@ Xcm(
1,
0,
99,
2,
8,
3,
0,
1,
@@ -139,6 +139,7 @@ Xcm(
0,
0,
0,
0,
],
},
RefundSurplus,
Original file line number Diff line number Diff line change
@@ -79,7 +79,7 @@ Xcm(
1,
0,
99,
2,
8,
3,
0,
1,
@@ -139,6 +139,7 @@ Xcm(
0,
0,
0,
0,
],
},
RefundSurplus,

0 comments on commit 1f0791c

Please sign in to comment.