Skip to content

Commit

Permalink
use limited reserve transfer (#2610)
Browse files Browse the repository at this point in the history
  • Loading branch information
xlc authored Sep 11, 2023
1 parent 249211d commit 8853822
Show file tree
Hide file tree
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
Expand Up @@ -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,
))
}

Expand Down
14 changes: 7 additions & 7 deletions modules/support/src/relaychain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
),
}

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

0 comments on commit 8853822

Please sign in to comment.