Skip to content

Does not detect failed Sudo calls #295

Answered by arjanz
stanly-johnson asked this question in Q&A
Discussion options

You must be logged in to vote

Ok gotcha, I missed that attribute at first glance.

I can understand this seems not intuitive, but this is not something that should be altered in the library, because it is just translating the behaviour of this call in the Substrate runtime.

Apparently in the Sudo pallet a BadOrigin is interpreted as successful (executed with a valid Sudo account, but not allowed for given call). And for example a RequireSudo is a failure, because it is executed with an invalid Sudo account.

This is a design decision of that Substrate runtime pallet, so I believe best practice is to translate this as such to the applications interfacing with it in the most generic and unmodified way. Added exceptions in…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by arjanz
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #214 on January 03, 2023 15:01.