pallet-xcm: Deprecate execute and send in favor of execute_blob and send_blob#3749
Conversation
|
@pgherveou Could you take a look at |
this should work, I am not too sure where your new MaxXcmEncodedSize is defined though. If that helps we can also not add the legacy function to the traits since at that point the contract implementation is still unstable and ok to change. |
|
I'll put only the new function in the traits then and ping you later to check everything would be fine with contracts. |
Co-authored-by: PG Herveou <pgherveou@gmail.com>
|
New PJS utility to allow same UX for these new extrinsics is already available, thanks to @serban300 👍 |
acatangiu
left a comment
There was a problem hiding this comment.
looks good! waiting for TODOs to be finished before approving.
|
Can you tell a bit more about the motivations
The new interface is a bit awkward, the caller needs to create an XCM, then encode it, so that it's later decoded again and processed inside the pallet. Couldn't we just get away with an extra encoded_size() check on the passed message to see if it fits the constraint? |
|
You only encode and then decode because you're writing the code in rust, but normal users would already have to encode their XCM. |
|
bot help |
|
@pgherveou @bkontur this is ready, waiting for final review |
executeandsendtry 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
executeandsend#3771This would make writing XCMs in PJS Apps more difficult, but here's the fix for that: polkadot-js/apps#10350.
Already deployed! https://polkadot.js.org/apps/#/utilities/xcm
Supersedes #1798