Skip to content

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

Description

@willemolding

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions