Ensure origin is sudo (ensure_root) for move-transactions (execute_script) if transaction requires root-signer.
So check if move-transaction requires root-signer then check ensure_root and then execute that transaction.
If tx requires root but origin isn't sudoer then reject with error something like "wrong signer".
Ensure root isn't needed if tx doesn't requires root.
Ensure origin is sudo (
ensure_root
) for move-transactions (execute_script
) if transaction requires root-signer. So check if move-transaction requires root-signer then check ensure_root and then execute that transaction. If tx requires root but origin isn't sudoer then reject with error something like "wrong signer". Ensure root isn't needed if tx doesn't requires root.