1

I am adding asset pallet to the runtime. When I try to interact with it with sudo > asset > create, I got error: BadOrigin issue. Can someone please help me why I am getting this issue.

I found this in stackexchange but it doesn't help me.

I also try with not-root account but it didn't help.

I have posted error image link here

1 Answer 1

2

It requires CreateOrigin. https://github.com/paritytech/substrate/blob/c7d26dcf3d6c19fa7dcbd1f2633e337e5a5cbc40/frame/assets/src/lib.rs#L601

And the default configuration is not EnsureRoot if you are using the template. https://github.com/paritytech/substrate/blob/c7d26dcf3d6c19fa7dcbd1f2633e337e5a5cbc40/bin/node/runtime/src/lib.rs#L1488

Please check what you have configured to the CreateOrigin and use the proper origin from the PolkadotJS.

3
  • type CreateOrigin = AsEnsureOriginWithArg<EnsureSigned<AccountId>>; I have configured this @AurevoirXavier.
    – Ganesh11
    Apr 23 at 3:28
  • which means origin is ALICE isn't it?
    – Ganesh11
    Apr 23 at 3:29
  • Or should I set origin manually?
    – Ganesh11
    Apr 23 at 3:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.