mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 09:51:02 +00:00
pallet-xcm: Deprecate execute and send in favor of execute_blob and send_blob (#3749)
`execute` and `send` try to decode the xcm in the parameters before reaching the filter line. The new extrinsics decode only after the filter line. These should be used instead of the old ones. ## TODO - [x] Tests - [x] Generate weights - [x] Deprecation issue -> https://github.com/paritytech/polkadot-sdk/issues/3771 - [x] PRDoc - [x] Handle error in pallet-contracts This would make writing XCMs in PJS Apps more difficult, but here's the fix for that: https://github.com/polkadot-js/apps/pull/10350. Already deployed! https://polkadot.js.org/apps/#/utilities/xcm Supersedes https://github.com/paritytech/polkadot-sdk/pull/1798/ --------- Co-authored-by: PG Herveou <pgherveou@gmail.com> Co-authored-by: command-bot <> Co-authored-by: Adrian Catangiu <adrian@parity.io>
This commit is contained in:
committed by
GitHub
parent
66051adb61
commit
feee773d15
+1
@@ -11,6 +11,7 @@ publish = false
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "3.6.0" }
|
||||
|
||||
# Substrate
|
||||
frame-support = { path = "../../../../../../../substrate/frame/support", default-features = false }
|
||||
|
||||
+4
-3
@@ -14,6 +14,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
use crate::tests::*;
|
||||
use codec::Encode;
|
||||
|
||||
#[test]
|
||||
fn send_xcm_from_westend_relay_to_rococo_asset_hub_should_fail_on_not_applicable() {
|
||||
@@ -26,7 +27,7 @@ fn send_xcm_from_westend_relay_to_rococo_asset_hub_should_fail_on_not_applicable
|
||||
|
||||
let remote_xcm = Xcm(vec![ClearOrigin]);
|
||||
|
||||
let xcm = VersionedXcm::from(Xcm(vec![
|
||||
let xcm = VersionedXcm::from(Xcm::<()>(vec![
|
||||
UnpaidExecution { weight_limit, check_origin },
|
||||
ExportMessage {
|
||||
network: RococoId,
|
||||
@@ -38,10 +39,10 @@ fn send_xcm_from_westend_relay_to_rococo_asset_hub_should_fail_on_not_applicable
|
||||
// Westend Global Consensus
|
||||
// Send XCM message from Relay Chain to Bridge Hub source Parachain
|
||||
Westend::execute_with(|| {
|
||||
assert_ok!(<Westend as WestendPallet>::XcmPallet::send(
|
||||
assert_ok!(<Westend as WestendPallet>::XcmPallet::send_blob(
|
||||
sudo_origin,
|
||||
bx!(destination),
|
||||
bx!(xcm),
|
||||
xcm.encode().try_into().unwrap(),
|
||||
));
|
||||
|
||||
type RuntimeEvent = <Westend as Chain>::RuntimeEvent;
|
||||
|
||||
Reference in New Issue
Block a user