-
Notifications
You must be signed in to change notification settings - Fork 358
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
Question: Runtime Calls included in Metadata #5083
Comments
At this point they are hardcoded - there is an issue logged on Substrate to make this available in the metadata. For type generation, there is a new key in the definitions that pull in these - so you can add them to your definitions and typegen will spit out the correct values. This is also how the ones inside the API are generated, some examples - api/packages/types/src/interfaces/aura/runtime.ts Lines 6 to 24 in 434f969
Which is in turn exposed here on the definition -
So you can add the exact same to your definitions and it will be part of the runtime injection as well as the typegen. (It basically acts the same way as RPC definitions - so they need to be provided in the API constructor - that is until we have these in metadata and all this extra definition steps can be dropped) |
Thanks Jaco, I guess you are referring to this Issue: paritytech/substrate#11648 |
Sorry, fat fingers. Yes, the linked issue is the one. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query. |
Are Runtime Calls (https://polkadot.js.org/apps/#/runtime) part of the Metadata? I was checking the documentation and it looks they are not. Is it correct? In that case, are all those Runtime Calls types hardcoded in polkadot-js?
I was wondering if it would be possible to add also the Runtime Calls types to the Metadata. In that way, in some cases developers could build a custom Runtime API instead of a custom RPCs, with the benefit of not having to generate the custom types.
The text was updated successfully, but these errors were encountered: