mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 09:51:02 +00:00
XCM v2: Scripting, Query responses, Exception handling and Error reporting (#3629)
* Intoduce XCM v2 Also some minor fix for v0/v1 * Minor version cleanup * Minor version cleanup * Introduce SendError for XcmSend trait to avoid cycles with having Outcome in Xcm * comment * Corrent type * Docs * Fix build * Fixes * Introduce the basic impl * Docs * Add function * Basic implementation * Weighed responses and on_report * Make XCM more script-like * Remove BuyExecution::orders * Fixes * Fixes * Fixes * Formatting * Initial draft and make pallet-xcm build * fix XCM tests * Formatting * Fixes * Formatting * spelling * Fixes * Fixes * spelling * tests for translation * extra fields to XCM pallet * Formatting * Fixes * spelling * first integration test * Another integration test * Formatting * fix tests * all tests * Fixes * Fixes * Formatting * Fixes * Fixes * Formatting * Bump * Remove unneeded structuring * add instruction * Fixes * spelling * Fixes * Fixes * Formatting * Fixes * Fixes * Formatting * Introduce and use VersionedResponse * Introduce versioning to dispatchables' params * Fixes * Formatting * Rest of merge * more work * Formatting * Basic logic * Fixes * Fixes * Add test * Fixes * Formatting * Fixes * Fixes * Fixes * Nits * Simplify * Spelling * Formatting * Return weight of unexecuted instructions in case of error as surplus * Formatting * Fixes * Test for instruction count limiting * Formatting * Docs
This commit is contained in:
@@ -260,7 +260,7 @@ macro_rules! decl_test_network {
|
||||
},
|
||||
)*
|
||||
_ => {
|
||||
return Err($crate::XcmError::CannotReachDestination(destination, message));
|
||||
return Err($crate::XcmError::Unroutable);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -285,7 +285,7 @@ macro_rules! decl_test_network {
|
||||
);
|
||||
},
|
||||
)*
|
||||
_ => return Err($crate::XcmError::SendFailed("Only sends to children parachain.")),
|
||||
_ => return Err($crate::XcmError::Transport("Only sends to children parachain.")),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -296,7 +296,7 @@ macro_rules! decl_test_network {
|
||||
pub struct ParachainXcmRouter<T>($crate::PhantomData<T>);
|
||||
|
||||
impl<T: $crate::Get<$crate::ParaId>> $crate::SendXcm for ParachainXcmRouter<T> {
|
||||
fn send_xcm(destination: $crate::MultiLocation, message: $crate::Xcm<()>) -> $crate::XcmResult {
|
||||
fn send_xcm(destination: $crate::MultiLocation, message: $crate::Xcm<()>) -> $crate::SendResult {
|
||||
use $crate::{UmpSink, XcmpMessageHandlerT};
|
||||
|
||||
match destination.interior() {
|
||||
@@ -312,7 +312,7 @@ macro_rules! decl_test_network {
|
||||
Ok(())
|
||||
},
|
||||
)*
|
||||
_ => Err($crate::XcmError::CannotReachDestination(destination, message)),
|
||||
_ => Err($crate::SendError::CannotReachDestination(destination, message)),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -320,7 +320,7 @@ macro_rules! decl_test_network {
|
||||
/// XCM router for relay chain.
|
||||
pub struct RelayChainXcmRouter;
|
||||
impl $crate::SendXcm for RelayChainXcmRouter {
|
||||
fn send_xcm(destination: $crate::MultiLocation, message: $crate::Xcm<()>) -> $crate::XcmResult {
|
||||
fn send_xcm(destination: $crate::MultiLocation, message: $crate::Xcm<()>) -> $crate::SendResult {
|
||||
use $crate::DmpMessageHandlerT;
|
||||
|
||||
match destination.interior() {
|
||||
@@ -331,7 +331,7 @@ macro_rules! decl_test_network {
|
||||
Ok(())
|
||||
},
|
||||
)*
|
||||
_ => Err($crate::XcmError::SendFailed("Only sends to children parachain.")),
|
||||
_ => Err($crate::SendError::Unroutable),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user