-
Notifications
You must be signed in to change notification settings - Fork 739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
origin_kind: OriginKind::X, results into BadOrigin in XCM #6079
Comments
@dudo50 can you please share your configuration for
|
@bkontur , Standard config, that was defined in the template parachain xcm config:
It's of the following type:
|
I don't quite understand this:
where/how do you specify signed user for your call?
What is your |
@bkontur ,
I want it to be origin of the call aka
Sure, here is the codebase I am now having to convert AccountIdLookupOf to If you navigate into
You will be able to see transfer functions and parse functions. Parse functions would fail with either BadOrigin or No Permission based on what I choose as OriginKind of the XCM (Native, SovereignAccount, Superuser or Xcm). That is why in Parse functions, I have to convert "owner," which is type AccountIndexOf into Eg:
Also, please don't mind the mess in the pallet code; after it's finished, it will all undergo a deep refactoring. |
I think your are missing this piece:
I don't see anywhere in your code propagating/adding actual origin (Bob's account on the chainA) to the XCM message. You are using The XCM that comes to the chainB has the the origin as sibling parachain from which the XCM was sent,
I would suggest to add unit-test simulating the received XCM that your runtime is expected to pass for |
@bkontur , Thanks for the ideas and your patience. Using
Using
As for
Any idea as to what I may have missed or on how to convert AccId to AccId32 types? Will Much appreciated! Thanks! Dudo |
yes, because you are using |
@bkontur , Moving them under The
|
Did you add
|
@bkontur , I see; I would like to focus on ClearOrigin, then. I tried following:
But that only results into errors:
Much appreciated! |
maybe?
|
@bkontur ,
I did try to modify it a little:
Which then resulted into another error:
Which basically said, that I did not give any junction to DescendOrigin. |
No, you're mixing it up. You probably have
|
@bkontur , You were right. I was finally able to compile after converting However, I still get the same error - Here is the log:
Here is what the XCM snippet looks like now:
Any idea as to what may still be wrong? EDIT: I have also tried setting EDIT2: When I removed
Many thanks! |
ah, right, sorry, I see now that
so probably the |
@bkontur , So I modified
Which may not be exactly what you wrote, but I am unable to find any other examples close to what you wrote in the Polkadot SDK. When I search for And received new kind of error:
I feel like we are getting closer to the root of the problem here.. EDIT:
|
@bkontur , setting Much appreciated! Dudo |
I want to execute the cross-chain call from
nfts pallet
, but whenever I try it withOriginKind::Native
, which should representOriginFor<T>
aka signed user, I receive aBad Origin
error on the destination chain. Could this be XCM Config related? If so, what needs to be changed?Here is my instruction:
Previously, I had
OriginKind
set toSovereignAccount
, but this would only work for collections or nfts owned by sibling accounts.Any idea as to what might be incorrect and why it is resulting into BadOrigin error?
EDIT: Also tried with
OriginKind::Xcm
, that resulted intonftModule.NoPermission
meaning signed account was different than the user that sent the XCM.Many thanks!
The text was updated successfully, but these errors were encountered: