-
Notifications
You must be signed in to change notification settings - Fork 503
Closed
Labels
projectIssue is part of an ongoing projectIssue is part of an ongoing project
Description
Description
With the introduction of remote_transact we need to ensure the message being sent has the correct format. The send extrinsic will prepend XCM with DescendOrigin instruction in case it’s not coming from sovereign account. We rely on it in the precompiles and should somehow ensure it doesn’t accidentally get removed.
An approach that can be used:
thread_local! {
pub static SENT_XCM: RefCell<Vec<(MultiLocation, Xcm<()>)>> = RefCell::new(Vec::new());
}
/// Sender that never returns error, always sends
pub struct TestSendXcm;
impl SendXcm for TestSendXcm {
fn send_xcm(dest: impl Into<MultiLocation>, msg: Xcm<()>) -> SendResult {
SENT_XCM.with(|q| q.borrow_mut().push((dest.into(), msg)));
Ok(())
}
}Metadata
Metadata
Assignees
Labels
projectIssue is part of an ongoing projectIssue is part of an ongoing project