-
Notifications
You must be signed in to change notification settings - Fork 378
Configurable send origin in XCM handler #339
Comments
As the name suggests, these are |
Parachains needs to send upward message to init/accept HRMP channel requests. Before this issue solved, there is no way to add helper dispatchable calls to do these tasks. However it seems the issue cannot be solved in short term. Could you suggest a way if these testing sudo calls removed in the future? |
Maybe we can add a more specific dispatchable call, which only sends upward fn send_upward_xcm_transact(origin, call: Vec<u8>) {
T::SendOrigin::ensure_origin(origin)?;
let msg = Xcm::Transact {
origin_type: OriginKind::Native,
call: call,
};
// send upward msg...
} |
Best is to ask @pepyakin on what he thinks about this. |
I distanced a bit from XCM lately and not that well versed in the specifics of the pallet-collective, so I think @shawntabrizi is the man here. However, I can note that this particular use case could be addressed using an intermediate pallet, which could accept calls from, e.g pallet-collective and manually prepare and send a message. Gross but works. |
I think having a configurable origin is a fine change and doesn't really change the pallet. Probably you would want to remove the word As for creating a root call, you can do so in Democracy with https://github.com/paritytech/substrate/blob/master/frame/democracy/src/lib.rs#L1540 Which can be executed by an collective as an |
I'm happy to open a PR to do this. Will make these send xcm dispatchable calls use configurable origin and remove word |
XCM handler module has dispatchable calls to send messages, but the origin must be root.
cumulus/pallets/xcm-handler/src/lib.rs
Lines 77 to 78 in d8126cd
It will be helpful to make the origin configurable, so that it can work with
pallet-collective
. For instance, config the send origin asEnsureRootOrHalfCouncil
.The text was updated successfully, but these errors were encountered: