Skip to content

Add sudo examples for inspecting inner call results#2216

Draft
Devpen787 wants to merge 1 commit intoparitytech:masterfrom
Devpen787:tests/sudo-inner-result-example
Draft

Add sudo examples for inspecting inner call results#2216
Devpen787 wants to merge 1 commit intoparitytech:masterfrom
Devpen787:tests/sudo-inner-result-example

Conversation

@Devpen787
Copy link
Copy Markdown

Summary

  • make the sudo integration tests inspect the inner Sudid result instead of only checking outer extrinsic success
  • add a failing wrapped-call example that shows why Sudid must be decoded
  • add successful sudo and sudo_unchecked_weight examples using a root-only balances call

Why

Issue #1854 asks for an example of how to get the result of a wrapped sudo call. The existing tests only proved that the outer sudo extrinsic finalized, which can hide inner-call failure. This patch turns the sudo tests into concrete examples of reading sudo_result from the Sudid event.

Notes

  • I could not run the full integration test suite locally because testing/test-runtime requires a local substrate or substrate-node binary on PATH.
  • cargo fmt --all was run.

Closes #1854

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add example to get result of sudo extrinsic

1 participant