Skip to content
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

Substrate Wrapper - Retrieve nonce and other data from RPC when submitting extrinsic #126

Open
willemolding opened this issue Oct 5, 2022 · 0 comments

Comments

@willemolding
Copy link
Contributor

willemolding commented Oct 5, 2022

Currently the API for submitting extrinsics via the Substrate wrapper uses the same input data structure as the Substrate signing API. That is it requires passing every value required to build an extrinsic.

The API consumer needs to separately make calls to other exposed methods (e.g. getNonceForAccount, genesisHash) in order to get the data needed to call signAndSend. Since this is such a common operation it could be made much more streamlined if the API for signAndSend accepted only data that cannot be automatically filled (call, tip, sender, etc) and internally makes the calls to populate the remainder. This is much more similar to the experience of using the Polkadot-js API

The public API of the wrapper should be changed to reflect the above and the internal logic updated to automatically make the required RPC calls.

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

No branches or pull requests

1 participant