-
Notifications
You must be signed in to change notification settings - Fork 15
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
Feature: Add dry run CLI and use it in register_account_role #3992
Conversation
dry runs a runtime call Added a new dry run CLI function, which takes a RuntimeCall and returns the result. Register account role will now do a dry run and return immediately if it runs into an error
PRO-807 Check account role before registering
In the LP Api, when we call If the role is already set, we should return an error with either "already registered as {account_role}". |
The code compiles, but I'm not sure what would be the best approach to test this. All info are welcome |
Codecov Report
@@ Coverage Diff @@
## main #3992 +/- ##
=====================================
- Coverage 72% 72% -0%
=====================================
Files 367 367
Lines 58062 58081 +19
Branches 58062 58081 +19
=====================================
- Hits 42028 42024 -4
- Misses 13935 13955 +20
- Partials 2099 2102 +3
... and 3 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlastairHolmes do you have any objections to adding this extension to the BaseRpcClient? Does this seem like the right approach?
Pull Request
Closes: PRO-807
Checklist
Please conduct a thorough self-review before opening the PR.
Summary
Added a "dry run" CLI call that calls the substrate rpc, which dry runs a runtime call and returns the result.
Register account role will now do a dry run and return immediately if it runs into an error