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

Call payment runtime API directly instead of using custom RPC #5384

Closed
xlc opened this issue Dec 19, 2022 · 3 comments
Closed

Call payment runtime API directly instead of using custom RPC #5384

xlc opened this issue Dec 19, 2022 · 3 comments

Comments

@xlc
Copy link
Contributor

xlc commented Dec 19, 2022

As we are deprecating custom RPC in favour of runtime API, we should avoid transaction payment RPC and use the runtime API directly.

api.callAt(blockHash || optionsOrHash as string).pipe(

Helps with paritytech/substrate#12633 as there is no more RPC to deal with and support of new runtime API can be done purely on client side without the requirement of updating Substrate node & upgrading all deployments from multiple node providers.

@jacogr
Copy link
Member

jacogr commented Dec 19, 2022

The above linked/code sample uses state_call via api.call already. So missing the specific request here.

(Apps UI is the same - it uses the api.call interfaces without custom RPCs for paymentInfo.

Same applies to both the API and UI for other areas, eg. Contracts - if there is a state call, it is used instead of the old-generation RPCs.

Where state_call interfaces are available, the RPC itself on the API is also marked deprecated on the RPC with the name of the runtime calls)

@xlc
Copy link
Contributor Author

xlc commented Dec 20, 2022

Right. I misread the code.

@xlc xlc closed this as completed Dec 20, 2022
@polkadot-js-bot
Copy link

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.

@polkadot-js polkadot-js locked as resolved and limited conversation to collaborators Dec 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants