substrate
substrate copied to clipboard
Include runtime API defs into metadata
Context: https://github.com/polkadot-js/api/issues/4930
This will help client to query the available runtime APIs and able to invoke them with correct data.
cc @ascjones
This should be added to the sp_api::decl_runtime_apis! proc macro. It is essentially the same that ink! does for its messages minus selector generation.
Given that we're pushing more people to use state Call on the grounds that runtime api calls are on-chain upgradable (unlike rpc calls), we really do need to include them in the metadata. It's currently not a great dev experience that people code them up and then don't see them in the polkadot-js when they run it against their new chain.
I agree. However, the same is true for RPCs. So it doesn't make it worse at least.
Yeah, you also only see available rpc calls, but that is all. You don't see parameters that you need to pass and that you get back.
No but RPCs were never on chain upgradable so this is very much an awesomeness unlock.
On Thu, 21 Jul 2022 at 16:29, Alexander Theißen @.***> wrote:
I agree. However, the same is true for RPCs. So it doesn't make it worse at least.
— Reply to this email directly, view it on GitHub https://github.com/paritytech/substrate/issues/11648#issuecomment-1191631766, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGEJCFUAT7G5XMKYMD6753VVFUELANCNFSM5YRS5S6Q . You are receiving this because you commented.Message ID: @.***>
addressed in https://github.com/paritytech/substrate/pull/13302
The PR which added RuntimeAPI support for the metadata
- https://github.com/paritytech/substrate/pull/13302
Stabilization PR for the Metadata V15 (features added to the V15 included in the PR description for more details):
- https://github.com/paritytech/substrate/pull/14481