Skip to content
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

runtime call support #59

Open
gilescope opened this issue Jan 9, 2023 · 4 comments
Open

runtime call support #59

gilescope opened this issue Jan 9, 2023 · 4 comments

Comments

@gilescope
Copy link
Contributor

gilescope commented Jan 9, 2023

We can get the rpc methods like this:

curl -sS -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "rpc_methods"}' http://localhost:9933/

I don't think there's a way in polkadot at the moment to get the same list of method strings that one can feed into the state_call rpc method. We suggest that people do state call runtime functions rather than doing custom rpc calls because you can add them via a runtime upgrade without needing to update the node. But they are not as discoverable at the moment.

@gilescope
Copy link
Contributor Author

E.g. state_call "Metadata_metadata" 0x does the equivilent of the rpc metadata call, but discovering this at the moment is not easy.

@chevdor
Copy link
Owner

chevdor commented Jan 9, 2023

I would need to look into that. Keep in mind that subwasm only works off the runtime.
If there is a call that does not require storage and returns those functions, there should be an option.
subwasm does not call any jsonrpc endpoint (besides the convenience to fetch the runtime from a node).

@gilescope
Copy link
Contributor Author

gilescope commented Jan 10, 2023 via email

@chevdor
Copy link
Owner

chevdor commented Jan 10, 2023

ok, I will investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants