You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So far the api-client does not support runtime api calls. The goal of this issue is to facilitate runtime api calls, in general, and provide helper functions for the runtime api calls of the most commonly used pallets.
Up to date Substrate nodes should already include metadata v15 by default. So this feature should (once the Susbtrate deps are upgraded) already be testable by CI (see PR paritytech/substrate#14481 for more information)
To me it's not clear: do we implement all calls manually? Or do we generate code? If we generate code automatically, do we do this frequently/whenever there are changes in the runtime api call?
Currently, we are not generating code at all in the api-client. So for now, I'd stick to hard coded helper functions and one function that allows a generic "String" input... or Probably two Strings, as in polkadot.js:
If we want to go more in the direction of code producing code, I believe that should be addressed in a different issue, as it also affects the already implemented RPC calls.
So far the api-client does not support runtime api calls. The goal of this issue is to facilitate runtime api calls, in general, and provide helper functions for the runtime api calls of the most commonly used pallets.
Available Runtime Calls: https://polkadot.js.org/docs/polkadot/runtime
Hands on testing: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.dotters.network%2Fkusama#/runtime
Subxt has already put some thoughts into it: see paritytech/subxt#918
Task description
Implement helper functions, just like our rpc calls
substrate-api-client/src/api/rpc_api/frame_system.rs
Lines 73 to 81 in 53be73d
that directly access the node api and return the information.
Example code from subxt:
And as reference: here's the call executed by the rpc: https://github.com/paritytech/subxt/blob/9a8fc33f2fe830009011e997773071099101d69b/subxt/src/runtime_api/runtime_types.rs#L43-L106
Already implemented:
substrate-api-client/node-api/src/metadata/metadata_types.rs
Line 48 in 53be73d
The text was updated successfully, but these errors were encountered: