-
Notifications
You must be signed in to change notification settings - Fork 121
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
Add raw RPC calls #1458
Add raw RPC calls #1458
Conversation
or in hex: | ||
`0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d` | ||
|
||
Some of the commands require SS58 address in the string format: |
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.
Is there a way to automatically convert it to string to make it consistent? I see this as a source of user errors in future.
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.
Is there a way to automatically convert it to string to make it consistent? I see this as a source of user errors in future.
You would need to know for which command it is required. In this case, it means hardcoding the command name and matching agains it.
One idea could be to create metadata for RPC methods and, based on this, convert the input. However, we are currently in a transition period between legacy RPC and the new implementation, which is not finished yet. Therefore, I decided not to create the metadata now.
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.
Sure, then I would create an issue for this, so we can pick it up later
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.
LGTM, just few nits
Co-authored-by: Gherman <[email protected]>
Co-authored-by: Gherman <[email protected]>
Co-authored-by: Gherman <[email protected]>
Summary
Closes #987
ink
orpallet-contracts
?Add raw RPC calls
Description
Invoke an RPC call to the node in the format:
cargo contract rpc [Options] METHOD [PARAMS]
e.g.
Checklist before requesting a review
CHANGELOG.md