-
Notifications
You must be signed in to change notification settings - Fork 254
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
Generate pallet RPC calls #416
Comments
@athei has pointed out that this should not be restricted to pallet RPCs, that if we have RPC metadata then we can also generate the client code for any "core" rpc methods (see One key distinction is that some "core" rpcs need to be defined up front, particularly |
The generated type can implement some traits that provide the RPCs that are required for |
Once we have paritytech/substrate#11648 this can then be all done via |
Yours is more detailed/up to date. Superseded by #631 |
It would be nice to generate methods for calling pallet RPC endpoints e.g. contracts_instantiate
This is to avoid having to write code such as this, which at present requires importing or copying the definitions of the request and response types.
In order to do this we would require some metadata to be generated for these calls on the Substrate side.
Once the metadata is available it should be relatively straightforward to generate the rpc calls. Could look something like:
api.rpc().contracts().instantiate(request)
The text was updated successfully, but these errors were encountered: