-
Notifications
You must be signed in to change notification settings - Fork 105
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
Update from upstream #1123
Update from upstream #1123
Changes from 18 commits
c7ee43c
a476fd6
638c470
1f15711
1287ca1
d17ee3b
5d8a33c
ae4fd13
3231690
2d5929a
07283d1
c6ab53a
ceec939
ec0cd34
47ea247
6f9fd05
2b8687d
f64132d
b8515e6
270c492
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,8 +21,8 @@ use sp_runtime::{ | |
BuildStorage, FixedU128, MultiSignature, | ||
}; | ||
use sp_std::convert::From; | ||
use xcm::v3::{prelude::*, MultiAssets, SendXcm}; | ||
use xcm_executor::Assets; | ||
use xcm::v4::{prelude::*, SendXcm}; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems the explicit There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point! Changed in b8515e6 |
||
use xcm_executor::AssetsInHolding; | ||
|
||
use crate::{self as inbound_queue}; | ||
|
||
|
@@ -159,17 +159,16 @@ impl SendXcm for MockXcmSender { | |
type Ticket = Xcm<()>; | ||
|
||
fn validate( | ||
dest: &mut Option<MultiLocation>, | ||
xcm: &mut Option<xcm::v3::Xcm<()>>, | ||
dest: &mut Option<Location>, | ||
xcm: &mut Option<Xcm<()>>, | ||
) -> SendResult<Self::Ticket> { | ||
match dest { | ||
Some(MultiLocation { interior, .. }) => { | ||
if let X1(Parachain(1001)) = interior { | ||
return Err(XcmpSendError::NotApplicable) | ||
} | ||
Ok((xcm.clone().unwrap(), MultiAssets::default())) | ||
}, | ||
_ => Ok((xcm.clone().unwrap(), MultiAssets::default())), | ||
if let Some(location) = dest { | ||
match location.unpack() { | ||
(_, [Parachain(1001)]) => return Err(XcmpSendError::NotApplicable), | ||
_ => Ok((xcm.clone().unwrap(), Assets::default())), | ||
} | ||
} else { | ||
Ok((xcm.clone().unwrap(), Assets::default())) | ||
} | ||
} | ||
|
||
|
@@ -207,45 +206,33 @@ impl StaticLookup for MockChannelLookup { | |
|
||
pub struct SuccessfulTransactor; | ||
impl TransactAsset for SuccessfulTransactor { | ||
fn can_check_in( | ||
_origin: &MultiLocation, | ||
_what: &MultiAsset, | ||
_context: &XcmContext, | ||
) -> XcmResult { | ||
fn can_check_in(_origin: &Location, _what: &Asset, _context: &XcmContext) -> XcmResult { | ||
Ok(()) | ||
} | ||
|
||
fn can_check_out( | ||
_dest: &MultiLocation, | ||
_what: &MultiAsset, | ||
_context: &XcmContext, | ||
) -> XcmResult { | ||
fn can_check_out(_dest: &Location, _what: &Asset, _context: &XcmContext) -> XcmResult { | ||
Ok(()) | ||
} | ||
|
||
fn deposit_asset( | ||
_what: &MultiAsset, | ||
_who: &MultiLocation, | ||
_context: Option<&XcmContext>, | ||
) -> XcmResult { | ||
fn deposit_asset(_what: &Asset, _who: &Location, _context: Option<&XcmContext>) -> XcmResult { | ||
Ok(()) | ||
} | ||
|
||
fn withdraw_asset( | ||
_what: &MultiAsset, | ||
_who: &MultiLocation, | ||
_what: &Asset, | ||
_who: &Location, | ||
_context: Option<&XcmContext>, | ||
) -> Result<Assets, XcmError> { | ||
Ok(Assets::default()) | ||
) -> Result<AssetsInHolding, XcmError> { | ||
Ok(AssetsInHolding::default()) | ||
} | ||
|
||
fn internal_transfer_asset( | ||
_what: &MultiAsset, | ||
_from: &MultiLocation, | ||
_to: &MultiLocation, | ||
_what: &Asset, | ||
_from: &Location, | ||
_to: &Location, | ||
_context: &XcmContext, | ||
) -> Result<Assets, XcmError> { | ||
Ok(Assets::default()) | ||
) -> Result<AssetsInHolding, XcmError> { | ||
Ok(AssetsInHolding::default()) | ||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same lints as the polkadot-sdk.