XCM builder pattern safe should allow clear_origin before buy execution #3770
Labels
C1-mentor
A task where a mentor is available. Please indicate in the issue who the mentor could be.
C2-good-first-issue
A task for a first time contributor to become familiar with the Polkadot-SDK.
D0-easy
Can be fixed primarily by duplicating and adapting code by an intermediate coder.
T6-XCM
This PR/Issue is related to XCM.
The XCM builder pattern provides builders for making XCM messages:
These builders just restrict the instructions you can use at the start, they force some instructions before others.
The first is meant to be used by regular extrinsics and rust clients.
The second is meant to be used by system functions.
The third is meant to be used for tests, teaching, tinkering and sometimes when the others do not allow you to do what you need.
I found a case of this that should be easy to solve.
Right now we can't do the following:
We need to use the
builder_unsafe
variant for it to work.It is a perfectly safe idea to allow at least one
clear_origin
between an instruction that loads the holding register and one that pays for fees.The solution is to implement the
clear_origin
method in the typeXcmBuilder<Call, LoadedHolding>
inpolkadot/xcm/procedural
.The text was updated successfully, but these errors were encountered: