I've had a discussion with colleagues from Crust Shadow and Moonbeam(check here) about OriginKind
usage in XCM's Transact
instruction and thought it'd be best to ask here for further explanation.
Let's assume the following scenario between Shiden & Crust Shadow (because they share the same account scheme).
- I want to send a XCM from Shiden to Crust Shadow, as a normal user (no special privileges)
- on Shiden, I prepare a XCM which will be sent to Crust Shadow
- instructions are
DescendOrigin
,WithdrawAsset
,BuyExecution
andTransact
- Crust supports this instruction set and ordering
- as part of
Transact
instruction, I have to selectOriginKind
- this can be either
Native
,SovereignAccount
,Superuser
orXcm
- this can be either
I am aware of the OriginKind
enum description here but am unsure which type is the correct one to use here.
My understanding was that I should use Native
since I want the destination (Crust) to interpret this as if I'm just a normal user (not with sovereign account privileges). In case I'd specify SovereignAccount
, this would imply I want to execute something with Shiden's sovereign account privileges. I'd expect to be rejected in this case.
After discussion and repeated looks at the code, I guess my understanding was incorrect but it's still unclear to me how OriginKind
should be interpreted.
Is Native
only for cases when I want to execute XCM locally (e.g. via polkadot-xcm => execute
call)?